[OpenSIPS-Users] Question about opensips start and stop

Giuseppe Roberti jnod at jnod.org
Sun Dec 7 16:41:57 CET 2008


Hi.

You have to specify a pidfile for every instance with -P option.
So your commands look like that:
opensips -l 192.168.1.109:5030 -f /var/app/config/opensips_1.cfg -P
/var/run/opensips_1.pid
opensips -l 192.168.1.109:5040 -f /var/app/config/opensips_2.cfg -P
/var/run/opensips_2.pid
opensips -l 192.168.1.109:5050 -f /var/app/config/opensips_3.cfg -P
/var/run/opensips_3.pid

And now you can stop the instances with this commands:
kill `cat /var/run/opensips_1.pid`
kill `cat /var/run/opensips_2.pid`
kill `cat /var/run/opensips_3.pid`

mark morreny wrote:
> Hi,
> 
> I am sorry for asking a dumb question here, but I checked all the
> documentation, and still could not find the answer I am looking for.
> 
> I need to be able to run multiple instances of opensips in daemon mode (
> fork = yes ).  It works with these commands here:
> 
> opensips -l 192.168.1.109:5030 -f /var/app/config/opensips_1.cfg
> opensips -l 192.168.1.109:5040 -f /var/app/config/opensips_2.cfg
> opensips -l 192.168.1.109:5050 -f /var/app/config/opensips_3.cfg
> 
> However, when the config files are updated, I would like to do a restart.  I
> tried with
> 
> opensips -l 192.168.1.109:5050 -f /var/app/config/opensips_3.cfg   restart
The restart mean nothing used with opensips command, so it try to start
another opensips instance on that address (that is already used).

> 
> and what I am getting is:
> 
> Dec  6 15:09:56 [10731] ERROR:core:tcp_init: bind(5, 0x7651fc, 16) on
> 192.168.1.109:5050 : Address already in use
> 
> The only solution I can think of is to use kill to individually kill each
> opensips process one by one but it is a very time consuming process.
> 
> Does anyone know of a better way of doing it?
> 
> Thanks for your help.
> 
> Mark

Regards.

-- 
Giuseppe Roberti
<jnod at jnod.org>



More information about the Users mailing list