Wowza Community

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"?>

defaultVHost

${com.wowza.wms.ConfigHome}

0

vhost01

${com.wowza.wms.ConfigHome}/vhost01

0

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?

in the userguide it is explained from page 61 and further: http://www.wowza.com/resources/WowzaStreamingEngine_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

Hi,

Thank you for the detailed information regarding this issue.

This is currently being managed via an open support ticket.

Jason

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

Regards,

Salvadore

ok. there we go.

here my settings i want to use

[PHP]new virtual host: vhost01

ipaddress : 192.168.10.17

streaming port: 1936[/PHP]

Step 1. add new virtual host to /conf/VHosts.xml

[PHP]<?xml version="1.0" encoding="UTF-8"?>

defaultVHost

${com.wowza.wms.ConfigHome}

10

vhost01

${com.wowza.wms.ConfigHome}/vhost01

0

[/PHP]

Step 2.Directory structure to copy the files to: this is what the structure should be.

[PHP][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 (Optional, see Notes below)

[content]

[keys]

[logs]

[transcoder][/PHP]

  1. 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 (${com.wowza.wms.ConfigHome}/vhost01) <= 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 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][/PHP]

#note: you might want to remove your applications too in your new vhost directory. i was lazy :wink:

  1. The above changes only take place when you restart the wowza server. but first setup your log to follow problems that might occur

[PHP]follow error log before reboot: root@wowza40:/usr/local/WowzaStreamingEngine/logs# tail -f wowzastreamingengine_error.log[/PHP]

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]Error##: – - vhost01 Bind failed, try again ([any]:1935): java.net.BindException: Address already in use[/PHP]

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]WARN vhost comment 2014-02-17 23:25:38 - - - - - 348.93 - - - - – - vhost01 Bind failed, try again ([any]:1935): java.net.BindException: Address already in use

WARN vhost comment 2014-02-17 23:25:43 - - - - - 353.938 - - - - – - vhost01 Bind failed, try again ([any]:1935): java.net.BindException: Address 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.BindException: Address already in use[/PHP]

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]#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 API: Loading XML: Invalid 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.BindException: Address 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.BindException: Address already in use[/PHP]

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]tail -f /usr/local/WowzaStreamingEngine/logs/wowzastreamingengine_access.log[/PHP]

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]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.startShutdownHook: Start 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 - - - - - - - - - - - - - - [/PHP]

when i check the error.log after i have created an live application i get a new error:

[PHP]

WARN server comment 2014-02-17 23:39:29 - - - - - 159.207 - - - - – - - REST API: Server request (GET): Resource not found-404: http://localhost:8087/v1/server/vhosts/vhost01/applications/live_vhost01

[/PHP]

[PHP]WARN server comment 2014-02-17 23:56:14 - - - - - 1163.869 - - - – - - - Application folder ([install-location]/applications/vhost01) is missing

[/PHP]

i can solve this error by changing the file VHosts.xml in /usr/local/WowzaStreamingEngine/conf/VHosts.xml

from:

[PHP]${com.wowza.wms.ConfigHome}/vhost01[/PHP]

to:

[PHP] /usr/local/WowzaStreamingEngine/vhost01

[/PHP]

this error looks to me of an error in the 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]rtmp://192.168.10.17:1936/live_vhost01[/PHP]

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

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