Results 1 to 6 of 6

Thread: VHost ERROR

  1. #1
    Join Date
    Mar 2013
    Posts
    3

    Unhappy VHost ERROR

    There are not possibilities to create VHost from EngineManager.

    For this reason, I configured conf/VHosts.xml so,

    <?xml version="1.0" encoding="UTF-8"?>
    <Root version="1">
    <VHosts>
    <VHost>
    <Name>_defaultVHost_</Name>
    <ConfigDir>${com.wowza.wms.ConfigHome}</ConfigDir>
    <ConnectionLimit>0</ConnectionLimit>
    </VHost>
    <VHost>
    <Name>vhost01</Name>
    <ConfigDir>${com.wowza.wms.ConfigHome}/vhost01</ConfigDir>
    <ConnectionLimit>0</ConnectionLimit>
    </VHost>
    </VHosts>
    </Root>


    but my Server started with the following errors..

    2014-02-13 19:02:54 PET comment server ERROR 500 - VHost.loadConfig: VHost.xml missing: /usr/local/WowzaStreamingEngine/vhost01/conf/VHost.xml - - -6.237 - - - - - - - - - - - - - - - - - - - - - - - --
    2014-02-13 19:02:54 PET comment server ERROR 500 - VHost.loadConfig: StartupStreams.xml missing: /usr/local/WowzaStreamingEngine/vhost01/conf/StartupStreams.xml - - - 6.366 - - - - - - - - - - - - - - - - - - - -- - - - -

    Then, I've tried copying the files from /usr/local/WowzaStreamingEngine but other problems emerged from EngineManager.

    What is the correct way to configure Virtual Host?

  2. #2

    Default

    in the userguide it is explained from page 61 and further: http://www.wowza.com/resources/Wowza...UsersGuide.pdf

    edit: ok. i followed the userguide to give it a try. had quite some issues. might be some bugs in the streamingenginemanager. i will put down the things i did. could be that i missed some steps too. but i got it to work eventually
    Last edited by nlmaca; 02-17-2014 at 02:47 PM.

  3. #3

    Default

    ok. there we go.
    here my settings i want to use
    PHP Code:
    new virtual hostvhost01
    ipaddress 
    192.168.10.17
    streaming port
    1936 
    Step 1. add new virtual host to /conf/VHosts.xml
    PHP Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <Root version="1">
            <VHosts>
                    <VHost>
                            <Name>_defaultVHost_</Name>
                            <ConfigDir>${com.wowza.wms.ConfigHome}</ConfigDir>
                            <ConnectionLimit>10</ConnectionLimit>
                    </VHost>
                    <VHost>
                            <Name>vhost01</Name>
                            <ConfigDir>${com.wowza.wms.ConfigHome}/vhost01</ConfigDir>
                            <ConnectionLimit>0</ConnectionLimit>
                    </VHost>
            </VHosts>
    </Root>
    Step 2.Directory structure to copy the files to: this is what the structure should be.
    PHP Code:
    [install-dir
        [
    defaultVHost
        [
    applications
        [
    conf
            
    Application.xml 
            clientaccesspolicy
    .xml 
            crossdomain
    .xml 
            MediaCache
    .xml 
            StartupStreams
    .xml 
            Tune
    .xml 
            VHost
    .xml 
            admin
    .password 
            publish
    .password 
        
    [content
        [
    keys
        [
    logs
        [
    transcoder
        [
    newVHost]  // vhost01
            
    [applications
            [
    conf
                
    Application.xml 
                clientaccesspolicy
    .xml 
                crossdomain
    .xml 
                MediaCache
    .xml 
                StartupStreams
    .xml 
                Tune
    .xml 
                VHost
    .xml 
                admin
    .password 
                publish
    .password (Optionalsee Notes below
            [
    content
            [
    keys
            [
    logs
            [
    transcoder
    3. so the vhost01 structure should be placed in /usr/local/WowzaStreamingEngine/vhost01 if you look at the directory structure
    note: if i look at step 1 the vhost01 should be placed in the config directory (<ConfigDir>${com.wowza.wms.ConfigHome}/vhost01</ConfigDir>) <= i will ignore this one

    copy the files to /usr/local/WowzaStreamingEngine/vhost01 (just like the directory structure says and ignoring the directory class from the VHosts.xml
    PHP Code:
    --- code copy and deleting files---
    root@wowza40:/usr/local/WowzaStreamingEngine# mkdir vhost01 [enter]
    keeping it simple copy directories and files:
    root@wowza40:/usr/local/WowzaStreamingEngine# cp -r applications/ conf/ content/ keys/ logs/ transcoder/ /usr/local/WowzaStreamingEngine/vhost01/  [enter]

    now remove unnessesary files from config and log directory
    root
    @wowza40:/usr/local/WowzaStreamingEngine# cd conf/ [enter]
    root@wowza40:/usr/local/WowzaStreamingEngine/conf# rm jmxremote.access jmxremote.password log4j.properties publish.password PushPublishMap.txt Server.guid Server.license Server.xml
    root@wowza40:/usr/local/WowzaStreamingEngine/conf# cd ../logs [enter]
    root@wowza40:/usr/local/WowzaStreamingEngine/vhost01/logs# rm -r * [enter] 
    #note: you might want to remove your applications too in your new vhost directory. i was lazy

    4. The above changes only take place when you restart the wowza server. but first setup your log to follow problems that might occur
    PHP Code:
    follow error log before rebootroot@wowza40:/usr/local/WowzaStreamingEngine/logs# tail -f wowzastreamingengine_error.log 
    now you can restart the server from the browser : go to the streamingmanager (ip:8088). and restart the server

    restarting.......... checking error log
    darn:
    PHP Code:
    Error##: --       -       vhost01 Bind failed, try again ([any]:1935): java.net.BindException: Address already in use 
    thats correct: the new vhost should run on a different port. lets set it to 1936 (page 63 from the user guide)
    Refresh your browser: F5
    you now can see under Server -> vhost01. click vhost01
    then go on the left to Virtual Host Setup
    click in the middle on Edit and change the Host Ports
    Default Streaming / Streaming / * / 1935 / false
    to
    Default Streaming / Streaming / 192.168.10.17 (server ip) / 1936 / false
    apply -> save -> restart vhost + check your error log again that is still running

    error log is changing: from any ip to the new ip i have set:
    PHP Code:
    WARN    vhost   comment 2014-02-17      23:25:38        -       -       -       -       -       348.93  -       -       -       - --       -       vhost01 Bind failed, try again ([any]:1935): java.net.BindExceptionAddress already in use
    WARN    vhost   comment 2014-02-17      23:25:43        -       -       -       -       -       353.938 -       -       -       - --       -       vhost01 Bind failed, try again ([any]:1935): java.net.BindExceptionAddress already in use
    WARN    vhost   comment 2014-02-17      23:25:47        -       -       -       -       -       358.416 -       -       -       - --       -       vhost01 Bind failed, try again (192.168.10.17:5085): java.net.BindExceptionAddress already in use 
    now also port 5085 is present which is also available in the default vhost.
    you know what?
    press F5 in your browser and just restart the complete server.
    this will activate the port change (1936). only the admin port is still present now
    PHP Code:
    #Software: Wowza Streaming Engine 4.0.0.00 build10425
    #Date: 2014-02-17
    #Fields: x-severity     x-category      x-event date    time    c-client-id     c-ip    c-port  cs-bytes        sc-bytes        x-duration x-sname x-stream-id     x-spos  sc-stream-bytes cs-stream-bytes x-file-size     x-file-length   x-ctx   x-comment
    WARN    server  comment 2014-02-17      23:28:35        -       -       -       -       -       3.155   -       -       -       - --       -       -       REST APILoading XMLInvalid number format (8087,8088) for /Root/Server/RESTInterface/Port/text()
    WARN    vhost   comment 2014-02-17      23:28:40        -       -       -       -       -       7.786   -       -       -       - --       -       vhost01 Bind failed, try again (192.168.10.17:5085): java.net.BindExceptionAddress already in use
    WARN    vhost   comment 2014-02-17      23:28:45        -       -       -       -       -       12.795  -       -       -       - --       -       vhost01 Bind failed, try again (192.168.10.17:5085): java.net.BindExceptionAddress already in use 
    now how do i get rid of the 5085 notice?
    in your browser go to your vhost01 -> virtual host setup -> edit -> Host Ports and delete the line Default Admin from the Host Ports -> Save and restart the vhost after that. nothing happens.
    go to server Setup and just restart the complete server

    annnd gone. no more errors

    to make sure. follow your access.log :
    PHP Code:
    tail -/usr/local/WowzaStreamingEngine/logs/wowzastreamingengine_access.log 
    and restart the complete server to check if the vhosts are binded and if everything is starting

    check the access.log and just restart it to check if the new vhost get binded
    PHP Code:
    2014-02-17      23:36:58        CET     comment vhost   INFO    200     vhost01 Bind attempt (192.168.10.17:1936:4)     -       - -8.004   -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       - --       -       -       -       -       -       -       -
    2014-02-17      23:36:58        CET     comment vhost   INFO    200     vhost01 Bind successful (192.168.10.17:1936)    -       - -8.014   -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       - --       -       -       -       -       -       -       -
    2014-02-17      23:36:58        CET     comment server  INFO    200     -       Server.startShutdownHookStart server shutdown hook       -       -       -       8.02    -       -       -       -       -       -       -       -       -       -       -       - --       -       -       -       -       -       -       -       -       -       -       -
    2014-02-17      23:36:58        CET     comment server  INFO    200     -       StatsManager:startManager() Enabled=true        - --       8.274   -       -       -       -       -       -       -       -       -       -       -       -       -       -       - --       -       -       -       -       -       -       -       -
    2014-02-17      23:36:58        CET     comment server  INFO    200     -       Wowza Streaming Engine is started!      -       - -8.28    -       -       -       -       -       -       -       -       -       -       -       -       -       - 
    when i check the error.log after i have created an live application i get a new error:
    PHP Code:
    WARN    server  comment 2014-02-17      23:39:29        -       -       -       -       -       159.207 -       -       -       - --       -       -       REST APIServer request (GET): Resource not found-404http://localhost:8087/v1/server/vhosts/vhost01/applications/live_vhost01 
    PHP Code:
    WARN    server  comment 2014-02-17      23:56:14        -       -       -       -       -       1163.869        -       -       - --       -       -       -       Application folder ([install-location]/applications/vhost01is missing 
    i can solve this error by changing the file VHosts.xml in /usr/local/WowzaStreamingEngine/conf/VHosts.xml

    from:
    PHP Code:
    <ConfigDir>${com.wowza.wms.ConfigHome}/vhost01</ConfigDir
    to:
    PHP Code:
     <ConfigDir>/usr/local/WowzaStreamingEngine/vhost01</ConfigDir
    this error looks to me of an error in the <ConfigDir> Setup. {comb.wowza.wms.ConfigHome} = /usr/local/WowzaStreamingEngine/conf but should be above the conf directory according to the directory structure.

    @Wowza admins can you check this one out?

    it is working eventually, but some things aren't documented correctly

    to test a stream to the new vhost i add this address in my flme

    PHP Code:
    rtmp://192.168.10.17:1936/live_vhost01 
    where the ip is my server ip
    the port is from the new vhost
    and live_vhost01 is just a test application i have setup unde the new vhost.

    Note: sometimes the browser isnt updating after a restart. because i wanted to use the testplayer in wowza to test my new live stream and it wanted to connect to rtmp://192.168.10.17:5085. after an F5 it was corrected to 1936
    Last edited by nlmaca; 02-17-2014 at 04:17 PM.

  4. #4
    Join Date
    Sep 2011
    Posts
    1,920

    Default

    Hi,
    Thank you for the detailed information regarding this issue.
    This is currently being managed via an open support ticket.

    Jason

  5. #5
    Join Date
    Nov 2014
    Posts
    1

    Default

    is it possible to create another VHost ? at Latest Wowza Version 4.2.0 ??

  6. #6

    Default

    For information about how to configure multiple VHosts, see the "Virtual Hosting" chapter in the Wowza Media Server User's Guide.

    Regards,

    Salvadore

Similar Threads

  1. about VHost.......????
    By Jehun Koa in forum General Forum
    Replies: 1
    Last Post: 06-18-2012, 08:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •