Skip to main content
Known Participant
November 11, 2006
Question

Begginer problem??

  • November 11, 2006
  • 17 replies
  • 1318 views
having trouble with FMS2. Done everything like in documentation, Menagement console is working, but any sample aplication wont connect to server. Keep getting:

NC.onStatus> info.code: NetConnection.Connect.Rejected
NC.onStatus> info.code: NetConnection.Connect.Closed

Tryed everything, but it seems something bad is going on.

I'm developing and running FMS on the same machine.

Here is a core log:

"#Version: 1.0
#Start-Date: 2006-11-11 17:09:07
#Software: Macromedia Flash Media Server 2.0.3 r68
#Date: 2006-11-11
#Fields: date time x-pid x-status x-ctx x-comment
2006-11-11 17:09:07 3868 (i)2581237 Starting admin app on core (3868). -
2006-11-11 17:09:07 3868 (i)2581238 Core (3868) connecting to admin. -
2006-11-11 17:09:07 3868 (i)2581231 Core (3868) connected to admin. -
2006-11-11 17:09:07 3868 (i)2581234 Core (3868) connection to admin accepted. -
2006-11-11 17:09:07 3868 (i)2581246 Core (3868) sending register cmd to edge. -
2006-11-11 17:09:07 3868 (w)2631008 Asynchronous I/O operation failed (Failed to attach to completion port: The parameter is incorrect. 87). -
2006-11-11 17:13:01 3868 (w)2631008 Asynchronous I/O operation failed (Failed to attach to completion port: The parameter is incorrect. 87). -
2006-11-11 17:14:08 3868 (i)2581247 Core (3868) disconnected from edge. -
2006-11-11 17:14:08 3868 (i)2581233 Core (3868) disconnecting from admin. -
2006-11-11 17:57:48 1716 (i)2581247 Core (1716) disconnected from edge. -
#End-Date: 2006-11-11 17:58:09"

Here is the edge log:

"#Version: 1.0
#Start-Date: 2006-11-11 18:39:17
#Software: Macromedia Flash Media Server 2.0.3 r68
#Date: 2006-11-11
#Fields: date time x-pid x-status x-ctx x-comment
2006-11-11 18:39:12 2084 (w)2581201 No primary license key found. Switching to Developer Edition. -
2006-11-11 18:39:13 2084 (i)2631174 Listener started ( _defaultRoot__edge1 ) : 19350 -
2006-11-11 18:39:14 2084 (i)2631174 Listener started ( _defaultRoot__edge1 ) : 1935 -
2006-11-11 18:39:17 2084 (i)2581252 Registering core (2100). -
2006-11-11 18:40:31 2084 (i)2631213 Connection rejected by server. Reason : (_defaultRoot_, _defaultVHost_) : Application (localhost) is not defined. -
2006-11-11 18:40:31 2084 (w)2641213 Connection rejected by server. Reason : [ Server.Reject ] : (_defaultRoot_, _defaultVHost_) : Application (localhost) is not defined. -
2006-11-11 18:54:50 2084 (i)2631213 Connection rejected by server. Reason : (_defaultRoot_, _defaultVHost_) : Application (localhost) is not defined. -
2006-11-11 18:54:50 2084 (w)2641213 Connection rejected by server. Reason : [ Server.Reject ] : (_defaultRoot_, _defaultVHost_) : Application (localhost) is not defined."

My configuration is:
win xp 64bit
AMD Athlon 64 X2 Dual
2 GB of ram

