Adobe Media Server (AMS / FMS) and firewalls
This documents is my personal notes on how to get issue resolved with Adobe Media Server (AMS) and firewalls. This document is going to be a work in progress.
Sometimes AMS is not working under firewalls. By default AMS is configured to use port 1935, however in cases where that port is closed server will be using port 80. These ports can be configured. It seems that in cases where you use software that uses port 80 and port 1935 is closed than AMS will fail silently. Below is my notes and ways to diagnose and solve issues with firewalls and ports. I figured I'll port it under gist - I am sure it will be useful to someone one day.
FMS server can be set easily by configuring EC2 instance of 5.0.1 or any other version you pick. The Amazon FMS server will create the AMS root home here: mnt/webroot
1st SSH the AMS server:
ssh -i [pem key] root@[Amazon public DNS]
The first step is to copy the video player sample project:
cp -r /opt/adobe/ams/samples/videoPlayer /mnt/webroot
http://[Amazon public DNS]/videoPlayer/videoplayer.html
At the stream URL replace: localhost with public DNS and play stream:
rtmp://[Amazon public DNS]/vod/mp4:sample1_500kbps.f4v
Check that port 80/1935 is working:
rtmp://[Amazon public DNS]:80/vod/mp4:sample1_500kbps.f4v
In case port 80 is not working, you can check if ports are open on your box: http://www.therealtimeweb.com/index.cfm/2004/10/2/fms-port-tester?CFID=2659284&CFTOKEN=47184151
Than you can also check if ports are open on application: http://www.jakehilton.com/?q=node/43
In my case I see that Apache is interfering with AMS and blocking connection. Next step would be to use Wireshark http://www.wireshark.org/. Wireshark requires X11 on my OS,
- I needed to install XQuartz > than run this command:
export DISPLAY=:0
After than open Wireshark in command line:
/Applications/Wireshark.app/Contents/MacOS/Wireshark
In Wireshark, you can than capture the interface and hit start. [more to come]
Apparently AMS is not playing nicely when port 80 is in use locally. This can be a result of Apache running, team viewer etc. In my case Apache was running and once I pointed it to a different port by changing "httpd.conf" to port 81:
Listen 81
You can than block port 1935 (command must be typed twice):
sudo ipfw add 1 deny tcp from any to any 1935 out
sudo ipfw add 1 deny tcp from any to any 1935 out
Than you can test again the FMS communication via url to see that port 80 works when port 1935 is closed; http://[Amazon public DNS]/videoPlayer/videoplayer.html
link to test: rtmp://[Amazon public DNS]:80/vod/mp4:sample1_500kbps.f4v
Return to default and remove blocked ports:
sudo ipfw -f flush