How to run opensips in the foreground

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

How to run opensips in the foreground

John Khvatov
Hello!

Can I run opensips in the foreground in "daemon mode" - multiple processes for
each network interface?

I need it to manage the opensips service by upstart [1].

[1] http://upstart.ubuntu.com/

Thanks.
--
John Khvatov

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to run opensips in the foreground

Iñaki Baz Castillo
El Viernes 03 Abril 2009, John Khvatov escribió:
> Hello!
>
> Can I run opensips in the foreground in "daemon mode" - multiple processes
> for each network interface?
>
> I need it to manage the opensips service by upstart [1].
>
> [1] http://upstart.ubuntu.com/

If you set "log_stderror=no" then OpenSIPS output will be logged in the
terminal. But you can close safely this terminal session and OpenSIPS will
remain working.

BTW, which requeriments has upstart?


--
Iñaki Baz Castillo <[hidden email]>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to run opensips in the foreground

John Khvatov
On Fri, Apr 03, 2009 at 08:26:09PM +0200, Iñaki Baz Castillo wrote:
>
> If you set "log_stderror=no" then OpenSIPS output will be logged in the
> terminal. But you can close safely this terminal session and OpenSIPS will
> remain working.
>
> BTW, which requeriments has upstart?

Upstart until release 5.0 doesn't support processes that detach from terminal
(that fork (or fork twice)). Upstart works with opensips if I set "fork=no"
in opensips config. But this way is not suitable for prodaction, right?
There are other ways to run opensips foreground?

--
John Khvatov

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to run opensips in the foreground

John Khvatov
On Fri, Apr 03, 2009 at 11:27:31PM +0400, John Khvatov wrote:

> On Fri, Apr 03, 2009 at 08:26:09PM +0200, Iñaki Baz Castillo wrote:
> >
> > If you set "log_stderror=no" then OpenSIPS output will be logged in the
> > terminal. But you can close safely this terminal session and OpenSIPS will
> > remain working.
> >
> > BTW, which requeriments has upstart?
>
> Upstart until release 5.0 doesn't support processes that detach from terminal
> (that fork (or fork twice)). Upstart works with opensips if I set "fork=no"
> in opensips config. But this way is not suitable for prodaction, right?
> There are other ways to run opensips foreground?
Upstart 0.5, sorry.

--
John Khvatov

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to run opensips in the foreground

Bogdan-Andrei Iancu
In reply to this post by John Khvatov
Hi John,

setting "fork=no" is not an option (you have only one UDP interface, no
TCP, no TLS....)

I think it is an issue with upstart......there are many other apps that
fork at startup...

Regards,
Bogdan

John Khvatov wrote:

> On Fri, Apr 03, 2009 at 08:26:09PM +0200, Iñaki Baz Castillo wrote:
>  
>> If you set "log_stderror=no" then OpenSIPS output will be logged in the
>> terminal. But you can close safely this terminal session and OpenSIPS will
>> remain working.
>>
>> BTW, which requeriments has upstart?
>>    
>
> Upstart until release 5.0 doesn't support processes that detach from terminal
> (that fork (or fork twice)). Upstart works with opensips if I set "fork=no"
> in opensips config. But this way is not suitable for prodaction, right?
> There are other ways to run opensips foreground?
>
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to run opensips in the foreground

Jacek Konieczny
On Mon, Apr 06, 2009 at 07:31:57PM +0300, Bogdan-Andrei Iancu wrote:
> Hi John,
>
> setting "fork=no" is not an option (you have only one UDP interface, no
> TCP, no TLS....)
>
> I think it is an issue with upstart......there are many other apps that
> fork at startup...

And this fork is just workaround for the issues with SysV-init based
systems… The fork is a method to make the init process take care of a
daemon. With upstart (and other supervisors, like e.g. daemon-tools) no
such magic is need (the init process or supervisor starts the daemon
process itself and tries to control it) and the forking only makes
things more difficult.

upstart 0.5 can handle forking daemons, but that is just a workaround.
'Going into background' should be just an option of services.

I would be happy when opensips can properly run in foreground, too.

Greets,
        Jacek

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to run opensips in the foreground

Bogdan-Andrei Iancu
In reply to this post by Bogdan-Andrei Iancu
Hi John,

i'm using monit (see http://mmonit.com/monit/ ) for a long time - quite
nice;

Also you may consider nagios  http://www.nagios.org/

Regards,
Bogdan

>
> John Khvatov wrote:
>> On Mon, Apr 06, 2009 at 07:31:57PM +0300, Bogdan-Andrei Iancu wrote:
>>  
>>> Hi John,
>>>
>>> setting "fork=no" is not an option (you have only one UDP interface,
>>> no  TCP, no TLS....)
>>>
>>> I think it is an issue with upstart......there are many other apps
>>> that  fork at startup...
>>>
>>> Regards,
>>> Bogdan
>>>    
>>
>> Hi Bogdan,
>>
>> Thanks for the reply!
>>
>> I want to do restarting on crash (respawn) for opensips. I don't know
>> another way
>> to do this without upstart. Could you suggest me anything with this
>> issue,
>> please?
>>
>>  
>
>


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to run opensips in the foreground

John Khvatov
Hi Bogdan,

On Mon, Apr 06, 2009 at 10:02:49PM +0300, Bogdan-Andrei Iancu wrote:
> Hi John,
>
> i'm using monit (see http://mmonit.com/monit/ ) for a long time - quite  
> nice;
>
> Also you may consider nagios  http://www.nagios.org/
>
> Regards,
> Bogdan

Thanks.

--
John Khvatov

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users