Hello,
for this specific crash issue, just upgrade to 4.1.3, it should be fixed
there.
For automatic restart, look at 'monit' tool - open source, available in
most distros. It can supervise processes by pid and restart, and, iirc,
in its docs the should be an entry for openser. Anyhow, is rather
simple, the basic cfg for kamailio in monit is something like:
check process kamailio with pidfile /var/run/kamailio/kamailio.pid
start program = "/etc/init.d/kamailio start"
stop program = "/etc/init.d/kamailio stop"
if 5 restarts within 5 cycles then timeout
Also, it can do sip keepalives, being able to discover when kamailio is
stuck.
Cheers,
Daniel
On 07/05/14 17:46, JR Richardson wrote:
Hi All,
Just had a strange occurrence where kamailio has been up and running
fine for several months and just died with a strange error:
root@sip-router3:~# kamailio -V
version: kamailio 4.1.1 (x86_64/linux) ac7d55
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2275]: : <core>
[mem/q_malloc.c:468]: qm_free(): BUG: qm_free: freeing already freed
pointer (0x7faf565586d0), called from <core>: mem/shm_mem.c:
sh_realloc(88), first free <core>: mem/shm_mem.c: sh_realloc(88) -
aborting
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2271]: ALERT:
<core> [main.c:775]: handle_sigs(): child process 2275 exited by a
signal 6
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2271]: ALERT:
<core> [main.c:778]: handle_sigs(): core was not generated
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2271]: INFO:
<core> [main.c:790]: handle_sigs(): INFO: terminating due to SIGCHLD
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2279]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2277]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2273]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2272]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2274]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2276]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2278]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2271]: ERROR: ctl
[ctl.c:379]: mod_destroy(): ERROR: ctl: could not delete unix socket
/tmp/kamailio_ctl: Operation not permitted (1)
Not sure what that means, memory leak? I started started it right back
up with no indication of a problem. Running Kamailio for many years,
I have never had an instance of it just shut down before. So I'm
wondering if there are any safe scripts that check the running process
for kamailio and restart if automatically if not running?
I dug around a bit but not seeing any hits for auto start kamailio scripts.
And another question would be if this occurrence of shutting down
should be of concern or not?
Thanks.
JR
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users