Skip to main content
Participant
September 5, 2009
Question

it seem a bug in flash server " main.asc is not working well"

  • September 5, 2009
  • 1 reply
  • 5341 views

i did download the latest version of flash media server , but it seam the /live/main.asc did not work at all ,

i did create a main.asc in :

C:\Program Files\Adobe\Flash Media Server 3\applications\live\

to be :

C:\Program Files\Adobe\Flash Media Server 3\applications\live\main.asc

----------------------------------------------------------------------------

now i did add to main.acs this code :

application.onConnect = function(client, name) {
     trace("TRACE -- TRACE -- TRACE -- TRACE -- TRACE -- TRACE");
}

----------------------------------------------------------------------------

as the help files said :

((

The output of the trace() statements used by a main.asc file are sent to a log file, typically:
RootInstall/logs/_defaultVHost_/yourApplicationName/yourInstanceName/application .xx.log
Where yourInstanceName is _definst_ by default, and xx is the instance number, 00 for the most recent log file, 01
for the previous instance, and so forth.
You can view a log file with any text editor.
))

i opened "Flash Media Live Encoder 3" and point the stream to "rtmp://localhost/live/stream" hist start , traming is start well,

i went to the log to see if it true that FMS will write the trace !

C:\Program Files\Adobe\Flash Media Server 3\logs\_defaultVHost_\live\stream\application.00.log

where the "stream" is the the name of the "instance"

i did not found any thing regarding the "trace("TRACE -- TRACE -- TRACE -- TRACE -- TRACE -- TRACE");"


Please advice

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    September 7, 2009

    Very strange coincidence “beshoo_beshoo” , I did register now with adobe forum to report the same problem . as you disciple exactly.

    I did install the linux & windows version , same problem  , the main.asc is totally ignored, I thing we have to debug it , but I did try to activate the “debug” option as help file , but nothing print out to the log !

    I did try “main.asc” or “live.asc” nothing at all .
    I did set the file permeation to “755  nobody “ -- “ in Linux” as far as FMS work with nobody user .

    Nothing at all .

    I think we have to activate some thing in config files to tell FMS to read the main.asc 1st

    Hope flash community well help to solve down this strange problem

    Participating Frequently
    September 7, 2009

    Dear beshoo_beshoo this is my update :

    i told my self let me check the returnd result in fms_adminConsole.htm to see if there is any thing regarding the trace command
    actually there is nothing returned in the fms_adminConsole.htm ,I did check that "the live stream log".

    I did take “trace” command as in your  example , the main.asc is not activated at all , and honestly I don’t know wahy , is there any think I can turn it on to see what is happened , like debugging or some thing to see why the “main.asc” is not loaded at all .

    I did report that to adobe web site but there is no answer .

    Kindly see this :

    I did set in the main.asc this command .

        application.disconnect(application.clients.agent);

    this command will disconnect the FMLE directrly if it connect to the local host to send the stream ,,, nothing happened .

    I did set this code :

    application.onConnect = function(p_client)
    {
    if( (p_client.agent).indexOf("FMLE") == 0 && application.clients.length < 1 )  {
       trace("***********onReject**************")
       application.rejectConnection(p_client);
    }else {
       trace("***********onConnect**************")
       application.acceptConnection(p_client);
    }
    }
    application.onDisconnect = function(p_client)
    {
    if(application.clients.length == 1){
       for (i = 0; i < application.clients.length; i++){
        if( (application.clients.agent.agent).indexOf("FMLE") == 0 )  {
         trace("***********onDisconnect**************")
         application.disconnect(application.clients.agent);
        }
       }
    }
    }

    this code will see there is any one is watching the flash player , if not the FMLE will disconnected form broadcasting , bit nothing happened , it is totally strange why the main.asc is not loaded at all

    Participating Frequently
    September 7, 2009

    PS : the Live log window return :

    Found wildcard (*) entry: disabling authentication for HTML file domains
    Found wildcard (*) entry: disabling authentication for SWF file domains
    Accepted a connection from IP:127.0.0.1

    but not the trace out put !

    and as i told you in my previous reply , if i set any code in teh main.asc , it ignored .

    Strange !