Debugging and Monitoring Applications > Using onStatus event handlers > Debugging NetConnection.Connect.Failed |
![]() ![]() ![]() |
Debugging NetConnection.Connect.Failed
If a NetConnection.connect
command returns an information object with a code
value of NetConnection.Connect.Failed
, you are unable to establish a connection with the server. Every time you receive this error, ask yourself some standard troubleshooting questions:
![]() |
Are you connecting to a valid application? In other words, is there a subdirectory in the Flash Communication Server applications directory that has the same name as the application? (This is a very common reason for a connection to fail.) |
![]() |
Are you connecting to the right server? |
![]() |
Is the server running? |
![]() |
Are you specifying the protocol (rtmp:) for connecting to the server? |
![]() |
If you are connecting from behind a firewall, are you specifying the correct protocol (rtmpt:)? |
Attempts to connect to the server can also fail if the permissible number of socket connections on either the client or the server machine is at its limit. This limit is dependent on how much physical memory your server has, and how busy the connections are. On Windows systems, the memory for socket connections is allocated out of the non-paged memory, so it cannot be swapped out to a page file. You may see that you reach the maximum limit at different values from time to time as other running programs (such as core OS services) will be competing with yours for space in the non-paged memory pool.
![]() ![]() ![]() |