Hello,

the log messages show only that kamailio is already running.

If you do only 'service kamailio stop' what happens?

The new init.d script is creating /var/run/kamailio if it doesn't exist and sets chown to it. So not really affecting how kamailio is stopped or started.

Cheers,
Daniel

On 05.04.17 15:25, Ginhoux, Patrick wrote:

Hi,

 

New update.

 

I attempt to stop kamailio with the ‘service kamailio stop command’ but it doesn’t stop:

 

[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam

kamailio  1157     1  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1159  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1160  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1161  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1162  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1163  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1164  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1165  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1166  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1167  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1168  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1169  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1170  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1171  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

root      1197  1175  0 15:12 pts/0    00:00:00 grep --color=auto kam

[root@vm-vse02-siprouter2 ~]#

[root@vm-vse02-siprouter2 ~]# service kamailio stop

Stopping kamailio (via systemctl):                         [  OK  ]

 

We can see that kamailio is still running:

 

[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam

kamailio  1157     1  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1159  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1160  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1161  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1162  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1163  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1164  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1165  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1166  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1167  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1168  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1169  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1170  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

kamailio  1171  1157  0 15:10 ?        00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio

root      1238  1175  0 15:17 pts/0    00:00:00 grep --color=auto kam

 

The /var/run/Kamailio folder looks good for the fifo file :

 

[root@vm-vse02-siprouter2 ~]# ll /var/run/kamailio/

total 4

srw------- 1 kamailio kamailio 0 Apr  5 15:10 kamailio_ctl

-rw-r----- 1 kamailio kamailio 5 Apr  5 15:10 kamailio.pid

prwxr-xr-x 1 kamailio kamailio 0 Apr  5 15:10 kamailio_rpc_fifo

 

But then the ‘restart’ command failed :

 

[root@vm-vse02-siprouter2 ~]# service kamailio restart

Restarting kamailio (via systemctl):  Job for kamailio.service failed. See 'systemctl status kamailio.service' and 'journalctl -xn' for details.

                                                           [FAILED]

[root@vm-vse02-siprouter2 ~]#

[root@vm-vse02-siprouter2 ~]# systemctl status kamailio.service -l

kamailio.service - SYSV: Kamailio is a fast, reliable and flexible SIP Server.

   Loaded: loaded (/etc/rc.d/init.d/kamailio)

   Active: failed (Result: exit-code) since Wed 2017-04-05 15:19:09 CEST; 13s ago

  Process: 1256 ExecStart=/etc/rc.d/init.d/kamailio start (code=exited, status=1/FAILURE)

 

Apr 05 15:19:09 vm-vse02-siprouter2 kamailio[1267]: DEBUG: <core> [core/sr_module.c:694]: find_mod_export_record(): find_export_record: found <is_method> in module textops [/usr/lib64/kamailio/modules/textops.so]

Apr 05 15:19:09 vm-vse02-siprouter2 kamailio[1267]: DEBUG: <core> [core/route_struct.c:129]: mk_action(): ACTION_#24 #0/2: 9(9)/ (nil)

Apr 05 15:19:09 vm-vse02-siprouter2 kamailio[1267]: DEBUG: <core> [core/route_struct.c:129]: mk_action(): ACTION_#24 #1/2: 3(3)/ (nil)

Apr 05 15:19:09 vm-vse02-siprouter2 kamailio[1267]: WARNING: <core> [core/cfg.y:3378]: warn_at(): warning in config file //etc/kamailio/kamailio.cfg, line 978, column 6-13: constant value in if(...)

Apr 05 15:19:09 vm-vse02-siprouter2 kamailio[1267]: INFO: <core> [core/sctp_core.c:75]: sctp_core_check_support(): SCTP API not enabled - if you want to use it, load sctp module

Apr 05 15:19:09 vm-vse02-siprouter2 kamailio[1269]: CRITICAL: <core> [core/daemonize.c:345]: daemonize(): running process found in the pid file /var/run/kamailio/kamailio.pid

Apr 05 15:19:09 vm-vse02-siprouter2 kamailio[1256]: Starting kamailio:

Apr 05 15:19:09 vm-vse02-siprouter2 systemd[1]: kamailio.service: control process exited, code=exited status=1

Apr 05 15:19:09 vm-vse02-siprouter2 systemd[1]: Failed to start SYSV: Kamailio is a fast, reliable and flexible SIP Server..

Apr 05 15:19:09 vm-vse02-siprouter2 systemd[1]: Unit kamailio.service entered failed state.

 

Does it help to understand why this happen with the new Kamailio rpm (kamailio-5.0.0-10.1.x86_64)?

 

Cordialement

Patrick GINHOUX


-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com