Running FreeSwitch as Windows Service

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Running FreeSwitch as Windows Service

Adelia C.
Hello,

I am building FreeSwitch through VS 2010 (not VC++ Express) and I generate FreeSwitchConsole.exe as a console application. No FreeSwitch.exe is generated.

FreeSwitchConsole runs fine as an application but I need to run the SW as a service.

I installed Freeswitch as a local service that calls FreeSwitchConsole.exe, and this is the output of "sc qc FreeSWITCH":

C:\FreeSWITCH>sc qc FreeSWITCH
[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: FreeSWITCH
        TYPE               : 10  WIN32_OWN_PROCESS
        START_TYPE         : 2   AUTO_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : C:\FreeSWITCH\FreeSwitchConsole.exe
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : FreeSWITCH
        DEPENDENCIES       :
        SERVICE_START_NAME : LocalSystem


Trying to start FreeSwitch as a service results in  Error 1053 Timeout - Event Viewer is : Timeout (30000 milliseconds) waiting for the FreeSWITCH service to connect.

Or:
C:\FreeSWITCH>net start freeswitch
The service is not responding to the control function.

Is it because I am trying to start a console application as a service?

Do I need to have a FreeSwitch.exe and if so, how do I build it? Do I need to create a Windows Service wrapper project?

I tried using winserv (supposed to start console apps as service), with same result:
C:\FreeSWITCH>..\tools\winserv\winserv start FreeSwitch
ERROR 1053: The service did not respond to the start or control request in a timely fashion.

What am I missing?

Thank you.
A.C.


FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Re: Running FreeSwitch as Windows Service

Peter Olsson
Remove the service again, and the execute FreeSwitchConsole.exe -install. And try again

/Peter

----- Reply message -----
Från: "Adelia C." <[hidden email]>
Datum: ons, okt 19, 2011 18:49
Rubrik: [Freeswitch-users] Running FreeSwitch as Windows Service
Till: "[hidden email]" <[hidden email]>

Hello,

I am building FreeSwitch through VS 2010 (not VC++ Express) and I generate FreeSwitchConsole.exe as a console application. No FreeSwitch.exe is generated.

FreeSwitchConsole runs fine as an application but I need to run the SW as a service.

I installed Freeswitch as a local service that calls FreeSwitchConsole.exe, and this is the output of "sc qc FreeSWITCH":

C:\FreeSWITCH>sc qc FreeSWITCH
[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: FreeSWITCH
        TYPE               : 10  WIN32_OWN_PROCESS
        START_TYPE         : 2   AUTO_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : C:\FreeSWITCH\FreeSwitchConsole.exe
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : FreeSWITCH
        DEPENDENCIES       :
        SERVICE_START_NAME : LocalSystem


Trying to start FreeSwitch as a service results in  Error 1053 Timeout - Event Viewer is : Timeout (30000 milliseconds) waiting for the FreeSWITCH service to connect.

Or:
C:\FreeSWITCH>net start freeswitch
The service is not responding to the control function.

Is it because I am trying to start a console application as a service?

Do I need to have a FreeSwitch.exe and if so, how do I build it? Do I need to create a Windows Service wrapper project?

I tried using winserv (supposed to start console apps as service), with same result:
C:\FreeSWITCH>..\tools\winserv\winserv start FreeSwitch
ERROR 1053: The service did not respond to the start or control request in a timely fashion.

What am I missing?

Thank you.
A.C.
!DSPAM:4e9efdb732761275568181!


FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Re: Running FreeSwitch as Windows Service

Adelia C.
Thank you, this worked.

> From: [hidden email]

> To: [hidden email]
> Date: Wed, 19 Oct 2011 19:26:07 +0200
> Subject: Re: [Freeswitch-users] Running FreeSwitch as Windows Service
>
> Remove the service again, and the execute FreeSwitchConsole.exe -install. And try again
>
> /Peter
>
> ----- Reply message -----
> Från: "Adelia C." <[hidden email]>
> Datum: ons, okt 19, 2011 18:49
> Rubrik: [Freeswitch-users] Running FreeSwitch as Windows Service
> Till: "[hidden email]" <[hidden email]>
>
> Hello,
>
> I am building FreeSwitch through VS 2010 (not VC++ Express) and I generate FreeSwitchConsole.exe as a console application. No FreeSwitch.exe is generated.
>
> FreeSwitchConsole runs fine as an application but I need to run the SW as a service.
>
> I installed Freeswitch as a local service that calls FreeSwitchConsole.exe, and this is the output of "sc qc FreeSWITCH":
>
> C:\FreeSWITCH>sc qc FreeSWITCH
> [SC] QueryServiceConfig SUCCESS
>
> SERVICE_NAME: FreeSWITCH
> TYPE : 10 WIN32_OWN_PROCESS
> START_TYPE : 2 AUTO_START
> ERROR_CONTROL : 1 NORMAL
> BINARY_PATH_NAME : C:\FreeSWITCH\FreeSwitchConsole.exe
> LOAD_ORDER_GROUP :
> TAG : 0
> DISPLAY_NAME : FreeSWITCH
> DEPENDENCIES :
> SERVICE_START_NAME : LocalSystem
>
>
> Trying to start FreeSwitch as a service results in Error 1053 Timeout - Event Viewer is : Timeout (30000 milliseconds) waiting for the FreeSWITCH service to connect.
>
> Or:
> C:\FreeSWITCH>net start freeswitch
> The service is not responding to the control function.
>
> Is it because I am trying to start a console application as a service?
>
> Do I need to have a FreeSwitch.exe and if so, how do I build it? Do I need to create a Windows Service wrapper project?
>
> I tried using winserv (supposed to start console apps as service), with same result:
> C:\FreeSWITCH>..\tools\winserv\winserv start FreeSwitch
> ERROR 1053: The service did not respond to the start or control request in a timely fashion.
>
> What am I missing?
>
> Thank you.
> A.C.
> !DSPAM:4e9efdb732761275568181!
>
>
> FreeSWITCH-users mailing list
> [hidden email]
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org


FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Problems loading managed dll

Adelia C.
In reply to this post by Peter Olsson
Out of my 3 VMs (Windows Server 2003), one fails to load my managed dll.

Bad server:
[ALERT] switch_cpp.cpp:1197 Exception loading C:\FreeSWITCH\mod\managed\MyManagedApp.dll: System.InvalidCastException: Unable to cast transparent proxy to type 'FreeSWITCH.PluginManager'.
   at FreeSWITCH.Loader.loadFile(String fileName)

Good servers:
[NOTICE] switch_cpp.cpp:1197 Loaded App MyManagedApp.Handle, aliases 'MyManagedApp.Handle, Handle', into domain MyManagedApp.dll_1.

All seems equal, I am running the same code, under the same "C:\FreeSWITCH" location on all servers. No host specific hard codings.

Please help.

Thank you.
A.C.


FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Problems loading managed dll

Adelia C.
In reply to this post by Peter Olsson
Out of my 3 VMs (Windows Server 2003), one fails to load my managed dll.

Bad server:
[ALERT] switch_cpp.cpp:1197 Exception loading C:\FreeSWITCH\mod\managed\MyManagedApp.dll: System.InvalidCastException: Unable to cast transparent proxy to type 'FreeSWITCH.PluginManager'.
   at FreeSWITCH.Loader.loadFile(String fileName)

Good servers:
[NOTICE] switch_cpp.cpp:1197 Loaded App MyManagedApp.Handle, aliases 'MyManagedApp.Handle, Handle', into domain MyManagedApp.dll_1.

All seems equal, I am running the same code, under the same "C:\FreeSWITCH" location on all servers. No host specific hard codings.

Please help.

Thank you.
A.C.


FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Re: Problems loading managed dll

Jeff Lenk
There is not enough information given here to determine what may be wrong. Do you you have dependencies missing? Do all systems have the same Framework loaded?