Eny help would be highly appreciated......excuse any spelling or gramar erroes:)
    This topic has been closed for replies.

    17 replies

    rjanmaAuthor
    Known Participant
    November 14, 2006
    Hi Jay, since this is a test server an extra "t" solves everything for me.

    If it is a firewall issue why it's not working with firewall off? Maybe it's a antyvirus issue...

    When i first encountered this problem I tryed these "common" things..it didnt worked...than I start to worry......anyway thanks

    The important thing is that I can test applcations now.

    regards
    Marek
    rjanmaAuthor
    Known Participant
    November 13, 2006
    OK, thanks all for effort, but I manged to find the answer....

    And it's to damn simple:)
    Insted of "rtmp://etc...." just use "rtmpt://etc...." just one extra "t" at the end of "rtmp", ha ha.......
    November 14, 2006
    Well... adding the extra "t" didn't actually fix anything, it just used a different means of connecting to the server.

    By using rtmpt, you're "tunneling", or wrapping your rtmp packets in http headers. This isn't a bad thing per se, but performance suffers a bit when using rtmpt (as opposed to rtmp).

    I have the feeling this is a firewall issue. Perhaps you need to give FMS permission to make connections on port 1935.
    rjanmaAuthor
    Known Participant
    November 13, 2006
    still looking for solution.......feel free to participate:)
    rjanmaAuthor
    Known Participant
    November 13, 2006
    still looking for solution.......feel free to participate:)
    rjanmaAuthor
    Known Participant
    November 12, 2006
    still looking for solution.......feel free to participate:)
    rjanmaAuthor
    Known Participant
    November 12, 2006
    Hi MIBtwo,

    no,no.no nothing.
    It creates an instance of application but that's about is than I'm rejected and console shows 0 clients.

    When I use "rtmp:/livecast" or "rtmp://localhost/livecast" or "rtmp://localhost:1935/livecast" connection string I get this in the core.log:
    - Asynchronous I/O operation failed (Failed to attach to completion port: The parameter is incorrect. 87).

    When I use "rtmp:/localhost/livecast" or "rtmp:/livecast:1935" or "rtmp:/localhost:1935/livecast" I get this in the edge.log:
    -Connection rejected by server. Reason : (_defaultRoot_, _defaultVHost_) : Application (localhost) is not defined.

    I gues, no future for me.......

    thx
    Marek
    Inspiring
    November 12, 2006
    Hi marek (rjanma),

    you are right, the red/green change signalizes, that your connection is refused. What does the Management Consoles Applikation or Systemlog say ? Any output ?

    A simple piece of client AS code without using components is :

    nc = new NetConnection;
    nc.onStatus = function (info) {
    trace("The connection code is : " +info.code);
    };
    nc.connect("rtmp://localhost/test_app");

    this simply tries to connect to an application instance called test_app and returns the connection state.

    Just type this in frame 1 of a newly created flashfile, create the test_app directory in the FMS application directory. Put an empty main.asc therein, too.
    !! Shutdown FMS and start it new before you try to test your new test_app !!

    Hope this is helpfull

    Regards MIBtwo

    rjanmaAuthor
    Known Participant
    November 12, 2006
    Hi MIBtwo,
    first I wish to thank you for your dedication:)

    I see some progres now but I would like you to clarify it to me.

    Light goes green for a second and then red....so I assumed that I have the same problem (green for trying to connect and red when rejected), but than I'm opening a Management console and for the firs time I'm seeing in the application list one application instance that is not created by me manually:)

    So tell me, is it ok now or not, and is there a peace of code that is not using these components which will give me a "onStatus" message saying that I'm connected for sure?

    Regards
    rjanma
    Inspiring
    November 12, 2006
    ...another good (even if older ressource) can be found here.

    http://www.adobe.com/devnet/flashcom/articles/first_comm_app.html

    Peldi wrote a very good and easy to understad guide for a first application. I bet it is much better than my last post....................
    It refers to FCS 1.x and Flash MX, but the things did not change dramatical.
    Just one hint : Deploy your application for Flash Player 6 with Actionscript 1.0, the Communication Components (you can use those found here:
    http://www.adobe.com/devnet/flashmediaserver/articles/components.html ) are not "up-to-date", but will work for the first steps.

    Again, this is only meant to get some basic ground to investigate your problem. If those simple applications work, your server is ok....and that's what is to find out.

    Cheers

    MIBtwo
    Inspiring
    November 12, 2006
    Hello again marek,

    by checking again your logfiles I do assume the error "Connection rejected by server. Reason : (_defaultRoot_, _defaultVHost_) : Application (localhost) is not defined" is a direct hint to a malformed rtmp adress.This is based on how a rtmp adress can be written -> rtmp:/application_dir and rtmp://hostname_or_ip[:port]/application_dir. First notation can ONLY be used if you start your application from a local source and FMS is installed on the same machine. Second notation can be used allways, even if you work only local; so it is usualy the best solution. The log entry tells, that FMS looks for an application called "localhost". That all looks a bit to me, that the rtmp definition you use is wrong, because the server tries to parse it and struggels.
    Please do the following :
    1. Take care that you always define the rtmp-connection in this schema : rtmp://localhost/application_directory
    2. Assure that "application_directory "exists in your FMS /applications/ directory (e.g. C:\program files\Macromedis\Flash Media Server2\applications\application_directory)
    3. Take care, that "Everybody" has write permission in this directory
    4. Allways create a main.asc including a load("components.asc") statement and place it in the servers application/application_directory
    5. now create a VERY simple application, containing only the "simple connect "and the "connection light" component
    6. Name them conn_mc and light_mc.
    7. Choose the simple connect component, go to its parameters and specify the following :
    Application Directory : rtmp://localhost/application_directory (watch exactly how it is written !!) and
    Communication components : light_mc ( you must click the "[ ]", then the "+" Sign, than you can populate the list with light_mc). Save the fla under a nice name.
    8. Now test your application. If it works the conn light turns to green
    9. Check with the Management console, if errors occure.

    I know, this application is primitive, but it will show if things go wrong or right. In fact it is that simple that nearly nothing can go wrong

    Your ADSL-Router doesn't play a role as long as you have the calling swf and FMS on the same machine; and this is given as long as you refer to "localhost"

    The management console can not be used to configure FMS, it is used to monitor it in the most cases, but not to configure FMS.....

    Please post if that worked or if the problem still persists.

    Greets

    MIBtwo