Skip to main content
Participant
May 11, 2007
Question

NetConnection.Connect.Rejected in FMS 2

  • May 11, 2007
  • 6 replies
  • 7698 views
I want to create Audio/video chat application.
I have FMS 2.0.4 and XAMMP 1.6 installed on my computer locally.
i use the following code to test a connection to the FMS:

conn = new NetConnection();
conn.connect("rtmp:/localhost/my_app");
conn.onStatus = function(info) {
trace ("Level: "+info.level+" Code: "+info.code);
};

but it seems it cannot establish a connection to the FMS server and
returned the following errors:

Level: error Code: NetConnection.Connect.Rejected
Level: status Code: NetConnection.Connect.Closed

tried these other codes too on the connect function:

conn.connect("rtmp://localhost/my_app");
conn.connect("rtmp://127.0.0.1/my_app");
conn.connect("rtmp:/127.0.0.1/my_app");
conn.connect("rtmp:/my_app");

but still no luck.
What seems to be the problem in my configuration?
By the way, I tried to disable the XAMMP but stll it cannot establish a connection?
Tried to run it in macromedia flash 8 using alt+enter and through the
webserver using the publish html and swf files but still the same.

Ive been working on this for days.
Im desperate,i need to start working on the application already.
Somebody please help..
tnx..
    This topic has been closed for replies.

    6 replies

    April 9, 2009

    THANK YOU FOR THIS POST!!!   I WAS HAVING THE SAME PROBLEM AND JUST FIXED IT BY CHANGING TO "rtmp:/app_name"!!!

    Ben

    Participant
    January 13, 2009
    I have a similar problem. I will get the Connect.Rejected after ~10 minutes of streaming from a server. Everything is fine until ~10min into the streaming, my client receives the reject packet and the server terminates the tcp connection. I do not have any trace log of the server since it is a third party server. Are there anything I can do on the client side to inform the server to do the streaming indefinitely or until the client stop? Any pointers would be greatly appreciated. Thanks.
    toqzAuthor
    Participant
    May 21, 2007
    It was the nod32 i guess.. thanks chapel21.
    All is working now with "rtmp:/app_name"
    since i removed my nod32.

    it is now working in the network too.
    thanks u all guyz . ^_-

    Participant
    April 10, 2008
    Help with this pls
    Connecting to the video server...
    >>The client does not have permission to connect to the application, or the application expected different parameters from those that were passed.
    >>The connection was closed successfully
    Participant
    May 16, 2007
    I have created a application using media server. It is working properly in our intranet. We are trying to access from out side out network. The http link is accessible. But the server connection is failed. It is not happening while running through internet.

    Please can any one explain what are the settings needs to be done for external access?

    Advance Thanks!

    ANANTH
    Participant
    May 25, 2007
    Flash_Ananth,

    Did you ever get an answer to your question about accessing FMS outside your network? I'm experiencing the same problem.

    Cheers!
    May 14, 2007
    To clarify... the extra "t" means "tunneling". When tunneling, the rtmp packets are wrapped in http headers. When tunneling, speed and performance suffer a bit.

    Typically, when tunneling, you'd use port 80. In most cases the firewall is simply blocking port 1935, in which case it wouldn't matter if you use rtmp or rtmpt over port 80.
    Participating Frequently
    May 13, 2007
    i had this problem too, in fact i had this problem right after a clean install of the product. i did some research online and found that this is not uncommon. unfortunately, the solution, while easy, is hard to find.

    Basically you'll want to use the following syntax:

    conn.connect("rtmpt://localhost/my_app");
    conn.connect("rtmpt:/my_app");

    If these do not work, which it did not for me, i found success when i also included the port number as:

    conn.connect("rtmpt://localhost:1935/my_app");

    I have no idea what the extra t at the end means, but my understanding is that this is the protocol used when behind a firewall. apparently a variety of services like mcafee, norton, windows firewall, etc. all block these requests unless you are using rtmpt.

    also note that the single slash is used when the domain/server is the localserver. e.g. rtmpt:/my_app is the same as rtmpt://localhost/my_app. however, if these don't work as i mentioned above you and must include the port number, then only rtmpt://localhost:1935/my_app can be used.

    let me know if this works for you as i'm curious how successful this solution is.
    Participating Frequently
    May 14, 2007
    also be sure to check your log files (or you can go in through the admin console and view the server log).

    with this particular error, i personally had:

    "Asynchronous I/O operation failed (Failed to attach to completion port: The parameter is incorrect."

    if you do a search on this error you will find not so much information. i was able to get my application working using the rtmpt protocol, but now, after coming back to work and booting my machine, it's not working again and i have the same error.

    things i've tried:

    1) i shut down all anti-virus and firewall applications and services
    2) run netstat -a to see what is running and what ports are being used
    3) try specifying a different port for FMS to run on (default = 1935). this can be changed via $InstallDirectory$\conf\fms.ini (in windows). Inside the file search for ADAPTOR.HOSTPORT and change the value to whatever port you want to try.
    4) try variations of the url e.g. rtmp:/ rtmpt:/ rtmpt://localhost rtmpt://localhost:1935 etc.
    5) make sure you don't have programs like netlimiter installed as this is a known app that can cause problems w/ FMS by intercepting system calls on the machine.

    If you do find something that works, please contribute to this thread as it could become valuable for others having these issues.
    toqzAuthor
    Participant
    May 15, 2007
    Finallyyyy! Whewww

    got it to work on con = ("rtmpt://localhost:1935/app_name");
    thanks to all you guys. ^_^.

    Guess something is blocking my port 1935.