Tuesday, February 2, 2016

Kamailio 4.3.x Error: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: Permission denied


Kamailio 4.3.x spit below error:
145(29867) INFO:  [main.c:798]: sig_usr(): signal 15 received
43(29765) INFO:  [main.c:798]: sig_usr(): signal 15 received
 2(29724) INFO:  [main.c:798]: sig_usr(): signal 15 received
39(29761) INFO:  [main.c:798]: sig_usr(): signal 15 received
 0(29722) ERROR: ctl [ctl.c:372]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: Permission denied (13)
 0(29722) DEBUG:  [db_pool.c:100]: pool_remove(): removing connection from the pool
 0(29722) DEBUG: tm [t_funcs.c:86]: tm_shutdown(): DEBUG: tm_shutdown : start
 0(29722) DEBUG: tm [t_funcs.c:89]: tm_shutdown(): DEBUG: tm_shutdown : emptying hash table
 0(29722) DEBUG: tm [t_funcs.c:91]: tm_shutdown(): DEBUG: tm_shutdown : removing semaphores
 0(29722) DEBUG: tm [t_funcs.c:93]: tm_shutdown(): DEBUG: tm_shutdown : destroying tmcb lists
 0(29722) DEBUG: tm [t_funcs.c:96]: tm_shutdown(): DEBUG: tm_shutdown : done
 0(29722) ERROR: mi_fifo [mi_fifo.c:294]: mi_destroy(): FIFO stat failed: Permission denied
 0(29722) INFO:  [sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
 0(29722) DEBUG:  [mem/shm_mem.c:232]: shm_mem_destroy(): shm_mem_destroy
 0(29722) DEBUG:  [mem/shm_mem.c:235]: shm_mem_destroy(): destroying the shared memory lock

Solution that worked for me:
chown -R kamailio:kamailio /var/run/kamailio