Prerequisite knowledge    Required products    
Some experience working with Flash Player, Adobe Media Server, and either Windows or Linux will help you make the most of this article.

Additional Required products

User level    
If you are new to Adobe Media Server, you may encounter connection issues while using the server that are easy to resolve, but nevertheless puzzling for a beginner. This article covers several common connection issues and provides ways to resolve these issues.
On the Adobe Media Server user forum, common comments include "I need help in getting started", "My connections are not going through", and "My connections fail". I thought it would be helpful to document the most common issues beginners generally face when getting started with Adobe Media Server.
Note: This article does not cover Real Time Media Flow Protocol (RTMFP).  Look for a future article for issues specific to this protocol.
Here are the most common connection issues that are covered in this article:
  • The Adobe Media Server service is in a stopped state
  • A firewall is blocking the connection
  • Issues with port binding
  • Issues with Flash Player security settings

Server in stopped state

Though ensuring Adobe Media Server is running may seem obvious, it is a surprisingly common issue. When installing Adobe Media Server, some users opt to not start the server after installation. Others opt to not automatically start Adobe Media Server after each machine restart.
So, the first thing to verify is that your server is running and ready to accept connections.
Verifying the server is running on Windows
Follow these steps to see if the server is running on Windows:
1.    Open Control Panel > Administrative Tools > Services.
2.    Locate the Adobe Media Server service in the list of services. (If you are using Flash Media Server 4.5 or previous versions, locate Flash Media Server instead.)
3.    Make sure the Status of the service is Started. This indicates your server is up and running.
Verifying the server is running on Linux
Use the following command to see if the server is running on Linux:
ps –e | grep ams
If you are using Flash Media Server 4.5 or previous versions, use the following command instead:
ps –e | grep fms
If the results from the command include processes named amsmaster and amsedge (or fmsmaster and fmsedge for Flash Media Server), then your server is up and running.
Starting the server
If you determine that your server is not running, you can start in manually.
On Windows, under Control Panel > Administrative Tools > Services, select the Adobe Media Server (AMS) service and click Start.
On Linux, change to the AMS install directory (that is, type cd followed by the path to the directory where Adobe Media Server is installed) and then run the following command:
$ ./server start
If the server does not start, there is likely a problem with the configuration files located in <installdir>/conf folder. There are host of files like Server.xml,Adaptor.xml,Vhost.xml, Application.xml. You can open the configuration files in an XML Editor (for example, a browser), to verify that the XML file is well formed. If you recently made changes to a configuration, you may want to revert to a saved version of the file, or check the changes against the documentation for misspellings.
Also, check the diagnostic logs of Adobe Media Server located in <AMS Directory>/logs, specifically the master.00.log and edge.00.log files. These will provide information that you can use to understand why the server is not starting up.

Firewall blocking the connection

Firewalls configured to protect systems from malicious external traffic may also effect legitimate Real Time Messaging Protocol (RTMP) traffic (usually inbound traffic, but in some cases outbound as well). If you suspect that a firewall may be affecting Adobe Media Server connections, make sure that TCP traffic on port 1935 or port 80 is allowed. Port 1935 is the default for RTMP traffic, and port 80 is another commonly used alternative for HTTP.
Note: Though it’s easy to turn off the firewall completely, this is not recommended for obvious security reasons.
If you’re using Windows Firewall, see Common Troubleshooting Situations using Windows Firewall with Advanced Security for information on configuring the firewall.
If you’re using Netfilter on Linux, see the CentOS / Redhat Iptables Firewall Configuration Tutorial
If you’re using another firewall, refer to its documentation for more details.
Note: Some firewalls can be set up to block not only ports but also types of traffic by analyzing the traffic at the packet level. Real Time Messaging Protocol Tunneled (RTMPT) can be used in these situations.
Testing your firewall with telnet
After making a configuration change, you can use a telnet client to quickly determine if a firewall is still blocking access to Adobe Media Server, by attempting to connect to the port that the server is using.
For example, on Linux you can use the following command:
telnet <IP address of Adobe Media Server machine> 1935
(Replace 1935 in the command above with another port number if your server is not using the default port.)
If the firewall is configured to allow RTMP traffic on that port, telnet will connect successfully.

Port binding issues

If your server is running and you know the firewall is not causing problems (perhaps because you’ve disabled it completely for a short time), but you’re still having difficulty connecting to Adobe Media Server, then you may have a port binding issue. In some cases the  AMSEdge process is not able to bind to port 1935 or port 80 (or both) because they are already being used by another application or processes.  Permission misconfiguration can also causes port binding issues.
Examine the master.00.log and see if Edge was able to successfully bind to port 1935 and the Apache HTTP Server to port 80.
Note: From Flash Media Server 4.5.1 onwards, Apache now listens on port 80 instead of Adobe Media Server in the preferred installation workflow. Apache is front-facing and redirects RTMPT traffic to Adobe Media Server.
In some cases port 1935 is successfully bound by Edge (AMS listener process) but port 80 cannot be bound by Apache. In these situations, RTMP traffic will not be affected but attempts to make an RTMPT connection will fail.
If you suspect port binding issues, try to determine what other process may be using port 1935 or port 80. You can use the netstat command see which processes are bound to which ports. You can then decide if you want to terminate the process that is holding on to a port needed by Adobe Media Server.

Flash Player security settings

If you have created your own SWF that connects to Adobe Media Server, the SWF must be in a trusted location. By default, Flash Player security does not allow SWFs to connect to the Internet. So, ensure that you place your SWF in a trusted location or add the location of your SWF to the list of trusted locations using the Global Security Settings panel of Flash Player. For more details, see Global security settings for content creators.

Valid connection rejections

Connection failures—in which a connection to Adobe Media Server cannot be established due to one of the reasons already covered—are distinct from connection rejections. Connections may be rejected as the result of security measures set up in Adobe Media Server or by network administrators:
  • Connection rejected due to crossdomain.xml – You might be trying to connect to Adobe Media Server from a domain that is not allowed by crossdomain.xml.
  • Connection rejected due to an authentication schemeAn administrator might have set up the Access adaptor to intercept connections, or some other server-side logic may be set up to authenticate each connection. In these cases, if you are trying to connect without sending the required authentication credentials your connection will be rejected.
  • Connection rejected due to SWF verification If your Adobe Media Server has SWF Verification enabled and the connecting SWF file is not SWF configured via SWF verification at the server end, then the connection will be rejected due to a SWF Mismatch error.
  • Non-standard portsOf course, it is possible to configure Adobe Media Server to use ports other than 1935 and 80. By default, Flash Player will only check these ports.  If Adobe Media Server or Apache are configured to use non-standard ports, then you will need to make changes to the connection URI to explicitly specify the ports being used.

Where to go from here

To summarize, the next time you encounter connection issues with Adobe Media Server try these steps to troubleshoot:
  1. Make sure the server is up and running
  2. Make sure you have made the required changes to your firewall to allow RTMP (and RTMPT if needed) traffic over needed ports
  3. Make sure Adobe Media Server is successfully binding to the correct ports
  4. Make sure you have configured Flash Player security settings to allow your SWF to communicate externally
I have tried to cover the most likely causes of connection issues.  If you notice anything missing in this article, please post comments. For more on getting started with Adobe Media Server see Getting started streaming media.