Skip to main content
Known Participant
May 16, 2014
Question

Lose RTMP when I set up vhosts

  • May 16, 2014
  • 2 replies
  • 732 views

Please excuse the length and breadth of this post... but I've been working on this for a long time, trying to find out where I'm losing my rtmp in the process.   I haven't found it... so you are seeing the long string of everything I'm doing currently to set up a new AMS 5.0 server to cross our old FMS 3.5 stuff to.

I'm trying to build on a server with three IPs and associated names.  Names and IPs are in our DNS and properly associated

physicalserver.site.edu 999.999.999.001

vhost1live.site.edu     999.999.999.002

vhost2static.site.edu 999.999.999.003

I install AMS 5.

I then set Apache to listen to 80

  Listen 80

  # Listen 8134

I make sure AMS isn't listening on 80

ADAPTOR.HOSTPORT = :1935

I shut off proxy on 8134

HTTPPROXY.HOST =

in Adaptor.xml, I comment out the original hostport line and replace it with entries for my three IP's

<HostPort>999.999.999.001:1935,443</HostPort>

  <HostPort>999.999.999.002:1935,443</HostPort>

  <HostPort>999.999.999.003:1935,443</HostPort>

In Apache's httpd.conf, I set up vhosts

<VirtualHost 999.999.999.001>

ServerName physicalserver.site.edu

DocumentRoot "C:/Apache/physicalserver"

  ErrorLog logs/physicalserver-error_log

TransferLog logs/physicalserver-access_log

</VirtualHost>

<VirtualHost 999.999.999.002>

ServerName vhost1live.site.edu

DocumentRoot "C:/Apache/vhost1live"

  ErrorLog logs/vhost1live-error_log

TransferLog logs/vhost1live-access_log

</VirtualHost>

 

<VirtualHost 999.999.999.003>

ServerName vhost2static.site.edu

DocumentRoot "C:/Apache/vhost2static"

  ErrorLog logs/vhost2static-error_log

TransferLog logs/vhost2static-access_log

</VirtualHost>

I also add the following to the httpd.conf

<Directory "C:/Apache/vhost2static">

Options -Indexes FollowSymLinks

AllowOverride None

Order allow,deny

Allow from all

</Directory>

<Directory "C:/Apache/physicalserver">

Options -Indexes FollowSymLinks

AllowOverride None

Order allow,deny

Allow from all

</Directory>

<Directory "C:/Apache/vhost1live">

Options -Indexes FollowSymLinks

AllowOverride None

Order allow,deny

Allow from all

</Directory>

In the AMS conf folder, within _defaultroot_, I dup the defaultvhost folder three times to create

physicalserver.site.edu

vhost1live.site.edu

vhost2static.site.edu

within those folders, i alter the vhost.xml file

I replace the default alias entry with the corresponding server

<Alias name=physicalserver"></Alias>

and the appsdir with

<AppsDir>C:\Apache\physicalserver\applications</AppsDir>

I have made three folders in c:/Apache, 1 to be the webroot of each of the servers

C:/Apache/physicalserver

  C:/Apache/vhost1live

  C:/Apache/vhost2static

Into each of these folders, i copy the contents of the default installs webroot folder.   I also copy in Applications.   Finally, from the samples folder, I copy in the videoplayer folder.

Not going into great detail, inside this folder I try to alter the appropriate files so they all reference their own server (change localhost entries to vhost1live.site.edu, etc).

Since I know I'm setting up one vhost for Live work, and one for Static stuff, I've been changing these settings in AMS.ini

VOD_COMMON_DIR = C:\Apache\vhost2static.site.edu\vod

VOD_COMMON_DIR = C:\Apache\vhost2static\applications\vod\media

LIVE_DIR = C:\Apache\vhost1live\applications\live

In httpd.conf, i change the following

<Location /hds-live>

HttpStreamingEnabled true

HttpStreamingLiveEventPath "C:/Apache/vhost1live/applications"

HttpStreamingContentPath "C:/Apache/vhost1live/applications"

<Location /hls-live>

HLSHttpStreamingEnabled true

HttpStreamingLiveEventPath "C:/Apache/vhost1live/applications"

HttpStreamingContentPath "C:/Apache/vhost1live/applications"

<Location /hls-vod>

HttpStreamingContentPath "C:/Apache/vhost2static/vod"

<Location /hds-vod>

HttpStreamingContentPath "C:/Apache/vhost2static/vod"

When I have this done, and start the AMS and Apache services, I can generally have the index and videoplayer pages work.  hds, http, and hls streaming will work  (haven't tried a real live broadcast through it though...so not sure if inbound rtmp works).

BUT...the regular RTMP streams and RTMP via manifest files do not work.

Ideas?

    This topic has been closed for replies.

    2 replies

    Known Participant
    May 16, 2014

    A coworker stopped by and we played with this some more.

    He pointed out that nothing on the box appeared to be listening on 1935.

    ams was running, so we did some more looking.

    on a whim, we reenabled the stock line in adaptor.xml before my hostport entries.

    so now it reads like

    <HostPort name="edge1" ctl_channel="localhost:19350" rtmfp="${ADAPTOR.HOSTPORT}">${ADAPTOR.HOSTPORT}</HostPort>

    <HostPort>999.999.999.001:1935,443</HostPort>

      <HostPort>999.999.999.002:1935,443</HostPort>

      <HostPort>999.999.999.003:1935,443</HostPort>

    it appears now that rtmp works.

    Now...i had made these settings originally to match and work like our old server.

    on newer installs... do we need to fully fill in each of the hostport entry lines... or is there key information I didn't have in my entries that prevented them from working without the  line i had commented out?

    Known Participant
    May 16, 2014

    FYI, when i look at the apache logs for one of the vhosts when i hit it to try and bring up either the single or multiple bitrate stream from index.html, i get this.

    [Fri May 16 09:15:54 2014] [error] (OS 10061)No connection could be made because the target machine actively refused it.  : proxy: HTTP: attempt to connect to 127.0.0.1:1935 (localhost) failed

    [Fri May 16 09:15:55 2014] [error] (OS 10061)No connection could be made because the target machine actively refused it.  : proxy: HTTP: attempt to connect to 127.0.0.1:1935 (localhost) failed

    [Fri May 16 09:15:55 2014] [error] ap_proxy_connect_backend disabling worker for (localhost)

    [Fri May 16 09:15:55 2014] [error] proxy: HTTP: disabled connection for (localhost)

    [Fri May 16 09:15:55 2014] [error] proxy: HTTP: disabled connection for (localhost)