In my 'kamctlrc' file :
## path to FIFO file for engine RPCFIFO RPCFIFOPATH="/var/run/kamailio/kamailio_rpc_fifo" #RPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In my 'kamailio.cfg' :
!!ifndef DEFINE_FIFO_NAME !!define DEFINE_FIFO_NAME "/var/run/kamailio/kamailio_rpc_fifo" !!endif
modparam("jsonrpcs", "pretty_format", 1) modparam("jsonrpcs", "transport", 2) modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME) modparam("jsonrpcs", "fifo_mode", 0755) modparam("jsonrpcs", "fifo_group", "kamailio") modparam("jsonrpcs", "fifo_user", "kamailio")
kamailio doesn't start. It reports 'Permission denied' :
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: ERROR: jsonrpcs [jsonrpcs_fifo.c:144]: jsonrpc_init_fifo_server(): Can't create FIFO: Permission denied (mode=493) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: CRITICAL: jsonrpcs [jsonrpcs_fifo.c:489]: jsonrpc_fifo_process(): failed to init jsonrpc fifo server Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ALERT: <core> [main.c:741]: handle_sigs(): child process 1138 exited normally, status=255 Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank 4: tm Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -1: tm Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: htable [htable.c:226]: child_init(): rank is (1) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: INFO: <core> [main.c:759]: handle_sigs(): terminating due to SIGCHLD Mar 24 17:31:21 localhost /usr/sbin/kamailio[1139]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -2: kex Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1130@129.227.83.108' Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1137@129.227.83.108' Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: <core> [core/action.c:1656]: run_child_one_init_route(): attempting to run event_route[core:worker-one-init] Mar 24 17:31:21 localhost /usr/sbin/kamailio[1136]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1135]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1134]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1133]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1132]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1131]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1129]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1128]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: ctl [ctl.c:387]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: Permission denied (13) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: jsonrpcs [jsonrpcs_fifo.c:595]: jsonrpc_fifo_destroy(): FIFO stat failed: Permission denied
If I replace the values in the 2 files as appropriate :
In the 'kamctlrc" to RPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In the 'kamailio.cfg" to !!define DEFINE_FIFO_NAME "/tmp/kamailio_rpc_fifo"
Then kamailo starts :
[root@vm-vse02-siprouter1 ~]# ps -ef |grep kam kamailio 1235 1 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1236 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1237 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1238 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1239 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1240 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1241 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1242 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1243 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1244 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1245 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1246 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1247 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1248 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio root 1251 1165 0 17:37 pts/0 00:00:00 grep --color=auto kam
and I can get result from kamctl/kamcmd commands : [root@vm-vse02-siprouter1 ~]# kamctl dispatcher dump which: no gdb in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/) { "jsonrpc": "2.0", "result": { "NRSETS": 1, "RECORDS": [{ "SET": { "ID": 1, "TARGETS": [{ "DEST": { "URI": "sip:cs1-tool-misc.orange-voicemail.net:5060", "FLAGS": "AP", "PRIORITY": 0 } }] } }] }, "id": 1301 } [root@vm-vse02-siprouter1 ~]# kamcmd dispatcher.list { NRSETS: 1 RECORDS: { SET: { ID: 1 TARGETS: { DEST: { URI: sip:cs1-tool-misc.orange-voicemail.net:5060 FLAGS: AP PRIORITY: 0 } } } } }
Now, if I change the fifo patch and name to "/var/run/kamailio/kamailio_rpc_fifo' and apply the following rights on /var/run/ to:
chmod 755 kamalio/ chown + kamailio:kamailio kamailio/
then kamailio starts.
Is there a reason for these results ?
Thanks in advance for your answer.
Cordialement Patrick GINHOUX
Hello,
kamailio should attempt to create the /var/run/kamailio folder if the application is run with enough privileges. However, some operating systems add more constraints on top of the execution user.
What is your OS distro? Do you have selinux, apparmor or other similar tools enabled?
Cheers, Daniel
On 24/03/2017 17:52, Ginhoux, Patrick wrote:
In my ‘kamctlrc’ file :
## path to FIFO file for engine RPCFIFO
RPCFIFOPATH="/var/run/kamailio/kamailio_rpc_fifo"
#RPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In my ‘kamailio.cfg’ :
!!ifndef DEFINE_FIFO_NAME
!!define DEFINE_FIFO_NAME "/var/run/kamailio/kamailio_rpc_fifo"
!!endif
modparam("jsonrpcs", "pretty_format", 1)
modparam("jsonrpcs", "transport", 2)
modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME)
modparam("jsonrpcs", "fifo_mode", 0755)
modparam("jsonrpcs", "fifo_group", "kamailio")
modparam("jsonrpcs", "fifo_user", "kamailio")
kamailio doesn’t start. It reports ‘Permission denied’ :
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: ERROR: jsonrpcs [jsonrpcs_fifo.c:144]: jsonrpc_init_fifo_server(): Can't create FIFO: Permission denied (mode=493)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: CRITICAL: jsonrpcs [jsonrpcs_fifo.c:489]: jsonrpc_fifo_process(): failed to init jsonrpc fifo server
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ALERT: <core> [main.c:741]: handle_sigs(): child process 1138 exited normally, status=255
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank 4: tm
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -1: tm
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: htable [htable.c:226]: child_init(): rank is (1)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: INFO: <core> [main.c:759]: handle_sigs(): terminating due to SIGCHLD
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1139]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -2: kex
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1130@129.227.83.108'
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1137@129.227.83.108'
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: <core> [core/action.c:1656]: run_child_one_init_route(): attempting to run event_route[core:worker-one-init]
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1136]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1135]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1134]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1133]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1132]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1131]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1129]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1128]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: ctl [ctl.c:387]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: Permission denied (13)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: jsonrpcs [jsonrpcs_fifo.c:595]: jsonrpc_fifo_destroy(): FIFO stat failed: Permission denied
If I replace the values in the 2 files as appropriate :
In the ‘kamctlrc” toRPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In the ‘kamailio.cfg” to!!define DEFINE_FIFO_NAME "/tmp/kamailio_rpc_fifo"
Then kamailo starts :
[root@vm-vse02-siprouter1 ~]# ps -ef |grep kam
kamailio 1235 1 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1236 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1237 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1238 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1239 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1240 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1241 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1242 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1243 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1244 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1245 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1246 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1247 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1248 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1251 1165 0 17:37 pts/0 00:00:00 grep --color=auto kam
and I can get result from kamctl/kamcmd commands :
[root@vm-vse02-siprouter1 ~]# kamctl dispatcher dump
which: no gdb in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/)
{
"jsonrpc": "2.0",
"result": {
"NRSETS": 1, "RECORDS": [{ "SET": { "ID": 1, "TARGETS": [{ "DEST": { "URI": "sip:cs1-tool-misc.orange-voicemail.net:5060", "FLAGS": "AP", "PRIORITY": 0 } }] } }]
},
"id": 1301
}
[root@vm-vse02-siprouter1 ~]# kamcmd dispatcher.list
{
NRSETS: 1 RECORDS: { SET: { ID: 1 TARGETS: { DEST: { URI:
sip:cs1-tool-misc.orange-voicemail.net:5060
FLAGS: AP PRIORITY: 0 } } } }
}
Now, if I change the fifo patch and name to “/var/run/kamailio/kamailio_rpc_fifo’ and apply the following rights on /var/run/ to:
chmod 755 kamalio/
chown + kamailio:kamailio kamailio/
then kamailio starts.
Is there a reason for these results ?
Thanks in advance for your answer.
Cordialement
Patrick GINHOUX
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
Hi,
This is the RHEL 7.1 distro, and there is use of selinux, apparmor or other tools.
Are you meaning that the /var/run/ folder would be secured more than other folders?
Cordialement Patrick GINHOUX
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Daniel-Constantin Mierla Envoyé : lundi 27 mars 2017 13:52 À : Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
kamailio should attempt to create the /var/run/kamailio folder if the application is run with enough privileges. However, some operating systems add more constraints on top of the execution user.
What is your OS distro? Do you have selinux, apparmor or other similar tools enabled?
Cheers, Daniel
On 24/03/2017 17:52, Ginhoux, Patrick wrote: In my ‘kamctlrc’ file :
## path to FIFO file for engine RPCFIFO RPCFIFOPATH="/var/run/kamailio/kamailio_rpc_fifo" #RPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In my ‘kamailio.cfg’ :
!!ifndef DEFINE_FIFO_NAME !!define DEFINE_FIFO_NAME "/var/run/kamailio/kamailio_rpc_fifo" !!endif
modparam("jsonrpcs", "pretty_format", 1) modparam("jsonrpcs", "transport", 2) modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME) modparam("jsonrpcs", "fifo_mode", 0755) modparam("jsonrpcs", "fifo_group", "kamailio") modparam("jsonrpcs", "fifo_user", "kamailio")
kamailio doesn’t start. It reports ‘Permission denied’ :
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: ERROR: jsonrpcs [jsonrpcs_fifo.c:144]: jsonrpc_init_fifo_server(): Can't create FIFO: Permission denied (mode=493) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: CRITICAL: jsonrpcs [jsonrpcs_fifo.c:489]: jsonrpc_fifo_process(): failed to init jsonrpc fifo server Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ALERT: <core> [main.c:741]: handle_sigs(): child process 1138 exited normally, status=255 Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank 4: tm Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -1: tm Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: htable [htable.c:226]: child_init(): rank is (1) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: INFO: <core> [main.c:759]: handle_sigs(): terminating due to SIGCHLD Mar 24 17:31:21 localhost /usr/sbin/kamailio[1139]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -2: kex Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1130@129.227.83.108mailto:15b1f0d63a718465-1130@129.227.83.108' Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1137@129.227.83.108mailto:15b1f0d63a718465-1137@129.227.83.108' Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: <core> [core/action.c:1656]: run_child_one_init_route(): attempting to run event_route[core:worker-one-init] Mar 24 17:31:21 localhost /usr/sbin/kamailio[1136]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1135]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1134]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1133]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1132]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1131]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1129]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1128]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: ctl [ctl.c:387]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: Permission denied (13) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: jsonrpcs [jsonrpcs_fifo.c:595]: jsonrpc_fifo_destroy(): FIFO stat failed: Permission denied
If I replace the values in the 2 files as appropriate :
In the ‘kamctlrc” to RPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In the ‘kamailio.cfg” to !!define DEFINE_FIFO_NAME "/tmp/kamailio_rpc_fifo"
Then kamailo starts :
[root@vm-vse02-siprouter1 ~]# ps -ef |grep kam kamailio 1235 1 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1236 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1237 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1238 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1239 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1240 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1241 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1242 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1243 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1244 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1245 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1246 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1247 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1248 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio root 1251 1165 0 17:37 pts/0 00:00:00 grep --color=auto kam
and I can get result from kamctl/kamcmd commands : [root@vm-vse02-siprouter1 ~]# kamctl dispatcher dump which: no gdb in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/) { "jsonrpc": "2.0", "result": { "NRSETS": 1, "RECORDS": [{ "SET": { "ID": 1, "TARGETS": [{ "DEST": { "URI": "sip:cs1-tool-misc.orange-voicemail.net:5060"sip:cs1-tool-misc.orange-voicemail.net:5060, "FLAGS": "AP", "PRIORITY": 0 } }] } }] }, "id": 1301 } [root@vm-vse02-siprouter1 ~]# kamcmd dispatcher.list { NRSETS: 1 RECORDS: { SET: { ID: 1 TARGETS: { DEST: { URI: sip:cs1-tool-misc.orange-voicemail.net:5060 FLAGS: AP PRIORITY: 0 } } } } }
Now, if I change the fifo patch and name to “/var/run/kamailio/kamailio_rpc_fifo’ and apply the following rights on /var/run/ to:
chmod 755 kamalio/ chown + kamailio:kamailio kamailio/
then kamailio starts.
Is there a reason for these results ?
Thanks in advance for your answer.
Cordialement Patrick GINHOUX
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.comhttp://www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
Hello,
as recently as last week, someone encountered an file access problem while installing Siremis, which is using also some temporary files in /var/, even it was granting provileges via chown and chmod. All went fine after disabling selinux. It was on a centos.
I am not saying it is the same, but it could, so try without centos to see if the issue persists.
Cheers, Daniel
On 27/03/2017 15:10, Ginhoux, Patrick wrote:
Hi,
This is the RHEL 7.1 distro, and there is use of selinux, apparmor or other tools.
Are you meaning that the /var/run/ folder would be secured more than other folders?
Cordialement
Patrick GINHOUX
*De :*sr-users [mailto:sr-users-bounces@lists.sip-router.org] *De la part de* Daniel-Constantin Mierla *Envoyé :* lundi 27 mars 2017 13:52 *À :* Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
kamailio should attempt to create the /var/run/kamailio folder if the application is run with enough privileges. However, some operating systems add more constraints on top of the execution user.
What is your OS distro? Do you have selinux, apparmor or other similar tools enabled?
Cheers, Daniel
On 24/03/2017 17:52, Ginhoux, Patrick wrote:
In my ‘kamctlrc’ file : ## path to FIFO file for engine RPCFIFO RPCFIFOPATH="/var/run/kamailio/kamailio_rpc_fifo" #RPCFIFOPATH="/tmp/kamailio_rpc_fifo" In my ‘kamailio.cfg’ : !!ifndef DEFINE_FIFO_NAME !!define DEFINE_FIFO_NAME "/var/run/kamailio/kamailio_rpc_fifo" !!endif modparam("jsonrpcs", "pretty_format", 1) modparam("jsonrpcs", "transport", 2) modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME) modparam("jsonrpcs", "fifo_mode", 0755) modparam("jsonrpcs", "fifo_group", "kamailio") modparam("jsonrpcs", "fifo_user", "kamailio") kamailio doesn’t start. It reports ‘Permission denied’ : Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: ERROR: jsonrpcs [jsonrpcs_fifo.c:144]: jsonrpc_init_fifo_server(): Can't create FIFO: Permission denied (mode=493) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: CRITICAL: jsonrpcs [jsonrpcs_fifo.c:489]: jsonrpc_fifo_process(): failed to init jsonrpc fifo server Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ALERT: <core> [main.c:741]: handle_sigs(): child process 1138 exited normally, status=255 Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank 4: tm Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -1: tm Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: htable [htable.c:226]: child_init(): rank is (1) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: INFO: <core> [main.c:759]: handle_sigs(): terminating due to SIGCHLD Mar 24 17:31:21 localhost /usr/sbin/kamailio[1139]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -2: kex Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1130@129.227.83.108 <mailto:15b1f0d63a718465-1130@129.227.83.108>' Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1137@129.227.83.108 <mailto:15b1f0d63a718465-1137@129.227.83.108>' Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: <core> [core/action.c:1656]: run_child_one_init_route(): attempting to run event_route[core:worker-one-init] Mar 24 17:31:21 localhost /usr/sbin/kamailio[1136]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1135]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1134]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1133]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1132]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1131]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1129]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1128]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: ctl [ctl.c:387]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: Permission denied (13) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: jsonrpcs [jsonrpcs_fifo.c:595]: jsonrpc_fifo_destroy(): FIFO stat failed: Permission denied If I replace the values in the 2 files as appropriate : In the ‘kamctlrc” toRPCFIFOPATH="/tmp/kamailio_rpc_fifo" In the ‘kamailio.cfg” to!!define DEFINE_FIFO_NAME "/tmp/kamailio_rpc_fifo" Then kamailo starts : [root@vm-vse02-siprouter1 ~]# ps -ef |grep kam kamailio 1235 1 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1236 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1237 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1238 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1239 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1240 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1241 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1242 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1243 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1244 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1245 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1246 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1247 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1248 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio root 1251 1165 0 17:37 pts/0 00:00:00 grep --color=auto kam and I can get result from kamctl/kamcmd commands : [root@vm-vse02-siprouter1 ~]# kamctl dispatcher dump which: no gdb in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/) { "jsonrpc": "2.0", "result": { "NRSETS": 1, "RECORDS": [{ "SET": { "ID": 1, "TARGETS": [{ "DEST": { "URI": "sip:cs1-tool-misc.orange-voicemail.net:5060" <sip:cs1-tool-misc.orange-voicemail.net:5060>, "FLAGS": "AP", "PRIORITY": 0 } }] } }] }, "id": 1301 } [root@vm-vse02-siprouter1 ~]# kamcmd dispatcher.list { NRSETS: 1 RECORDS: { SET: { ID: 1 TARGETS: { DEST: { URI: sip:cs1-tool-misc.orange-voicemail.net:5060 FLAGS: AP PRIORITY: 0 } } } } } Now, if I change the fifo patch and name to “/var/run/kamailio/kamailio_rpc_fifo’ and apply the following rights on /var/run/ to: chmod 755 kamalio/ chown + kamailio:kamailio kamailio/ then kamailio starts. Is there a reason for these results ? Thanks in advance for your answer. Cordialement Patrick GINHOUX _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla www.twitter.com/miconda http://www.twitter.com/miconda -- www.linkedin.com/in/miconda http://www.linkedin.com/in/miconda Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com http://www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com http://www.kamailioworld.com
Hi,
I continue to investigate on this area.
I’m thinking that there are some security settings on the FS /var/, and I’m looking for if we have the rights to change it (I work for a project and don’t have all the ability to change some settings without agreement).
I’ll update you later tomorrow.
Cordialement Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : lundi 27 mars 2017 15:28 À : Ginhoux, Patrick patrick.ginhoux@fr.unisys.com; Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
as recently as last week, someone encountered an file access problem while installing Siremis, which is using also some temporary files in /var/, even it was granting provileges via chown and chmod. All went fine after disabling selinux. It was on a centos.
I am not saying it is the same, but it could, so try without centos to see if the issue persists.
Cheers, Daniel
On 27/03/2017 15:10, Ginhoux, Patrick wrote: Hi,
This is the RHEL 7.1 distro, and there is use of selinux, apparmor or other tools.
Are you meaning that the /var/run/ folder would be secured more than other folders?
Cordialement Patrick GINHOUX
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Daniel-Constantin Mierla Envoyé : lundi 27 mars 2017 13:52 À : Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
kamailio should attempt to create the /var/run/kamailio folder if the application is run with enough privileges. However, some operating systems add more constraints on top of the execution user.
What is your OS distro? Do you have selinux, apparmor or other similar tools enabled?
Cheers, Daniel
On 24/03/2017 17:52, Ginhoux, Patrick wrote: In my ‘kamctlrc’ file :
## path to FIFO file for engine RPCFIFO RPCFIFOPATH="/var/run/kamailio/kamailio_rpc_fifo" #RPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In my ‘kamailio.cfg’ :
!!ifndef DEFINE_FIFO_NAME !!define DEFINE_FIFO_NAME "/var/run/kamailio/kamailio_rpc_fifo" !!endif
modparam("jsonrpcs", "pretty_format", 1) modparam("jsonrpcs", "transport", 2) modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME) modparam("jsonrpcs", "fifo_mode", 0755) modparam("jsonrpcs", "fifo_group", "kamailio") modparam("jsonrpcs", "fifo_user", "kamailio")
kamailio doesn’t start. It reports ‘Permission denied’ :
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: ERROR: jsonrpcs [jsonrpcs_fifo.c:144]: jsonrpc_init_fifo_server(): Can't create FIFO: Permission denied (mode=493) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: CRITICAL: jsonrpcs [jsonrpcs_fifo.c:489]: jsonrpc_fifo_process(): failed to init jsonrpc fifo server Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ALERT: <core> [main.c:741]: handle_sigs(): child process 1138 exited normally, status=255 Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank 4: tm Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -1: tm Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: htable [htable.c:226]: child_init(): rank is (1) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: INFO: <core> [main.c:759]: handle_sigs(): terminating due to SIGCHLD Mar 24 17:31:21 localhost /usr/sbin/kamailio[1139]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -2: kex Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1130@129.227.83.108mailto:15b1f0d63a718465-1130@129.227.83.108' Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1137@129.227.83.108mailto:15b1f0d63a718465-1137@129.227.83.108' Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: <core> [core/action.c:1656]: run_child_one_init_route(): attempting to run event_route[core:worker-one-init] Mar 24 17:31:21 localhost /usr/sbin/kamailio[1136]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1135]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1134]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1133]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1132]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1131]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1129]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1128]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: ctl [ctl.c:387]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: Permission denied (13) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: jsonrpcs [jsonrpcs_fifo.c:595]: jsonrpc_fifo_destroy(): FIFO stat failed: Permission denied
If I replace the values in the 2 files as appropriate :
In the ‘kamctlrc” to RPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In the ‘kamailio.cfg” to !!define DEFINE_FIFO_NAME "/tmp/kamailio_rpc_fifo"
Then kamailo starts :
[root@vm-vse02-siprouter1 ~]# ps -ef |grep kam kamailio 1235 1 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1236 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1237 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1238 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1239 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1240 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1241 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1242 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1243 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1244 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1245 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1246 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1247 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1248 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio root 1251 1165 0 17:37 pts/0 00:00:00 grep --color=auto kam
and I can get result from kamctl/kamcmd commands : [root@vm-vse02-siprouter1 ~]# kamctl dispatcher dump which: no gdb in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/) { "jsonrpc": "2.0", "result": { "NRSETS": 1, "RECORDS": [{ "SET": { "ID": 1, "TARGETS": [{ "DEST": { "URI": "sip:cs1-tool-misc.orange-voicemail.net:5060"sip:cs1-tool-misc.orange-voicemail.net:5060, "FLAGS": "AP", "PRIORITY": 0 } }] } }] }, "id": 1301 } [root@vm-vse02-siprouter1 ~]# kamcmd dispatcher.list { NRSETS: 1 RECORDS: { SET: { ID: 1 TARGETS: { DEST: { URI: sip:cs1-tool-misc.orange-voicemail.net:5060 FLAGS: AP PRIORITY: 0 } } } } }
Now, if I change the fifo patch and name to “/var/run/kamailio/kamailio_rpc_fifo’ and apply the following rights on /var/run/ to:
chmod 755 kamalio/ chown + kamailio:kamailio kamailio/
then kamailio starts.
Is there a reason for these results ?
Thanks in advance for your answer.
Cordialement Patrick GINHOUX
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.comhttp://www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
--
Daniel-Constantin Mierla
www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.comhttp://www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
Hi,
Well, with one of my colleagues, we did some research and test, but we don’t find where the privilege issue is with the /var/ FS.
If the fifo filename is "/var/run/kamailio/kamailio_rpc_fifo" or "/var/run/kamailio_rpc_fifo", we have this privilege issue.
I thought that the following declaration would prevent this security issue :
modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME)
modparam("jsonrpcs", "fifo_mode", 0755)
modparam("jsonrpcs", "fifo_group", "kamailio")
modparam("jsonrpcs", "fifo_user", "kamailio")
but it is not the case.
For the moment only the fifo filename “/tmp/kamailio_rpc_fifo" is valid for kamailio to start.
Cordialement
Patrick GINHOUX
De : Ginhoux, Patrick Envoyé : lundi 27 mars 2017 17:46 À : 'miconda@gmail.com' miconda@gmail.com; Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Objet : RE: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hi,
I continue to investigate on this area.
I’m thinking that there are some security settings on the FS /var/, and I’m looking for if we have the rights to change it (I work for a project and don’t have all the ability to change some settings without agreement).
I’ll update you later tomorrow.
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : lundi 27 mars 2017 15:28 À : Ginhoux, Patrick <patrick.ginhoux@fr.unisys.com mailto:patrick.ginhoux@fr.unisys.com >; Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org > Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
as recently as last week, someone encountered an file access problem while installing Siremis, which is using also some temporary files in /var/, even it was granting provileges via chown and chmod. All went fine after disabling selinux. It was on a centos.
I am not saying it is the same, but it could, so try without centos to see if the issue persists.
Cheers, Daniel
On 27/03/2017 15:10, Ginhoux, Patrick wrote:
Hi,
This is the RHEL 7.1 distro, and there is use of selinux, apparmor or other tools.
Are you meaning that the /var/run/ folder would be secured more than other folders?
Cordialement
Patrick GINHOUX
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Daniel-Constantin Mierla Envoyé : lundi 27 mars 2017 13:52 À : Kamailio (SER) - Users Mailing List mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
kamailio should attempt to create the /var/run/kamailio folder if the application is run with enough privileges. However, some operating systems add more constraints on top of the execution user.
What is your OS distro? Do you have selinux, apparmor or other similar tools enabled?
Cheers, Daniel
On 24/03/2017 17:52, Ginhoux, Patrick wrote:
In my ‘kamctlrc’ file :
## path to FIFO file for engine RPCFIFO
RPCFIFOPATH="/var/run/kamailio/kamailio_rpc_fifo"
#RPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In my ‘kamailio.cfg’ :
!!ifndef DEFINE_FIFO_NAME
!!define DEFINE_FIFO_NAME "/var/run/kamailio/kamailio_rpc_fifo"
!!endif
modparam("jsonrpcs", "pretty_format", 1)
modparam("jsonrpcs", "transport", 2)
modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME)
modparam("jsonrpcs", "fifo_mode", 0755)
modparam("jsonrpcs", "fifo_group", "kamailio")
modparam("jsonrpcs", "fifo_user", "kamailio")
kamailio doesn’t start. It reports ‘Permission denied’ :
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: ERROR: jsonrpcs [jsonrpcs_fifo.c:144]: jsonrpc_init_fifo_server(): Can't create FIFO: Permission denied (mode=493)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: CRITICAL: jsonrpcs [jsonrpcs_fifo.c:489]: jsonrpc_fifo_process(): failed to init jsonrpc fifo server
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ALERT: <core> [main.c:741]: handle_sigs(): child process 1138 exited normally, status=255
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank 4: tm
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -1: tm
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: htable [htable.c:226]: child_init(): rank is (1)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: INFO: <core> [main.c:759]: handle_sigs(): terminating due to SIGCHLD
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1139]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -2: kex
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1130@129.227.83.108 mailto:15b1f0d63a718465-1130@129.227.83.108 '
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1137@129.227.83.108 mailto:15b1f0d63a718465-1137@129.227.83.108 '
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: <core> [core/action.c:1656]: run_child_one_init_route(): attempting to run event_route[core:worker-one-init]
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1136]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1135]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1134]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1133]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1132]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1131]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1129]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1128]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: ctl [ctl.c:387]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: Permission denied (13)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: jsonrpcs [jsonrpcs_fifo.c:595]: jsonrpc_fifo_destroy(): FIFO stat failed: Permission denied
If I replace the values in the 2 files as appropriate :
In the ‘kamctlrc” to RPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In the ‘kamailio.cfg” to !!define DEFINE_FIFO_NAME "/tmp/kamailio_rpc_fifo"
Then kamailo starts :
[root@vm-vse02-siprouter1 ~]# ps -ef |grep kam
kamailio 1235 1 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1236 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1237 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1238 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1239 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1240 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1241 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1242 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1243 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1244 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1245 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1246 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1247 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1248 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1251 1165 0 17:37 pts/0 00:00:00 grep --color=auto kam
and I can get result from kamctl/kamcmd commands :
[root@vm-vse02-siprouter1 ~]# kamctl dispatcher dump
which: no gdb in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/)
{
"jsonrpc": "2.0",
"result": {
"NRSETS": 1,
"RECORDS": [{
"SET": {
"ID": 1,
"TARGETS": [{
"DEST": {
"URI": sip:cs1-tool-misc.orange-voicemail.net:5060 "sip:cs1-tool-misc.orange-voicemail.net:5060",
"FLAGS": "AP",
"PRIORITY": 0
}
}]
}
}]
},
"id": 1301
}
[root@vm-vse02-siprouter1 ~]# kamcmd dispatcher.list
{
NRSETS: 1
RECORDS: {
SET: {
ID: 1
TARGETS: {
DEST: {
URI: sip:cs1-tool-misc.orange-voicemail.net:5060
FLAGS: AP
PRIORITY: 0
}
}
}
}
}
Now, if I change the fifo patch and name to “/var/run/kamailio/kamailio_rpc_fifo’ and apply the following rights on /var/run/ to:
chmod 755 kamalio/
chown + kamailio:kamailio kamailio/
then kamailio starts.
Is there a reason for these results ?
Thanks in advance for your answer.
Cordialement
Patrick GINHOUX
_______________________________________________ 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
Hello,
have you disabled selinux to see if starts ok without it?
Cheers, Daniel
On 03.04.17 13:54, Ginhoux, Patrick wrote:
Hi,
Well, with one of my colleagues, we did some research and test, but we don’t find where the privilege issue is with the /var/ FS.
If the fifo filename is "/var/run/kamailio/kamailio_rpc_fifo" or "/var/run/kamailio_rpc_fifo", we have this privilege issue.
I thought that the following declaration would prevent this security issue :
modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME)
modparam("jsonrpcs", "fifo_mode", 0755)
modparam("jsonrpcs", "fifo_group", "kamailio")
modparam("jsonrpcs", "fifo_user", "kamailio")
but it is not the case.
For the moment only the fifo filename “/tmp/kamailio_rpc_fifo" is valid for kamailio to start.
Cordialement
Patrick GINHOUX
*De :*Ginhoux, Patrick *Envoyé :* lundi 27 mars 2017 17:46 *À :* 'miconda@gmail.com' miconda@gmail.com; Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org *Objet :* RE: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hi,
I continue to investigate on this area.
I’m thinking that there are some security settings on the FS /var/, and I’m looking for if we have the rights to change it (I work for a project and don’t have all the ability to change some settings without agreement).
I’ll update you later tomorrow.
Cordialement
Patrick GINHOUX
*De :*Daniel-Constantin Mierla [mailto:miconda@gmail.com] *Envoyé :* lundi 27 mars 2017 15:28 *À :* Ginhoux, Patrick <patrick.ginhoux@fr.unisys.com mailto:patrick.ginhoux@fr.unisys.com>; Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org> *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
as recently as last week, someone encountered an file access problem while installing Siremis, which is using also some temporary files in /var/, even it was granting provileges via chown and chmod. All went fine after disabling selinux. It was on a centos.
I am not saying it is the same, but it could, so try without centos to see if the issue persists.
Cheers, Daniel
On 27/03/2017 15:10, Ginhoux, Patrick wrote:
Hi, This is the RHEL 7.1 distro, and there is use of selinux, apparmor or other tools. Are you meaning that the /var/run/ folder would be secured more than other folders? Cordialement Patrick GINHOUX *De :*sr-users [mailto:sr-users-bounces@lists.sip-router.org] *De la part de* Daniel-Constantin Mierla *Envoyé :* lundi 27 mars 2017 13:52 *À :* Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org> <mailto:sr-users@lists.sip-router.org> *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem Hello, kamailio should attempt to create the /var/run/kamailio folder if the application is run with enough privileges. However, some operating systems add more constraints on top of the execution user. What is your OS distro? Do you have selinux, apparmor or other similar tools enabled? Cheers, Daniel On 24/03/2017 17:52, Ginhoux, Patrick wrote: In my ‘kamctlrc’ file : ## path to FIFO file for engine RPCFIFO RPCFIFOPATH="/var/run/kamailio/kamailio_rpc_fifo" #RPCFIFOPATH="/tmp/kamailio_rpc_fifo" In my ‘kamailio.cfg’ : !!ifndef DEFINE_FIFO_NAME !!define DEFINE_FIFO_NAME "/var/run/kamailio/kamailio_rpc_fifo" !!endif modparam("jsonrpcs", "pretty_format", 1) modparam("jsonrpcs", "transport", 2) modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME) modparam("jsonrpcs", "fifo_mode", 0755) modparam("jsonrpcs", "fifo_group", "kamailio") modparam("jsonrpcs", "fifo_user", "kamailio") kamailio doesn’t start. It reports ‘Permission denied’ : Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: ERROR: jsonrpcs [jsonrpcs_fifo.c:144]: jsonrpc_init_fifo_server(): Can't create FIFO: Permission denied (mode=493) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: CRITICAL: jsonrpcs [jsonrpcs_fifo.c:489]: jsonrpc_fifo_process(): failed to init jsonrpc fifo server Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ALERT: <core> [main.c:741]: handle_sigs(): child process 1138 exited normally, status=255 Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank 4: tm Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -1: tm Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: htable [htable.c:226]: child_init(): rank is (1) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: INFO: <core> [main.c:759]: handle_sigs(): terminating due to SIGCHLD Mar 24 17:31:21 localhost /usr/sbin/kamailio[1139]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -2: kex Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1130@129.227.83.108 <mailto:15b1f0d63a718465-1130@129.227.83.108>' Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1137@129.227.83.108 <mailto:15b1f0d63a718465-1137@129.227.83.108>' Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: <core> [core/action.c:1656]: run_child_one_init_route(): attempting to run event_route[core:worker-one-init] Mar 24 17:31:21 localhost /usr/sbin/kamailio[1136]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1135]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1134]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1133]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1132]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1131]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1129]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1128]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: ctl [ctl.c:387]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: Permission denied (13) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: jsonrpcs [jsonrpcs_fifo.c:595]: jsonrpc_fifo_destroy(): FIFO stat failed: Permission denied If I replace the values in the 2 files as appropriate : In the ‘kamctlrc” toRPCFIFOPATH="/tmp/kamailio_rpc_fifo" In the ‘kamailio.cfg” to!!define DEFINE_FIFO_NAME "/tmp/kamailio_rpc_fifo" Then kamailo starts : [root@vm-vse02-siprouter1 ~]# ps -ef |grep kam kamailio 1235 1 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1236 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1237 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1238 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1239 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1240 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1241 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1242 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1243 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1244 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1245 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1246 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1247 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1248 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio root 1251 1165 0 17:37 pts/0 00:00:00 grep --color=auto kam and I can get result from kamctl/kamcmd commands : [root@vm-vse02-siprouter1 ~]# kamctl dispatcher dump which: no gdb in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/) { "jsonrpc": "2.0", "result": { "NRSETS": 1, "RECORDS": [{ "SET": { "ID": 1, "TARGETS": [{ "DEST": { "URI": "sip:cs1-tool-misc.orange-voicemail.net:5060" <sip:cs1-tool-misc.orange-voicemail.net:5060>, "FLAGS": "AP", "PRIORITY": 0 } }] } }] }, "id": 1301 } [root@vm-vse02-siprouter1 ~]# kamcmd dispatcher.list { NRSETS: 1 RECORDS: { SET: { ID: 1 TARGETS: { DEST: { URI: sip:cs1-tool-misc.orange-voicemail.net:5060 FLAGS: AP PRIORITY: 0 } } } } } Now, if I change the fifo patch and name to “/var/run/kamailio/kamailio_rpc_fifo’ and apply the following rights on /var/run/ to: chmod 755 kamalio/ chown + kamailio:kamailio kamailio/ then kamailio starts. Is there a reason for these results ? Thanks in advance for your answer. Cordialement Patrick GINHOUX _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com <http://www.asipto.com> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com <http://www.kamailioworld.com>
-- Daniel-Constantin Mierla www.twitter.com/miconda http://www.twitter.com/miconda -- www.linkedin.com/in/miconda http://www.linkedin.com/in/miconda Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com http://www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com http://www.kamailioworld.com
Hi,
Selinux is disabled.
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : lundi 3 avril 2017 14:33 À : Ginhoux, Patrick patrick.ginhoux@fr.unisys.com; Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
have you disabled selinux to see if starts ok without it?
Cheers, Daniel
On 03.04.17 13:54, Ginhoux, Patrick wrote:
Hi,
Well, with one of my colleagues, we did some research and test, but we don’t find where the privilege issue is with the /var/ FS.
If the fifo filename is "/var/run/kamailio/kamailio_rpc_fifo" or "/var/run/kamailio_rpc_fifo", we have this privilege issue.
I thought that the following declaration would prevent this security issue :
modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME)
modparam("jsonrpcs", "fifo_mode", 0755)
modparam("jsonrpcs", "fifo_group", "kamailio")
modparam("jsonrpcs", "fifo_user", "kamailio")
but it is not the case.
For the moment only the fifo filename “/tmp/kamailio_rpc_fifo" is valid for kamailio to start.
Cordialement
Patrick GINHOUX
De : Ginhoux, Patrick Envoyé : lundi 27 mars 2017 17:46 À : 'miconda@gmail.com mailto:miconda@gmail.com ' mailto:miconda@gmail.com miconda@gmail.com; Kamailio (SER) - Users Mailing List mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org Objet : RE: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hi,
I continue to investigate on this area.
I’m thinking that there are some security settings on the FS /var/, and I’m looking for if we have the rights to change it (I work for a project and don’t have all the ability to change some settings without agreement).
I’ll update you later tomorrow.
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : lundi 27 mars 2017 15:28 À : Ginhoux, Patrick <patrick.ginhoux@fr.unisys.com mailto:patrick.ginhoux@fr.unisys.com >; Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org > Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
as recently as last week, someone encountered an file access problem while installing Siremis, which is using also some temporary files in /var/, even it was granting provileges via chown and chmod. All went fine after disabling selinux. It was on a centos.
I am not saying it is the same, but it could, so try without centos to see if the issue persists.
Cheers, Daniel
On 27/03/2017 15:10, Ginhoux, Patrick wrote:
Hi,
This is the RHEL 7.1 distro, and there is use of selinux, apparmor or other tools.
Are you meaning that the /var/run/ folder would be secured more than other folders?
Cordialement
Patrick GINHOUX
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Daniel-Constantin Mierla Envoyé : lundi 27 mars 2017 13:52 À : Kamailio (SER) - Users Mailing List mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
kamailio should attempt to create the /var/run/kamailio folder if the application is run with enough privileges. However, some operating systems add more constraints on top of the execution user.
What is your OS distro? Do you have selinux, apparmor or other similar tools enabled?
Cheers, Daniel
On 24/03/2017 17:52, Ginhoux, Patrick wrote:
In my ‘kamctlrc’ file :
## path to FIFO file for engine RPCFIFO
RPCFIFOPATH="/var/run/kamailio/kamailio_rpc_fifo"
#RPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In my ‘kamailio.cfg’ :
!!ifndef DEFINE_FIFO_NAME
!!define DEFINE_FIFO_NAME "/var/run/kamailio/kamailio_rpc_fifo"
!!endif
modparam("jsonrpcs", "pretty_format", 1)
modparam("jsonrpcs", "transport", 2)
modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME)
modparam("jsonrpcs", "fifo_mode", 0755)
modparam("jsonrpcs", "fifo_group", "kamailio")
modparam("jsonrpcs", "fifo_user", "kamailio")
kamailio doesn’t start. It reports ‘Permission denied’ :
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: ERROR: jsonrpcs [jsonrpcs_fifo.c:144]: jsonrpc_init_fifo_server(): Can't create FIFO: Permission denied (mode=493)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: CRITICAL: jsonrpcs [jsonrpcs_fifo.c:489]: jsonrpc_fifo_process(): failed to init jsonrpc fifo server
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ALERT: <core> [main.c:741]: handle_sigs(): child process 1138 exited normally, status=255
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank 4: tm
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -1: tm
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: htable [htable.c:226]: child_init(): rank is (1)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: INFO: <core> [main.c:759]: handle_sigs(): terminating due to SIGCHLD
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1139]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -2: kex
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1130@129.227.83.108 mailto:15b1f0d63a718465-1130@129.227.83.108 '
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1137@129.227.83.108 mailto:15b1f0d63a718465-1137@129.227.83.108 '
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: <core> [core/action.c:1656]: run_child_one_init_route(): attempting to run event_route[core:worker-one-init]
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1136]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1135]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1134]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1133]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1132]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1131]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1129]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1128]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: ctl [ctl.c:387]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: Permission denied (13)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: jsonrpcs [jsonrpcs_fifo.c:595]: jsonrpc_fifo_destroy(): FIFO stat failed: Permission denied
If I replace the values in the 2 files as appropriate :
In the ‘kamctlrc” to RPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In the ‘kamailio.cfg” to !!define DEFINE_FIFO_NAME "/tmp/kamailio_rpc_fifo"
Then kamailo starts :
[root@vm-vse02-siprouter1 ~]# ps -ef |grep kam
kamailio 1235 1 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1236 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1237 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1238 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1239 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1240 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1241 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1242 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1243 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1244 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1245 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1246 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1247 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1248 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1251 1165 0 17:37 pts/0 00:00:00 grep --color=auto kam
and I can get result from kamctl/kamcmd commands :
[root@vm-vse02-siprouter1 ~]# kamctl dispatcher dump
which: no gdb in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/)
{
"jsonrpc": "2.0",
"result": {
"NRSETS": 1,
"RECORDS": [{
"SET": {
"ID": 1,
"TARGETS": [{
"DEST": {
"URI": sip:cs1-tool-misc.orange-voicemail.net:5060 "sip:cs1-tool-misc.orange-voicemail.net:5060",
"FLAGS": "AP",
"PRIORITY": 0
}
}]
}
}]
},
"id": 1301
}
[root@vm-vse02-siprouter1 ~]# kamcmd dispatcher.list
{
NRSETS: 1
RECORDS: {
SET: {
ID: 1
TARGETS: {
DEST: {
URI: sip:cs1-tool-misc.orange-voicemail.net:5060
FLAGS: AP
PRIORITY: 0
}
}
}
}
}
Now, if I change the fifo patch and name to “/var/run/kamailio/kamailio_rpc_fifo’ and apply the following rights on /var/run/ to:
chmod 755 kamalio/
chown + kamailio:kamailio kamailio/
then kamailio starts.
Is there a reason for these results ?
Thanks in advance for your answer.
Cordialement
Patrick GINHOUX
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
how do you start Kamailio? Via init.d/systemd script?
Cheers, Daniel
On 03.04.17 14:34, Ginhoux, Patrick wrote:
Hi,
Selinux is disabled.
Cordialement
Patrick GINHOUX
*De :*Daniel-Constantin Mierla [mailto:miconda@gmail.com] *Envoyé :* lundi 3 avril 2017 14:33 *À :* Ginhoux, Patrick patrick.ginhoux@fr.unisys.com; Kamailio (SER)
- Users Mailing List sr-users@lists.sip-router.org
*Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
have you disabled selinux to see if starts ok without it?
Cheers, Daniel
On 03.04.17 13:54, Ginhoux, Patrick wrote:
Hi, Well, with one of my colleagues, we did some research and test, but we don’t find where the privilege issue is with the /var/ FS. If the fifo filename is "/var/run/kamailio/kamailio_rpc_fifo" or "/var/run/kamailio_rpc_fifo", we have this privilege issue. I thought that the following declaration would prevent this security issue : modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME) modparam("jsonrpcs", "fifo_mode", 0755) modparam("jsonrpcs", "fifo_group", "kamailio") modparam("jsonrpcs", "fifo_user", "kamailio") but it is not the case. For the moment only the fifo filename “/tmp/kamailio_rpc_fifo" is valid for kamailio to start. Cordialement Patrick GINHOUX *De :*Ginhoux, Patrick *Envoyé :* lundi 27 mars 2017 17:46 *À :* 'miconda@gmail.com <mailto:miconda@gmail.com>' <miconda@gmail.com> <mailto:miconda@gmail.com>; Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org> <mailto:sr-users@lists.sip-router.org> *Objet :* RE: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem Hi, I continue to investigate on this area. I’m thinking that there are some security settings on the FS /var/, and I’m looking for if we have the rights to change it (I work for a project and don’t have all the ability to change some settings without agreement). I’ll update you later tomorrow. Cordialement Patrick GINHOUX *De :*Daniel-Constantin Mierla [mailto:miconda@gmail.com] *Envoyé :* lundi 27 mars 2017 15:28 *À :* Ginhoux, Patrick <patrick.ginhoux@fr.unisys.com <mailto:patrick.ginhoux@fr.unisys.com>>; Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org>> *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem Hello, as recently as last week, someone encountered an file access problem while installing Siremis, which is using also some temporary files in /var/, even it was granting provileges via chown and chmod. All went fine after disabling selinux. It was on a centos. I am not saying it is the same, but it could, so try without centos to see if the issue persists. Cheers, Daniel On 27/03/2017 15:10, Ginhoux, Patrick wrote: Hi, This is the RHEL 7.1 distro, and there is use of selinux, apparmor or other tools. Are you meaning that the /var/run/ folder would be secured more than other folders? Cordialement Patrick GINHOUX *De :*sr-users [mailto:sr-users-bounces@lists.sip-router.org] *De la part de* Daniel-Constantin Mierla *Envoyé :* lundi 27 mars 2017 13:52 *À :* Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org> <mailto:sr-users@lists.sip-router.org> *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem Hello, kamailio should attempt to create the /var/run/kamailio folder if the application is run with enough privileges. However, some operating systems add more constraints on top of the execution user. What is your OS distro? Do you have selinux, apparmor or other similar tools enabled? Cheers, Daniel On 24/03/2017 17:52, Ginhoux, Patrick wrote: In my ‘kamctlrc’ file : ## path to FIFO file for engine RPCFIFO RPCFIFOPATH="/var/run/kamailio/kamailio_rpc_fifo" #RPCFIFOPATH="/tmp/kamailio_rpc_fifo" In my ‘kamailio.cfg’ : !!ifndef DEFINE_FIFO_NAME !!define DEFINE_FIFO_NAME "/var/run/kamailio/kamailio_rpc_fifo" !!endif modparam("jsonrpcs", "pretty_format", 1) modparam("jsonrpcs", "transport", 2) modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME) modparam("jsonrpcs", "fifo_mode", 0755) modparam("jsonrpcs", "fifo_group", "kamailio") modparam("jsonrpcs", "fifo_user", "kamailio") kamailio doesn’t start. It reports ‘Permission denied’ : Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: ERROR: jsonrpcs [jsonrpcs_fifo.c:144]: jsonrpc_init_fifo_server(): Can't create FIFO: Permission denied (mode=493) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: CRITICAL: jsonrpcs [jsonrpcs_fifo.c:489]: jsonrpc_fifo_process(): failed to init jsonrpc fifo server Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ALERT: <core> [main.c:741]: handle_sigs(): child process 1138 exited normally, status=255 Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank 4: tm Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -1: tm Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: htable [htable.c:226]: child_init(): rank is (1) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: INFO: <core> [main.c:759]: handle_sigs(): terminating due to SIGCHLD Mar 24 17:31:21 localhost /usr/sbin/kamailio[1139]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -2: kex Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1130@129.227.83.108 <mailto:15b1f0d63a718465-1130@129.227.83.108>' Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1137@129.227.83.108 <mailto:15b1f0d63a718465-1137@129.227.83.108>' Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: <core> [core/action.c:1656]: run_child_one_init_route(): attempting to run event_route[core:worker-one-init] Mar 24 17:31:21 localhost /usr/sbin/kamailio[1136]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1135]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1134]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1133]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1132]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1131]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1129]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1128]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: ctl [ctl.c:387]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: Permission denied (13) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: jsonrpcs [jsonrpcs_fifo.c:595]: jsonrpc_fifo_destroy(): FIFO stat failed: Permission denied If I replace the values in the 2 files as appropriate : In the ‘kamctlrc” toRPCFIFOPATH="/tmp/kamailio_rpc_fifo" In the ‘kamailio.cfg” to!!define DEFINE_FIFO_NAME "/tmp/kamailio_rpc_fifo" Then kamailo starts : [root@vm-vse02-siprouter1 ~]# ps -ef |grep kam kamailio 1235 1 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1236 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1237 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1238 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1239 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1240 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1241 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1242 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1243 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1244 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1245 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1246 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1247 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1248 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio root 1251 1165 0 17:37 pts/0 00:00:00 grep --color=auto kam and I can get result from kamctl/kamcmd commands : [root@vm-vse02-siprouter1 ~]# kamctl dispatcher dump which: no gdb in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/) { "jsonrpc": "2.0", "result": { "NRSETS": 1, "RECORDS": [{ "SET": { "ID": 1, "TARGETS": [{ "DEST": { "URI": "sip:cs1-tool-misc.orange-voicemail.net:5060" <sip:cs1-tool-misc.orange-voicemail.net:5060>, "FLAGS": "AP", "PRIORITY": 0 } }] } }] }, "id": 1301 } [root@vm-vse02-siprouter1 ~]# kamcmd dispatcher.list { NRSETS: 1 RECORDS: { SET: { ID: 1 TARGETS: { DEST: { URI: sip:cs1-tool-misc.orange-voicemail.net:5060 FLAGS: AP PRIORITY: 0 } } } } } Now, if I change the fifo patch and name to “/var/run/kamailio/kamailio_rpc_fifo’ and apply the following rights on /var/run/ to: chmod 755 kamalio/ chown + kamailio:kamailio kamailio/ then kamailio starts. Is there a reason for these results ? Thanks in advance for your answer. Cordialement Patrick GINHOUX _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com <http://www.asipto.com> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com <http://www.kamailioworld.com> -- Daniel-Constantin Mierla www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com <http://www.asipto.com> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com <http://www.kamailioworld.com>
-- Daniel-Constantin Mierla www.twitter.com/miconda http://www.twitter.com/miconda -- www.linkedin.com/in/miconda http://www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com http://www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com http://www.kamailioworld.com
Hi,
I use « service kamailio start », so the init.d script that is the one created at the installation.
Cordialement
Patrick GINHOUX
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Daniel-Constantin Mierla Envoyé : lundi 3 avril 2017 14:56 À : Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
how do you start Kamailio? Via init.d/systemd script?
Cheers, Daniel
On 03.04.17 14:34, Ginhoux, Patrick wrote:
Hi,
Selinux is disabled.
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : lundi 3 avril 2017 14:33 À : Ginhoux, Patrick mailto:patrick.ginhoux@fr.unisys.com patrick.ginhoux@fr.unisys.com; Kamailio (SER) - Users Mailing List mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
have you disabled selinux to see if starts ok without it?
Cheers, Daniel
On 03.04.17 13:54, Ginhoux, Patrick wrote:
Hi,
Well, with one of my colleagues, we did some research and test, but we don’t find where the privilege issue is with the /var/ FS.
If the fifo filename is "/var/run/kamailio/kamailio_rpc_fifo" or "/var/run/kamailio_rpc_fifo", we have this privilege issue.
I thought that the following declaration would prevent this security issue :
modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME)
modparam("jsonrpcs", "fifo_mode", 0755)
modparam("jsonrpcs", "fifo_group", "kamailio")
modparam("jsonrpcs", "fifo_user", "kamailio")
but it is not the case.
For the moment only the fifo filename “/tmp/kamailio_rpc_fifo" is valid for kamailio to start.
Cordialement
Patrick GINHOUX
De : Ginhoux, Patrick Envoyé : lundi 27 mars 2017 17:46 À : 'miconda@gmail.com mailto:miconda@gmail.com ' mailto:miconda@gmail.com miconda@gmail.com; Kamailio (SER) - Users Mailing List mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org Objet : RE: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hi,
I continue to investigate on this area.
I’m thinking that there are some security settings on the FS /var/, and I’m looking for if we have the rights to change it (I work for a project and don’t have all the ability to change some settings without agreement).
I’ll update you later tomorrow.
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : lundi 27 mars 2017 15:28 À : Ginhoux, Patrick <patrick.ginhoux@fr.unisys.com mailto:patrick.ginhoux@fr.unisys.com >; Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org > Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
as recently as last week, someone encountered an file access problem while installing Siremis, which is using also some temporary files in /var/, even it was granting provileges via chown and chmod. All went fine after disabling selinux. It was on a centos.
I am not saying it is the same, but it could, so try without centos to see if the issue persists.
Cheers, Daniel
On 27/03/2017 15:10, Ginhoux, Patrick wrote:
Hi,
This is the RHEL 7.1 distro, and there is use of selinux, apparmor or other tools.
Are you meaning that the /var/run/ folder would be secured more than other folders?
Cordialement
Patrick GINHOUX
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Daniel-Constantin Mierla Envoyé : lundi 27 mars 2017 13:52 À : Kamailio (SER) - Users Mailing List mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
kamailio should attempt to create the /var/run/kamailio folder if the application is run with enough privileges. However, some operating systems add more constraints on top of the execution user.
What is your OS distro? Do you have selinux, apparmor or other similar tools enabled?
Cheers, Daniel
On 24/03/2017 17:52, Ginhoux, Patrick wrote:
In my ‘kamctlrc’ file :
## path to FIFO file for engine RPCFIFO
RPCFIFOPATH="/var/run/kamailio/kamailio_rpc_fifo"
#RPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In my ‘kamailio.cfg’ :
!!ifndef DEFINE_FIFO_NAME
!!define DEFINE_FIFO_NAME "/var/run/kamailio/kamailio_rpc_fifo"
!!endif
modparam("jsonrpcs", "pretty_format", 1)
modparam("jsonrpcs", "transport", 2)
modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME)
modparam("jsonrpcs", "fifo_mode", 0755)
modparam("jsonrpcs", "fifo_group", "kamailio")
modparam("jsonrpcs", "fifo_user", "kamailio")
kamailio doesn’t start. It reports ‘Permission denied’ :
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: ERROR: jsonrpcs [jsonrpcs_fifo.c:144]: jsonrpc_init_fifo_server(): Can't create FIFO: Permission denied (mode=493)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: CRITICAL: jsonrpcs [jsonrpcs_fifo.c:489]: jsonrpc_fifo_process(): failed to init jsonrpc fifo server
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ALERT: <core> [main.c:741]: handle_sigs(): child process 1138 exited normally, status=255
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank 4: tm
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -1: tm
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: htable [htable.c:226]: child_init(): rank is (1)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: INFO: <core> [main.c:759]: handle_sigs(): terminating due to SIGCHLD
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1139]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -2: kex
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1130@129.227.83.108 mailto:15b1f0d63a718465-1130@129.227.83.108 '
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1137@129.227.83.108 mailto:15b1f0d63a718465-1137@129.227.83.108 '
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: <core> [core/action.c:1656]: run_child_one_init_route(): attempting to run event_route[core:worker-one-init]
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1136]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1135]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1134]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1133]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1132]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1131]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1129]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1128]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: ctl [ctl.c:387]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: Permission denied (13)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: jsonrpcs [jsonrpcs_fifo.c:595]: jsonrpc_fifo_destroy(): FIFO stat failed: Permission denied
If I replace the values in the 2 files as appropriate :
In the ‘kamctlrc” to RPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In the ‘kamailio.cfg” to !!define DEFINE_FIFO_NAME "/tmp/kamailio_rpc_fifo"
Then kamailo starts :
[root@vm-vse02-siprouter1 ~]# ps -ef |grep kam
kamailio 1235 1 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1236 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1237 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1238 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1239 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1240 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1241 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1242 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1243 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1244 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1245 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1246 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1247 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1248 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1251 1165 0 17:37 pts/0 00:00:00 grep --color=auto kam
and I can get result from kamctl/kamcmd commands :
[root@vm-vse02-siprouter1 ~]# kamctl dispatcher dump
which: no gdb in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/)
{
"jsonrpc": "2.0",
"result": {
"NRSETS": 1,
"RECORDS": [{
"SET": {
"ID": 1,
"TARGETS": [{
"DEST": {
"URI": sip:cs1-tool-misc.orange-voicemail.net:5060 "sip:cs1-tool-misc.orange-voicemail.net:5060",
"FLAGS": "AP",
"PRIORITY": 0
}
}]
}
}]
},
"id": 1301
}
[root@vm-vse02-siprouter1 ~]# kamcmd dispatcher.list
{
NRSETS: 1
RECORDS: {
SET: {
ID: 1
TARGETS: {
DEST: {
URI: sip:cs1-tool-misc.orange-voicemail.net:5060
FLAGS: AP
PRIORITY: 0
}
}
}
}
}
Now, if I change the fifo patch and name to “/var/run/kamailio/kamailio_rpc_fifo’ and apply the following rights on /var/run/ to:
chmod 755 kamalio/
chown + kamailio:kamailio kamailio/
then kamailio starts.
Is there a reason for these results ?
Thanks in advance for your answer.
Cordialement
Patrick GINHOUX
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
apparently the /var/run/kamailio folder was not created by the init.d script for rpm, as it is done in the deb specs. I updated it and triggered a rebuild of rpms, available at:
https://build.opensuse.org/package/show/home:kamailio:v5.0.x-rpms/kamailio50
Try to upgrade and then see if it works.
Later today we will release v5.0.1 and the rpms for it will have the new init.d script.
Cheers, Daniel
On 03.04.17 15:01, Ginhoux, Patrick wrote:
Hi,
I use « service kamailio start », so the init.d script that is the one created at the installation.
Cordialement
Patrick GINHOUX
*De :*sr-users [mailto:sr-users-bounces@lists.sip-router.org] *De la part de* Daniel-Constantin Mierla *Envoyé :* lundi 3 avril 2017 14:56 *À :* Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
how do you start Kamailio? Via init.d/systemd script?
Cheers, Daniel
On 03.04.17 14:34, Ginhoux, Patrick wrote:
Hi, Selinux is disabled. Cordialement Patrick GINHOUX *De :*Daniel-Constantin Mierla [mailto:miconda@gmail.com] *Envoyé :* lundi 3 avril 2017 14:33 *À :* Ginhoux, Patrick <patrick.ginhoux@fr.unisys.com> <mailto:patrick.ginhoux@fr.unisys.com>; Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org> <mailto:sr-users@lists.sip-router.org> *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem Hello, have you disabled selinux to see if starts ok without it? Cheers, Daniel On 03.04.17 13:54, Ginhoux, Patrick wrote: Hi, Well, with one of my colleagues, we did some research and test, but we don’t find where the privilege issue is with the /var/ FS. If the fifo filename is "/var/run/kamailio/kamailio_rpc_fifo" or "/var/run/kamailio_rpc_fifo", we have this privilege issue. I thought that the following declaration would prevent this security issue : modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME) modparam("jsonrpcs", "fifo_mode", 0755) modparam("jsonrpcs", "fifo_group", "kamailio") modparam("jsonrpcs", "fifo_user", "kamailio") but it is not the case. For the moment only the fifo filename “/tmp/kamailio_rpc_fifo" is valid for kamailio to start. Cordialement Patrick GINHOUX *De :*Ginhoux, Patrick *Envoyé :* lundi 27 mars 2017 17:46 *À :* 'miconda@gmail.com <mailto:miconda@gmail.com>' <miconda@gmail.com> <mailto:miconda@gmail.com>; Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org> <mailto:sr-users@lists.sip-router.org> *Objet :* RE: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem Hi, I continue to investigate on this area. I’m thinking that there are some security settings on the FS /var/, and I’m looking for if we have the rights to change it (I work for a project and don’t have all the ability to change some settings without agreement). I’ll update you later tomorrow. Cordialement Patrick GINHOUX *De :*Daniel-Constantin Mierla [mailto:miconda@gmail.com] *Envoyé :* lundi 27 mars 2017 15:28 *À :* Ginhoux, Patrick <patrick.ginhoux@fr.unisys.com <mailto:patrick.ginhoux@fr.unisys.com>>; Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org>> *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem Hello, as recently as last week, someone encountered an file access problem while installing Siremis, which is using also some temporary files in /var/, even it was granting provileges via chown and chmod. All went fine after disabling selinux. It was on a centos. I am not saying it is the same, but it could, so try without centos to see if the issue persists. Cheers, Daniel On 27/03/2017 15:10, Ginhoux, Patrick wrote: Hi, This is the RHEL 7.1 distro, and there is use of selinux, apparmor or other tools. Are you meaning that the /var/run/ folder would be secured more than other folders? Cordialement Patrick GINHOUX *De :*sr-users [mailto:sr-users-bounces@lists.sip-router.org] *De la part de* Daniel-Constantin Mierla *Envoyé :* lundi 27 mars 2017 13:52 *À :* Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org> <mailto:sr-users@lists.sip-router.org> *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem Hello, kamailio should attempt to create the /var/run/kamailio folder if the application is run with enough privileges. However, some operating systems add more constraints on top of the execution user. What is your OS distro? Do you have selinux, apparmor or other similar tools enabled? Cheers, Daniel On 24/03/2017 17:52, Ginhoux, Patrick wrote: In my ‘kamctlrc’ file : ## path to FIFO file for engine RPCFIFO RPCFIFOPATH="/var/run/kamailio/kamailio_rpc_fifo" #RPCFIFOPATH="/tmp/kamailio_rpc_fifo" In my ‘kamailio.cfg’ : !!ifndef DEFINE_FIFO_NAME !!define DEFINE_FIFO_NAME "/var/run/kamailio/kamailio_rpc_fifo" !!endif modparam("jsonrpcs", "pretty_format", 1) modparam("jsonrpcs", "transport", 2) modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME) modparam("jsonrpcs", "fifo_mode", 0755) modparam("jsonrpcs", "fifo_group", "kamailio") modparam("jsonrpcs", "fifo_user", "kamailio") kamailio doesn’t start. It reports ‘Permission denied’ : Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: ERROR: jsonrpcs [jsonrpcs_fifo.c:144]: jsonrpc_init_fifo_server(): Can't create FIFO: Permission denied (mode=493) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: CRITICAL: jsonrpcs [jsonrpcs_fifo.c:489]: jsonrpc_fifo_process(): failed to init jsonrpc fifo server Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ALERT: <core> [main.c:741]: handle_sigs(): child process 1138 exited normally, status=255 Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank 4: tm Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -1: tm Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: htable [htable.c:226]: child_init(): rank is (1) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: INFO: <core> [main.c:759]: handle_sigs(): terminating due to SIGCHLD Mar 24 17:31:21 localhost /usr/sbin/kamailio[1139]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -2: kex Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1130@129.227.83.108 <mailto:15b1f0d63a718465-1130@129.227.83.108>' Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1137@129.227.83.108 <mailto:15b1f0d63a718465-1137@129.227.83.108>' Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: <core> [core/action.c:1656]: run_child_one_init_route(): attempting to run event_route[core:worker-one-init] Mar 24 17:31:21 localhost /usr/sbin/kamailio[1136]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1135]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1134]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1133]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1132]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1131]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1129]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1128]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: ctl [ctl.c:387]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: Permission denied (13) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: jsonrpcs [jsonrpcs_fifo.c:595]: jsonrpc_fifo_destroy(): FIFO stat failed: Permission denied If I replace the values in the 2 files as appropriate : In the ‘kamctlrc” toRPCFIFOPATH="/tmp/kamailio_rpc_fifo" In the ‘kamailio.cfg” to!!define DEFINE_FIFO_NAME "/tmp/kamailio_rpc_fifo" Then kamailo starts : [root@vm-vse02-siprouter1 ~]# ps -ef |grep kam kamailio 1235 1 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1236 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1237 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1238 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1239 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1240 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1241 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1242 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1243 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1244 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1245 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1246 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1247 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1248 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio root 1251 1165 0 17:37 pts/0 00:00:00 grep --color=auto kam and I can get result from kamctl/kamcmd commands : [root@vm-vse02-siprouter1 ~]# kamctl dispatcher dump which: no gdb in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/) { "jsonrpc": "2.0", "result": { "NRSETS": 1, "RECORDS": [{ "SET": { "ID": 1, "TARGETS": [{ "DEST": { "URI": "sip:cs1-tool-misc.orange-voicemail.net:5060" <sip:cs1-tool-misc.orange-voicemail.net:5060>, "FLAGS": "AP", "PRIORITY": 0 } }] } }] }, "id": 1301 } [root@vm-vse02-siprouter1 ~]# kamcmd dispatcher.list { NRSETS: 1 RECORDS: { SET: { ID: 1 TARGETS: { DEST: { URI: sip:cs1-tool-misc.orange-voicemail.net:5060 FLAGS: AP PRIORITY: 0 } } } } } Now, if I change the fifo patch and name to “/var/run/kamailio/kamailio_rpc_fifo’ and apply the following rights on /var/run/ to: chmod 755 kamalio/ chown + kamailio:kamailio kamailio/ then kamailio starts. Is there a reason for these results ? Thanks in advance for your answer. Cordialement Patrick GINHOUX _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com <http://www.asipto.com> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com <http://www.kamailioworld.com> -- Daniel-Constantin Mierla www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com <http://www.asipto.com> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com <http://www.kamailioworld.com> -- Daniel-Constantin Mierla www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com <http://www.asipto.com> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com <http://www.kamailioworld.com>
-- Daniel-Constantin Mierla www.twitter.com/miconda http://www.twitter.com/miconda -- www.linkedin.com/in/miconda http://www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com http://www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com http://www.kamailioworld.com
Hi,
I have downloaded and installed only the new rpm : kamailio-5.0.0-10.1.x86_64.rpm. Is it enough ?
Then I try to start Kamailio that fails :
[root@vm-vse02-siprouter2 kamailio]# service kamailio start
Starting kamailio (via systemctl): Job for kamailio.service failed. See 'systemctl status kamailio.service' and 'journalctl -xn' for details.
[FAILED]
[root@vm-vse02-siprouter2 kamailio]#
[root@vm-vse02-siprouter2 kamailio]#
[root@vm-vse02-siprouter2 kamailio]# 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 13:58:33 CEST; 4s ago
Process: 4724 ExecStop=/etc/rc.d/init.d/kamailio stop (code=exited, status=0/SUCCESS)
Process: 4867 ExecStart=/etc/rc.d/init.d/kamailio start (code=exited, status=1/FAILURE)
Main PID: 2946 (code=exited, status=0/SUCCESS)
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4878]: DEBUG: <core> [core/route_struct.c:129]: mk_action(): ACTION_#63 #0/2: 21(15)/ 0x7fdd400f638 8
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4878]: DEBUG: <core> [core/route_struct.c:129]: mk_action(): ACTION_#63 #1/2: 22(16)/ 0x7fdd400f588 8
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4878]: DEBUG: <core> [core/pvapi.c:321]: pv_cache_lookup(): pvar [$var(i:NodePath)] found in cache
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4878]: 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 13:58:33 vm-vse02-siprouter2 kamailio[4878]: 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 13:58:33 vm-vse02-siprouter2 kamailio[4880]: CRITICAL: <core> [core/daemonize.c:345]: daemonize(): running process found in the pid file /var/run/kamailio/kamailio.pid
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4867]: Starting kamailio:
Apr 05 13:58:33 vm-vse02-siprouter2 systemd[1]: kamailio.service: control process exited, code=exited status=1
Apr 05 13:58:33 vm-vse02-siprouter2 systemd[1]: Failed to start SYSV: Kamailio is a fast, reliable and flexible SIP Server..
Apr 05 13:58:33 vm-vse02-siprouter2 systemd[1]: Unit kamailio.service entered failed state.
I get also a strange result when I try to start Kamailio using the service Kamailio command, that is nothing happen, the server doesn’t give a status :
[root@vm-vse02-siprouter2 ~]# service kamailio start
Starting kamailio (via systemctl): ^C
I have to send a CTRL C to break the action.
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : mercredi 5 avril 2017 13:45 À : Ginhoux, Patrick patrick.ginhoux@fr.unisys.com; Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org; Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
apparently the /var/run/kamailio folder was not created by the init.d script for rpm, as it is done in the deb specs. I updated it and triggered a rebuild of rpms, available at:
https://build.opensuse.org/package/show/home:kamailio:v5.0.x-rpms/kamailio50
Try to upgrade and then see if it works.
Later today we will release v5.0.1 and the rpms for it will have the new init.d script.
Cheers, Daniel
On 03.04.17 15:01, Ginhoux, Patrick wrote:
Hi,
I use « service kamailio start », so the init.d script that is the one created at the installation.
Cordialement
Patrick GINHOUX
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Daniel-Constantin Mierla Envoyé : lundi 3 avril 2017 14:56 À : Kamailio (SER) - Users Mailing List mailto:sr-users@lists.kamailio.org sr-users@lists.kamailio.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
how do you start Kamailio? Via init.d/systemd script?
Cheers, Daniel
On 03.04.17 14:34, Ginhoux, Patrick wrote:
Hi,
Selinux is disabled.
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : lundi 3 avril 2017 14:33 À : Ginhoux, Patrick mailto:patrick.ginhoux@fr.unisys.com patrick.ginhoux@fr.unisys.com; Kamailio (SER) - Users Mailing List mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
have you disabled selinux to see if starts ok without it?
Cheers, Daniel
On 03.04.17 13:54, Ginhoux, Patrick wrote:
Hi,
Well, with one of my colleagues, we did some research and test, but we don’t find where the privilege issue is with the /var/ FS.
If the fifo filename is "/var/run/kamailio/kamailio_rpc_fifo" or "/var/run/kamailio_rpc_fifo", we have this privilege issue.
I thought that the following declaration would prevent this security issue :
modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME)
modparam("jsonrpcs", "fifo_mode", 0755)
modparam("jsonrpcs", "fifo_group", "kamailio")
modparam("jsonrpcs", "fifo_user", "kamailio")
but it is not the case.
For the moment only the fifo filename “/tmp/kamailio_rpc_fifo" is valid for kamailio to start.
Cordialement
Patrick GINHOUX
De : Ginhoux, Patrick Envoyé : lundi 27 mars 2017 17:46 À : 'miconda@gmail.com mailto:miconda@gmail.com ' mailto:miconda@gmail.com miconda@gmail.com; Kamailio (SER) - Users Mailing List mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org Objet : RE: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hi,
I continue to investigate on this area.
I’m thinking that there are some security settings on the FS /var/, and I’m looking for if we have the rights to change it (I work for a project and don’t have all the ability to change some settings without agreement).
I’ll update you later tomorrow.
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : lundi 27 mars 2017 15:28 À : Ginhoux, Patrick <patrick.ginhoux@fr.unisys.com mailto:patrick.ginhoux@fr.unisys.com >; Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org > Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
as recently as last week, someone encountered an file access problem while installing Siremis, which is using also some temporary files in /var/, even it was granting provileges via chown and chmod. All went fine after disabling selinux. It was on a centos.
I am not saying it is the same, but it could, so try without centos to see if the issue persists.
Cheers, Daniel
On 27/03/2017 15:10, Ginhoux, Patrick wrote:
Hi,
This is the RHEL 7.1 distro, and there is use of selinux, apparmor or other tools.
Are you meaning that the /var/run/ folder would be secured more than other folders?
Cordialement
Patrick GINHOUX
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Daniel-Constantin Mierla Envoyé : lundi 27 mars 2017 13:52 À : Kamailio (SER) - Users Mailing List mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
kamailio should attempt to create the /var/run/kamailio folder if the application is run with enough privileges. However, some operating systems add more constraints on top of the execution user.
What is your OS distro? Do you have selinux, apparmor or other similar tools enabled?
Cheers, Daniel
On 24/03/2017 17:52, Ginhoux, Patrick wrote:
In my ‘kamctlrc’ file :
## path to FIFO file for engine RPCFIFO
RPCFIFOPATH="/var/run/kamailio/kamailio_rpc_fifo"
#RPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In my ‘kamailio.cfg’ :
!!ifndef DEFINE_FIFO_NAME
!!define DEFINE_FIFO_NAME "/var/run/kamailio/kamailio_rpc_fifo"
!!endif
modparam("jsonrpcs", "pretty_format", 1)
modparam("jsonrpcs", "transport", 2)
modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME)
modparam("jsonrpcs", "fifo_mode", 0755)
modparam("jsonrpcs", "fifo_group", "kamailio")
modparam("jsonrpcs", "fifo_user", "kamailio")
kamailio doesn’t start. It reports ‘Permission denied’ :
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: ERROR: jsonrpcs [jsonrpcs_fifo.c:144]: jsonrpc_init_fifo_server(): Can't create FIFO: Permission denied (mode=493)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: CRITICAL: jsonrpcs [jsonrpcs_fifo.c:489]: jsonrpc_fifo_process(): failed to init jsonrpc fifo server
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ALERT: <core> [main.c:741]: handle_sigs(): child process 1138 exited normally, status=255
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank 4: tm
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -1: tm
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: htable [htable.c:226]: child_init(): rank is (1)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: INFO: <core> [main.c:759]: handle_sigs(): terminating due to SIGCHLD
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1139]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -2: kex
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1130@129.227.83.108 mailto:15b1f0d63a718465-1130@129.227.83.108 '
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1137@129.227.83.108 mailto:15b1f0d63a718465-1137@129.227.83.108 '
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: <core> [core/action.c:1656]: run_child_one_init_route(): attempting to run event_route[core:worker-one-init]
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1136]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1135]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1134]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1133]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1132]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1131]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1129]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1128]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: ctl [ctl.c:387]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: Permission denied (13)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: jsonrpcs [jsonrpcs_fifo.c:595]: jsonrpc_fifo_destroy(): FIFO stat failed: Permission denied
If I replace the values in the 2 files as appropriate :
In the ‘kamctlrc” to RPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In the ‘kamailio.cfg” to !!define DEFINE_FIFO_NAME "/tmp/kamailio_rpc_fifo"
Then kamailo starts :
[root@vm-vse02-siprouter1 ~]# ps -ef |grep kam
kamailio 1235 1 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1236 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1237 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1238 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1239 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1240 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1241 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1242 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1243 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1244 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1245 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1246 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1247 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1248 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1251 1165 0 17:37 pts/0 00:00:00 grep --color=auto kam
and I can get result from kamctl/kamcmd commands :
[root@vm-vse02-siprouter1 ~]# kamctl dispatcher dump
which: no gdb in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/)
{
"jsonrpc": "2.0",
"result": {
"NRSETS": 1,
"RECORDS": [{
"SET": {
"ID": 1,
"TARGETS": [{
"DEST": {
"URI": sip:cs1-tool-misc.orange-voicemail.net:5060 "sip:cs1-tool-misc.orange-voicemail.net:5060",
"FLAGS": "AP",
"PRIORITY": 0
}
}]
}
}]
},
"id": 1301
}
[root@vm-vse02-siprouter1 ~]# kamcmd dispatcher.list
{
NRSETS: 1
RECORDS: {
SET: {
ID: 1
TARGETS: {
DEST: {
URI: sip:cs1-tool-misc.orange-voicemail.net:5060
FLAGS: AP
PRIORITY: 0
}
}
}
}
}
Now, if I change the fifo patch and name to “/var/run/kamailio/kamailio_rpc_fifo’ and apply the following rights on /var/run/ to:
chmod 755 kamalio/
chown + kamailio:kamailio kamailio/
then kamailio starts.
Is there a reason for these results ?
Thanks in advance for your answer.
Cordialement
Patrick GINHOUX
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
is kamailio already running there?
Cheers, Daniel
On 05.04.17 14:12, Ginhoux, Patrick wrote:
Hi,
I have downloaded and installed only the new rpm : kamailio-5.0.0-10.1.x86_64.rpm. Is it enough ?
Then I try to start Kamailio that fails :
[root@vm-vse02-siprouter2 kamailio]# service kamailio start
Starting kamailio (via systemctl): Job for kamailio.service failed. See 'systemctl status kamailio.service' and 'journalctl -xn' for details.
[FAILED]
[root@vm-vse02-siprouter2 kamailio]#
[root@vm-vse02-siprouter2 kamailio]#
[root@vm-vse02-siprouter2 kamailio]# 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 13:58:33 CEST; 4s ago
Process: 4724 ExecStop=/etc/rc.d/init.d/kamailio stop (code=exited, status=0/SUCCESS)
Process: 4867 ExecStart=/etc/rc.d/init.d/kamailio start (code=exited, status=1/FAILURE)
Main PID: 2946 (code=exited, status=0/SUCCESS)
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4878]: DEBUG: <core> [core/route_struct.c:129]: mk_action(): ACTION_#63 #0/2: 21(15)/ 0x7fdd400f638 8
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4878]: DEBUG: <core> [core/route_struct.c:129]: mk_action(): ACTION_#63 #1/2: 22(16)/ 0x7fdd400f588 8
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4878]: DEBUG: <core> [core/pvapi.c:321]: pv_cache_lookup(): pvar [$var(i:NodePath)] found in cache
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4878]: 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 13:58:33 vm-vse02-siprouter2 kamailio[4878]: 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 13:58:33 vm-vse02-siprouter2 kamailio[4880]: CRITICAL: <core> [core/daemonize.c:345]: daemonize(): running process found in the pid file /var/run/kamailio/kamailio.pid
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4867]: Starting kamailio:
Apr 05 13:58:33 vm-vse02-siprouter2 systemd[1]: kamailio.service: control process exited, code=exited status=1
Apr 05 13:58:33 vm-vse02-siprouter2 systemd[1]: Failed to start SYSV: Kamailio is a fast, reliable and flexible SIP Server..
Apr 05 13:58:33 vm-vse02-siprouter2 systemd[1]: Unit kamailio.service entered failed state.
I get also a strange result when I try to start Kamailio using the service Kamailio command, that is nothing happen, the server doesn’t give a status :
[root@vm-vse02-siprouter2 ~]# service kamailio start
Starting kamailio (via systemctl): ^C
I have to send a CTRL C to break the action.
Cordialement
Patrick GINHOUX
*De :*Daniel-Constantin Mierla [mailto:miconda@gmail.com] *Envoyé :* mercredi 5 avril 2017 13:45 *À :* Ginhoux, Patrick patrick.ginhoux@fr.unisys.com; Kamailio (SER)
- Users Mailing List sr-users@lists.sip-router.org; Kamailio (SER) -
Users Mailing List sr-users@lists.kamailio.org *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
apparently the /var/run/kamailio folder was not created by the init.d script for rpm, as it is done in the deb specs. I updated it and triggered a rebuild of rpms, available at:
https://build.opensuse.org/package/show/home:kamailio:v5.0.x-rpms/kamailio50
Try to upgrade and then see if it works.
Later today we will release v5.0.1 and the rpms for it will have the new init.d script.
Cheers, Daniel
On 03.04.17 15:01, Ginhoux, Patrick wrote:
Hi, I use « service kamailio start », so the init.d script that is the one created at the installation. Cordialement Patrick GINHOUX *De :*sr-users [mailto:sr-users-bounces@lists.sip-router.org] *De la part de* Daniel-Constantin Mierla *Envoyé :* lundi 3 avril 2017 14:56 *À :* Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org> <mailto:sr-users@lists.kamailio.org> *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem Hello, how do you start Kamailio? Via init.d/systemd script? Cheers, Daniel On 03.04.17 14:34, Ginhoux, Patrick wrote: Hi, Selinux is disabled. Cordialement Patrick GINHOUX *De :*Daniel-Constantin Mierla [mailto:miconda@gmail.com] *Envoyé :* lundi 3 avril 2017 14:33 *À :* Ginhoux, Patrick <patrick.ginhoux@fr.unisys.com> <mailto:patrick.ginhoux@fr.unisys.com>; Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org> <mailto:sr-users@lists.sip-router.org> *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem Hello, have you disabled selinux to see if starts ok without it? Cheers, Daniel On 03.04.17 13:54, Ginhoux, Patrick wrote: Hi, Well, with one of my colleagues, we did some research and test, but we don’t find where the privilege issue is with the /var/ FS. If the fifo filename is "/var/run/kamailio/kamailio_rpc_fifo" or "/var/run/kamailio_rpc_fifo", we have this privilege issue. I thought that the following declaration would prevent this security issue : modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME) modparam("jsonrpcs", "fifo_mode", 0755) modparam("jsonrpcs", "fifo_group", "kamailio") modparam("jsonrpcs", "fifo_user", "kamailio") but it is not the case. For the moment only the fifo filename “/tmp/kamailio_rpc_fifo" is valid for kamailio to start. Cordialement Patrick GINHOUX *De :*Ginhoux, Patrick *Envoyé :* lundi 27 mars 2017 17:46 *À :* 'miconda@gmail.com <mailto:miconda@gmail.com>' <miconda@gmail.com> <mailto:miconda@gmail.com>; Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org> <mailto:sr-users@lists.sip-router.org> *Objet :* RE: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem Hi, I continue to investigate on this area. I’m thinking that there are some security settings on the FS /var/, and I’m looking for if we have the rights to change it (I work for a project and don’t have all the ability to change some settings without agreement). I’ll update you later tomorrow. Cordialement Patrick GINHOUX *De :*Daniel-Constantin Mierla [mailto:miconda@gmail.com] *Envoyé :* lundi 27 mars 2017 15:28 *À :* Ginhoux, Patrick <patrick.ginhoux@fr.unisys.com <mailto:patrick.ginhoux@fr.unisys.com>>; Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org>> *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem Hello, as recently as last week, someone encountered an file access problem while installing Siremis, which is using also some temporary files in /var/, even it was granting provileges via chown and chmod. All went fine after disabling selinux. It was on a centos. I am not saying it is the same, but it could, so try without centos to see if the issue persists. Cheers, Daniel On 27/03/2017 15:10, Ginhoux, Patrick wrote: Hi, This is the RHEL 7.1 distro, and there is use of selinux, apparmor or other tools. Are you meaning that the /var/run/ folder would be secured more than other folders? Cordialement Patrick GINHOUX *De :*sr-users [mailto:sr-users-bounces@lists.sip-router.org] *De la part de* Daniel-Constantin Mierla *Envoyé :* lundi 27 mars 2017 13:52 *À :* Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org> <mailto:sr-users@lists.sip-router.org> *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem Hello, kamailio should attempt to create the /var/run/kamailio folder if the application is run with enough privileges. However, some operating systems add more constraints on top of the execution user. What is your OS distro? Do you have selinux, apparmor or other similar tools enabled? Cheers, Daniel On 24/03/2017 17:52, Ginhoux, Patrick wrote: In my ‘kamctlrc’ file : ## path to FIFO file for engine RPCFIFO RPCFIFOPATH="/var/run/kamailio/kamailio_rpc_fifo" #RPCFIFOPATH="/tmp/kamailio_rpc_fifo" In my ‘kamailio.cfg’ : !!ifndef DEFINE_FIFO_NAME !!define DEFINE_FIFO_NAME "/var/run/kamailio/kamailio_rpc_fifo" !!endif modparam("jsonrpcs", "pretty_format", 1) modparam("jsonrpcs", "transport", 2) modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME) modparam("jsonrpcs", "fifo_mode", 0755) modparam("jsonrpcs", "fifo_group", "kamailio") modparam("jsonrpcs", "fifo_user", "kamailio") kamailio doesn’t start. It reports ‘Permission denied’ : Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: ERROR: jsonrpcs [jsonrpcs_fifo.c:144]: jsonrpc_init_fifo_server(): Can't create FIFO: Permission denied (mode=493) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: CRITICAL: jsonrpcs [jsonrpcs_fifo.c:489]: jsonrpc_fifo_process(): failed to init jsonrpc fifo server Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ALERT: <core> [main.c:741]: handle_sigs(): child process 1138 exited normally, status=255 Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank 4: tm Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -1: tm Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: htable [htable.c:226]: child_init(): rank is (1) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: INFO: <core> [main.c:759]: handle_sigs(): terminating due to SIGCHLD Mar 24 17:31:21 localhost /usr/sbin/kamailio[1139]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -2: kex Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1130@129.227.83.108 <mailto:15b1f0d63a718465-1130@129.227.83.108>' Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1137@129.227.83.108 <mailto:15b1f0d63a718465-1137@129.227.83.108>' Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: <core> [core/action.c:1656]: run_child_one_init_route(): attempting to run event_route[core:worker-one-init] Mar 24 17:31:21 localhost /usr/sbin/kamailio[1136]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1135]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1134]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1133]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1132]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1131]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1129]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1128]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: ctl [ctl.c:387]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: Permission denied (13) Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: jsonrpcs [jsonrpcs_fifo.c:595]: jsonrpc_fifo_destroy(): FIFO stat failed: Permission denied If I replace the values in the 2 files as appropriate : In the ‘kamctlrc” toRPCFIFOPATH="/tmp/kamailio_rpc_fifo" In the ‘kamailio.cfg” to!!define DEFINE_FIFO_NAME "/tmp/kamailio_rpc_fifo" Then kamailo starts : [root@vm-vse02-siprouter1 ~]# ps -ef |grep kam kamailio 1235 1 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1236 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1237 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1238 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1239 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1240 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1241 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1242 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1243 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1244 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1245 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1246 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1247 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio kamailio 1248 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio root 1251 1165 0 17:37 pts/0 00:00:00 grep --color=auto kam and I can get result from kamctl/kamcmd commands : [root@vm-vse02-siprouter1 ~]# kamctl dispatcher dump which: no gdb in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/) { "jsonrpc": "2.0", "result": { "NRSETS": 1, "RECORDS": [{ "SET": { "ID": 1, "TARGETS": [{ "DEST": { "URI": "sip:cs1-tool-misc.orange-voicemail.net:5060" <sip:cs1-tool-misc.orange-voicemail.net:5060>, "FLAGS": "AP", "PRIORITY": 0 } }] } }] }, "id": 1301 } [root@vm-vse02-siprouter1 ~]# kamcmd dispatcher.list { NRSETS: 1 RECORDS: { SET: { ID: 1 TARGETS: { DEST: { URI: sip:cs1-tool-misc.orange-voicemail.net:5060 FLAGS: AP PRIORITY: 0 } } } } } Now, if I change the fifo patch and name to “/var/run/kamailio/kamailio_rpc_fifo’ and apply the following rights on /var/run/ to: chmod 755 kamalio/ chown + kamailio:kamailio kamailio/ then kamailio starts. Is there a reason for these results ? Thanks in advance for your answer. Cordialement Patrick GINHOUX _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com <http://www.asipto.com> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com <http://www.kamailioworld.com> -- Daniel-Constantin Mierla www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com <http://www.asipto.com> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com <http://www.kamailioworld.com> -- Daniel-Constantin Mierla www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com <http://www.asipto.com> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com <http://www.kamailioworld.com> -- Daniel-Constantin Mierla www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com <http://www.asipto.com> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com <http://www.kamailioworld.com>
-- Daniel-Constantin Mierla www.twitter.com/miconda http://www.twitter.com/miconda -- www.linkedin.com/in/miconda http://www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com http://www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com http://www.kamailioworld.com
Hi,
Yes, it is running that is something I don’t understand how it can start with this error:
[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam
kamailio 1225 1 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1226 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1227 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1228 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1229 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1230 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1231 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1232 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1233 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1234 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1235 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1236 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1237 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1238 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1344 1171 0 14:26 pts/0 00:00:00 grep --color=auto kam
So I kill the processes and then start again Kamailio, that again doesn’t end without CTRL-C. After that I can see Kamailio running:
[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam
kamailio 1426 1 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1427 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1428 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1429 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1430 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1431 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1432 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1433 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1434 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1435 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1436 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1437 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1438 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1439 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1444 1171 0 14:32 pts/0 00:00:00 grep --color=auto kam
Do you have an idea that could explain this result?
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : mercredi 5 avril 2017 14:22 À : Ginhoux, Patrick patrick.ginhoux@fr.unisys.com Cc : Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
is kamailio already running there?
Cheers, Daniel
On 05.04.17 14:12, Ginhoux, Patrick wrote:
Hi,
I have downloaded and installed only the new rpm : kamailio-5.0.0-10.1.x86_64.rpm. Is it enough ?
Then I try to start Kamailio that fails :
[root@vm-vse02-siprouter2 kamailio]# service kamailio start
Starting kamailio (via systemctl): Job for kamailio.service failed. See 'systemctl status kamailio.service' and 'journalctl -xn' for details.
[FAILED]
[root@vm-vse02-siprouter2 kamailio]#
[root@vm-vse02-siprouter2 kamailio]#
[root@vm-vse02-siprouter2 kamailio]# 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 13:58:33 CEST; 4s ago
Process: 4724 ExecStop=/etc/rc.d/init.d/kamailio stop (code=exited, status=0/SUCCESS)
Process: 4867 ExecStart=/etc/rc.d/init.d/kamailio start (code=exited, status=1/FAILURE)
Main PID: 2946 (code=exited, status=0/SUCCESS)
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4878]: DEBUG: <core> [core/route_struct.c:129]: mk_action(): ACTION_#63 #0/2: 21(15)/ 0x7fdd400f638 8
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4878]: DEBUG: <core> [core/route_struct.c:129]: mk_action(): ACTION_#63 #1/2: 22(16)/ 0x7fdd400f588 8
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4878]: DEBUG: <core> [core/pvapi.c:321]: pv_cache_lookup(): pvar [$var(i:NodePath)] found in cache
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4878]: 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 13:58:33 vm-vse02-siprouter2 kamailio[4878]: 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 13:58:33 vm-vse02-siprouter2 kamailio[4880]: CRITICAL: <core> [core/daemonize.c:345]: daemonize(): running process found in the pid file /var/run/kamailio/kamailio.pid
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4867]: Starting kamailio:
Apr 05 13:58:33 vm-vse02-siprouter2 systemd[1]: kamailio.service: control process exited, code=exited status=1
Apr 05 13:58:33 vm-vse02-siprouter2 systemd[1]: Failed to start SYSV: Kamailio is a fast, reliable and flexible SIP Server..
Apr 05 13:58:33 vm-vse02-siprouter2 systemd[1]: Unit kamailio.service entered failed state.
I get also a strange result when I try to start Kamailio using the service Kamailio command, that is nothing happen, the server doesn’t give a status :
[root@vm-vse02-siprouter2 ~]# service kamailio start
Starting kamailio (via systemctl): ^C
I have to send a CTRL C to break the action.
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : mercredi 5 avril 2017 13:45 À : Ginhoux, Patrick mailto:patrick.ginhoux@fr.unisys.com patrick.ginhoux@fr.unisys.com; Kamailio (SER) - Users Mailing List mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org; Kamailio (SER) - Users Mailing List mailto:sr-users@lists.kamailio.org sr-users@lists.kamailio.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
apparently the /var/run/kamailio folder was not created by the init.d script for rpm, as it is done in the deb specs. I updated it and triggered a rebuild of rpms, available at:
https://build.opensuse.org/package/show/home:kamailio:v5.0.x-rpms/kamailio50
Try to upgrade and then see if it works.
Later today we will release v5.0.1 and the rpms for it will have the new init.d script.
Cheers, Daniel
On 03.04.17 15:01, Ginhoux, Patrick wrote:
Hi,
I use « service kamailio start », so the init.d script that is the one created at the installation.
Cordialement
Patrick GINHOUX
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Daniel-Constantin Mierla Envoyé : lundi 3 avril 2017 14:56 À : Kamailio (SER) - Users Mailing List mailto:sr-users@lists.kamailio.org sr-users@lists.kamailio.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
how do you start Kamailio? Via init.d/systemd script?
Cheers, Daniel
On 03.04.17 14:34, Ginhoux, Patrick wrote:
Hi,
Selinux is disabled.
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : lundi 3 avril 2017 14:33 À : Ginhoux, Patrick mailto:patrick.ginhoux@fr.unisys.com patrick.ginhoux@fr.unisys.com; Kamailio (SER) - Users Mailing List mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
have you disabled selinux to see if starts ok without it?
Cheers, Daniel
On 03.04.17 13:54, Ginhoux, Patrick wrote:
Hi,
Well, with one of my colleagues, we did some research and test, but we don’t find where the privilege issue is with the /var/ FS.
If the fifo filename is "/var/run/kamailio/kamailio_rpc_fifo" or "/var/run/kamailio_rpc_fifo", we have this privilege issue.
I thought that the following declaration would prevent this security issue :
modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME)
modparam("jsonrpcs", "fifo_mode", 0755)
modparam("jsonrpcs", "fifo_group", "kamailio")
modparam("jsonrpcs", "fifo_user", "kamailio")
but it is not the case.
For the moment only the fifo filename “/tmp/kamailio_rpc_fifo" is valid for kamailio to start.
Cordialement
Patrick GINHOUX
De : Ginhoux, Patrick Envoyé : lundi 27 mars 2017 17:46 À : 'miconda@gmail.com mailto:miconda@gmail.com ' mailto:miconda@gmail.com miconda@gmail.com; Kamailio (SER) - Users Mailing List mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org Objet : RE: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hi,
I continue to investigate on this area.
I’m thinking that there are some security settings on the FS /var/, and I’m looking for if we have the rights to change it (I work for a project and don’t have all the ability to change some settings without agreement).
I’ll update you later tomorrow.
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : lundi 27 mars 2017 15:28 À : Ginhoux, Patrick <patrick.ginhoux@fr.unisys.com mailto:patrick.ginhoux@fr.unisys.com >; Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org > Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
as recently as last week, someone encountered an file access problem while installing Siremis, which is using also some temporary files in /var/, even it was granting provileges via chown and chmod. All went fine after disabling selinux. It was on a centos.
I am not saying it is the same, but it could, so try without centos to see if the issue persists.
Cheers, Daniel
On 27/03/2017 15:10, Ginhoux, Patrick wrote:
Hi,
This is the RHEL 7.1 distro, and there is use of selinux, apparmor or other tools.
Are you meaning that the /var/run/ folder would be secured more than other folders?
Cordialement
Patrick GINHOUX
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Daniel-Constantin Mierla Envoyé : lundi 27 mars 2017 13:52 À : Kamailio (SER) - Users Mailing List mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
kamailio should attempt to create the /var/run/kamailio folder if the application is run with enough privileges. However, some operating systems add more constraints on top of the execution user.
What is your OS distro? Do you have selinux, apparmor or other similar tools enabled?
Cheers, Daniel
On 24/03/2017 17:52, Ginhoux, Patrick wrote:
In my ‘kamctlrc’ file :
## path to FIFO file for engine RPCFIFO
RPCFIFOPATH="/var/run/kamailio/kamailio_rpc_fifo"
#RPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In my ‘kamailio.cfg’ :
!!ifndef DEFINE_FIFO_NAME
!!define DEFINE_FIFO_NAME "/var/run/kamailio/kamailio_rpc_fifo"
!!endif
modparam("jsonrpcs", "pretty_format", 1)
modparam("jsonrpcs", "transport", 2)
modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME)
modparam("jsonrpcs", "fifo_mode", 0755)
modparam("jsonrpcs", "fifo_group", "kamailio")
modparam("jsonrpcs", "fifo_user", "kamailio")
kamailio doesn’t start. It reports ‘Permission denied’ :
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: ERROR: jsonrpcs [jsonrpcs_fifo.c:144]: jsonrpc_init_fifo_server(): Can't create FIFO: Permission denied (mode=493)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1138]: CRITICAL: jsonrpcs [jsonrpcs_fifo.c:489]: jsonrpc_fifo_process(): failed to init jsonrpc fifo server
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ALERT: <core> [main.c:741]: handle_sigs(): child process 1138 exited normally, status=255
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank 4: tm
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -1: tm
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: htable [htable.c:226]: child_init(): rank is (1)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: INFO: <core> [main.c:759]: handle_sigs(): terminating due to SIGCHLD
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1139]: DEBUG: <core> [core/sr_module.c:920]: init_mod_child(): rank -2: kex
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1130]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1130@129.227.83.108 mailto:15b1f0d63a718465-1130@129.227.83.108 '
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1137]: DEBUG: tm [callid.c:137]: child_init_callid(): callid: '15b1f0d63a718465-1137@129.227.83.108 mailto:15b1f0d63a718465-1137@129.227.83.108 '
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1127]: DEBUG: <core> [core/action.c:1656]: run_child_one_init_route(): attempting to run event_route[core:worker-one-init]
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1136]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1135]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1134]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1133]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1132]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1131]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1129]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1128]: INFO: <core> [main.c:814]: sig_usr(): signal 15 received
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: ctl [ctl.c:387]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: Permission denied (13)
Mar 24 17:31:21 localhost /usr/sbin/kamailio[1120]: ERROR: jsonrpcs [jsonrpcs_fifo.c:595]: jsonrpc_fifo_destroy(): FIFO stat failed: Permission denied
If I replace the values in the 2 files as appropriate :
In the ‘kamctlrc” to RPCFIFOPATH="/tmp/kamailio_rpc_fifo"
In the ‘kamailio.cfg” to !!define DEFINE_FIFO_NAME "/tmp/kamailio_rpc_fifo"
Then kamailo starts :
[root@vm-vse02-siprouter1 ~]# ps -ef |grep kam
kamailio 1235 1 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1236 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1237 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1238 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1239 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1240 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1241 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1242 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1243 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1244 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1245 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1246 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1247 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1248 1235 0 17:37 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1251 1165 0 17:37 pts/0 00:00:00 grep --color=auto kam
and I can get result from kamctl/kamcmd commands :
[root@vm-vse02-siprouter1 ~]# kamctl dispatcher dump
which: no gdb in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/)
{
"jsonrpc": "2.0",
"result": {
"NRSETS": 1,
"RECORDS": [{
"SET": {
"ID": 1,
"TARGETS": [{
"DEST": {
"URI": sip:cs1-tool-misc.orange-voicemail.net:5060 "sip:cs1-tool-misc.orange-voicemail.net:5060",
"FLAGS": "AP",
"PRIORITY": 0
}
}]
}
}]
},
"id": 1301
}
[root@vm-vse02-siprouter1 ~]# kamcmd dispatcher.list
{
NRSETS: 1
RECORDS: {
SET: {
ID: 1
TARGETS: {
DEST: {
URI: sip:cs1-tool-misc.orange-voicemail.net:5060
FLAGS: AP
PRIORITY: 0
}
}
}
}
}
Now, if I change the fifo patch and name to “/var/run/kamailio/kamailio_rpc_fifo’ and apply the following rights on /var/run/ to:
chmod 755 kamalio/
chown + kamailio:kamailio kamailio/
then kamailio starts.
Is there a reason for these results ?
Thanks in advance for your answer.
Cordialement
Patrick GINHOUX
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi,
Message resend due to size exceeded.
Yes, it is running that is something I don’t understand how it can start with this error:
[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam
kamailio 1225 1 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1226 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1227 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1228 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1229 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1230 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1231 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1232 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1233 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1234 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1235 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1236 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1237 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1238 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1344 1171 0 14:26 pts/0 00:00:00 grep --color=auto kam
So I kill the processes and then start again Kamailio, that again doesn’t end without CTRL-C. After that I can see Kamailio running:
[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam
kamailio 1426 1 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1427 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1428 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1429 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1430 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1431 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1432 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1433 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1434 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1435 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1436 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1437 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1438 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1439 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1444 1171 0 14:32 pts/0 00:00:00 grep --color=auto kam
Do you have an idea that could explain this result?
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [ mailto:miconda@gmail.com mailto:miconda@gmail.com] Envoyé : mercredi 5 avril 2017 14:22 À : Ginhoux, Patrick < mailto:patrick.ginhoux@fr.unisys.com patrick.ginhoux@fr.unisys.com> Cc : Kamailio (SER) - Users Mailing List < mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org> Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
is kamailio already running there?
Cheers, Daniel
On 05.04.17 14:12, Ginhoux, Patrick wrote:
Hi,
I have downloaded and installed only the new rpm : kamailio-5.0.0-10.1.x86_64.rpm. Is it enough ?
Then I try to start Kamailio that fails :
[root@vm-vse02-siprouter2 kamailio]# service kamailio start
Starting kamailio (via systemctl): Job for kamailio.service failed. See 'systemctl status kamailio.service' and 'journalctl -xn' for details.
[FAILED]
[root@vm-vse02-siprouter2 kamailio]#
[root@vm-vse02-siprouter2 kamailio]#
[root@vm-vse02-siprouter2 kamailio]# 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 13:58:33 CEST; 4s ago
Process: 4724 ExecStop=/etc/rc.d/init.d/kamailio stop (code=exited, status=0/SUCCESS)
Process: 4867 ExecStart=/etc/rc.d/init.d/kamailio start (code=exited, status=1/FAILURE)
Main PID: 2946 (code=exited, status=0/SUCCESS)
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4878]: DEBUG: <core> [core/route_struct.c:129]: mk_action(): ACTION_#63 #0/2: 21(15)/ 0x7fdd400f638 8
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4878]: DEBUG: <core> [core/route_struct.c:129]: mk_action(): ACTION_#63 #1/2: 22(16)/ 0x7fdd400f588 8
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4878]: DEBUG: <core> [core/pvapi.c:321]: pv_cache_lookup(): pvar [$var(i:NodePath)] found in cache
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4878]: 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 13:58:33 vm-vse02-siprouter2 kamailio[4878]: 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 13:58:33 vm-vse02-siprouter2 kamailio[4880]: CRITICAL: <core> [core/daemonize.c:345]: daemonize(): running process found in the pid file /var/run/kamailio/kamailio.pid
Apr 05 13:58:33 vm-vse02-siprouter2 kamailio[4867]: Starting kamailio:
Apr 05 13:58:33 vm-vse02-siprouter2 systemd[1]: kamailio.service: control process exited, code=exited status=1
Apr 05 13:58:33 vm-vse02-siprouter2 systemd[1]: Failed to start SYSV: Kamailio is a fast, reliable and flexible SIP Server..
Apr 05 13:58:33 vm-vse02-siprouter2 systemd[1]: Unit kamailio.service entered failed state.
I get also a strange result when I try to start Kamailio using the service Kamailio command, that is nothing happen, the server doesn’t give a status :
[root@vm-vse02-siprouter2 ~]# service kamailio start
Starting kamailio (via systemctl): ^C
I have to send a CTRL C to break the action.
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [ mailto:miconda@gmail.com mailto:miconda@gmail.com] Envoyé : mercredi 5 avril 2017 13:45 À : Ginhoux, Patrick mailto:patrick.ginhoux@fr.unisys.com patrick.ginhoux@fr.unisys.com; Kamailio (SER) - Users Mailing List mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org; Kamailio (SER) - Users Mailing List mailto:sr-users@lists.kamailio.org sr-users@lists.kamailio.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
apparently the /var/run/kamailio folder was not created by the init.d script for rpm, as it is done in the deb specs. I updated it and triggered a rebuild of rpms, available at:
https://build.opensuse.org/package/show/home:kamailio:v5.0.x-rpms/kamailio50 https://build.opensuse.org/package/show/home:kamailio:v5.0.x-rpms/kamailio50
Try to upgrade and then see if it works.
Later today we will release v5.0.1 and the rpms for it will have the new init.d script.
Cheers, Daniel
On 03.04.17 15:01, Ginhoux, Patrick wrote:
Hi,
I use « service kamailio start », so the init.d script that is the one created at the installation.
Cordialement
Patrick GINHOUX
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Daniel-Constantin Mierla Envoyé : lundi 3 avril 2017 14:56 À : Kamailio (SER) - Users Mailing List mailto:sr-users@lists.kamailio.org sr-users@lists.kamailio.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
how do you start Kamailio? Via init.d/systemd script?
Cheers, Daniel
On 03.04.17 14:34, Ginhoux, Patrick wrote:
Hi,
Selinux is disabled.
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [ mailto:miconda@gmail.com mailto:miconda@gmail.com] Envoyé : lundi 3 avril 2017 14:33 À : Ginhoux, Patrick mailto:patrick.ginhoux@fr.unisys.com patrick.ginhoux@fr.unisys.com; Kamailio (SER) - Users Mailing List mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
have you disabled selinux to see if starts ok without it?
Cheers, Daniel
On 03.04.17 13:54, Ginhoux, Patrick wrote:
Hi,
Well, with one of my colleagues, we did some research and test, but we don’t find where the privilege issue is with the /var/ FS.
If the fifo filename is "/var/run/kamailio/kamailio_rpc_fifo" or "/var/run/kamailio_rpc_fifo", we have this privilege issue.
I thought that the following declaration would prevent this security issue :
modparam("jsonrpcs", "fifo_name", DEFINE_FIFO_NAME)
modparam("jsonrpcs", "fifo_mode", 0755)
modparam("jsonrpcs", "fifo_group", "kamailio")
modparam("jsonrpcs", "fifo_user", "kamailio")
but it is not the case.
For the moment only the fifo filename “/tmp/kamailio_rpc_fifo" is valid for kamailio to start.
Cordialement
Patrick GINHOUX
Hello,
if kamailio is already running, you have to do a restart:
service kamailio restart
Cheers, Daniel
On 05.04.17 14:38, Ginhoux, Patrick wrote:
Hi,
Message resend due to size exceeded.
Yes, it is running that is something I don’t understand how it can start with this error:
[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam
kamailio 1225 1 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1226 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1227 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1228 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1229 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1230 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1231 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1232 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1233 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1234 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1235 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1236 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1237 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1238 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1344 1171 0 14:26 pts/0 00:00:00 grep --color=auto kam
So I kill the processes and then start again Kamailio, that again doesn’t end without CTRL-C. After that I can see Kamailio running:
[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam
kamailio 1426 1 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1427 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1428 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1429 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1430 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1431 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1432 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1433 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1434 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1435 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1436 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1437 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1438 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1439 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1444 1171 0 14:32 pts/0 00:00:00 grep --color=auto kam
Do you have an idea that could explain this result?
Cordialement
Patrick GINHOUX
Hi,
Actually I discovered that kamailio is running after I break the ‘service Kamailio start’ command because of no response.
So I kill the Kamailio processes, check that it is not running anymore. In this case the start command is sufficient.
Below the action I do:
[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam
kamailio 1426 1 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1427 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1428 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1429 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1430 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1431 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1432 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1433 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1434 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1435 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1436 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1437 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1438 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1439 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1461 1171 0 14:45 pts/0 00:00:00 grep --color=auto kam
[root@vm-vse02-siprouter2 ~]# kill 1426
[root@vm-vse02-siprouter2 ~]#
[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam
root 1465 1171 0 14:46 pts/0 00:00:00 grep --color=auto kam
[root@vm-vse02-siprouter2 ~]#
[root@vm-vse02-siprouter2 ~]# service kamailio start
Starting kamailio (via systemctl): ^C
[root@vm-vse02-siprouter2 ~]#
[root@vm-vse02-siprouter2 ~]#
[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam
kamailio 1495 1 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1496 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1497 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1498 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1499 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1500 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1501 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1502 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1503 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1504 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1505 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1506 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1507 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1508 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1511 1171 0 14:47 pts/0 00:00:00 grep --color=auto kam
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : mercredi 5 avril 2017 14:42 À : Ginhoux, Patrick patrick.ginhoux@fr.unisys.com Cc : Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
if kamailio is already running, you have to do a restart:
service kamailio restart
Cheers, Daniel
On 05.04.17 14:38, Ginhoux, Patrick wrote:
Hi,
Message resend due to size exceeded.
Yes, it is running that is something I don’t understand how it can start with this error:
[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam
kamailio 1225 1 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1226 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1227 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1228 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1229 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1230 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1231 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1232 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1233 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1234 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1235 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1236 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1237 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1238 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1344 1171 0 14:26 pts/0 00:00:00 grep --color=auto kam
So I kill the processes and then start again Kamailio, that again doesn’t end without CTRL-C. After that I can see Kamailio running:
[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam
kamailio 1426 1 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1427 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1428 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1429 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1430 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1431 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1432 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1433 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1434 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1435 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1436 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1437 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1438 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1439 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1444 1171 0 14:32 pts/0 00:00:00 grep --color=auto kam
Do you have an idea that could explain this result?
Cordialement
Patrick GINHOUX
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
De : Ginhoux, Patrick Envoyé : mercredi 5 avril 2017 14:49 À : 'miconda@gmail.com' miconda@gmail.com Cc : Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Objet : RE: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hi,
Actually I discovered that kamailio is running after I break the ‘service Kamailio start’ command because of no response.
So I kill the Kamailio processes, check that it is not running anymore. In this case the start command is sufficient.
Below the action I do:
[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam
kamailio 1426 1 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1427 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1428 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1429 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1430 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1431 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1432 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1433 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1434 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1435 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1436 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1437 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1438 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1439 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1461 1171 0 14:45 pts/0 00:00:00 grep --color=auto kam
[root@vm-vse02-siprouter2 ~]# kill 1426
[root@vm-vse02-siprouter2 ~]#
[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam
root 1465 1171 0 14:46 pts/0 00:00:00 grep --color=auto kam
[root@vm-vse02-siprouter2 ~]#
[root@vm-vse02-siprouter2 ~]# service kamailio start
Starting kamailio (via systemctl): ^C
[root@vm-vse02-siprouter2 ~]#
[root@vm-vse02-siprouter2 ~]#
[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam
kamailio 1495 1 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1496 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1497 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1498 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1499 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1500 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1501 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1502 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1503 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1504 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1505 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1506 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1507 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1508 1495 0 14:47 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1511 1171 0 14:47 pts/0 00:00:00 grep --color=auto kam
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : mercredi 5 avril 2017 14:42 À : Ginhoux, Patrick <patrick.ginhoux@fr.unisys.com mailto:patrick.ginhoux@fr.unisys.com > Cc : Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org > Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
if kamailio is already running, you have to do a restart:
service kamailio restart
Cheers, Daniel
On 05.04.17 14:38, Ginhoux, Patrick wrote:
Hi,
Message resend due to size exceeded.
Yes, it is running that is something I don’t understand how it can start with this error:
[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam
kamailio 1225 1 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1226 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1227 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1228 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1229 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1230 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1231 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1232 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1233 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1234 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1235 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1236 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1237 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1238 1225 0 14:03 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1344 1171 0 14:26 pts/0 00:00:00 grep --color=auto kam
So I kill the processes and then start again Kamailio, that again doesn’t end without CTRL-C. After that I can see Kamailio running:
[root@vm-vse02-siprouter2 ~]# ps -ef |grep kam
kamailio 1426 1 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1427 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1428 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1429 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1430 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1431 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1432 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1433 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1434 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1435 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1436 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1437 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1438 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1439 1426 0 14:31 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1444 1171 0 14:32 pts/0 00:00:00 grep --color=auto kam
Do you have an idea that could explain this result?
Cordialement
Patrick GINHOUX
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
Hi,
Nothing happens after the ‘service kamailio stop’; kamailio is still running (same pid) ((as detaillled below).
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : mercredi 5 avril 2017 15:44 À : Ginhoux, Patrick patrick.ginhoux@fr.unisys.com Cc : Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
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
Hello,
On 05.04.17 15:46, Ginhoux, Patrick wrote:
Hi,
Nothing happens after the ‘service kamailio stop’; kamailio is still running (same pid) ((as detaillled below).
can you run in terminal and give the output of the next command?
killproc -h
It seems that some versions are using a default path to PID file, which may not match where kamailio writes it.
Cheers, Daniel
Hi,
The killproc command doesn’t exist :
[root@vm-vse02-siprouter2 ~]# killproc -h
-bash: killproc: command not found
To help the debug, I added ‘echo’ command at the case statement in the /etc/init.d/Kamailio script :
# See how we were called.
case "$1" in
start|debug)
echo "GINHOUX Start"
start
;;
stop)
echo "GINHOUX"
stop
;;
status)
status $KAM
RETVAL=$?
;;
restart)
stop
start
;;
condrestart)
if [ -f $PID_FILE ] ; then
stop
start
fi
;;
*)
echo "PATRICK 2"
echo $"Usage: $PROG {start|stop|restart|condrestart|status|debug|help}"
exit 1
esac
The results of the different action are :
- service kamailio stop è Nothing is displayed
- service kamailio start è Nothing is displayed
- service kamailio XXX è “PATRICK 2” is displayed
[root@vm-vse02-siprouter2 ~]#
[root@vm-vse02-siprouter2 ~]# service kamailio stop
Stopping kamailio (via systemctl): Warning: Unit file of kamailio.service changed on disk, 'systemctl daemon-reload' recommended.
[ OK ]
[root@vm-vse02-siprouter2 ~]# service kamailio start
Starting kamailio (via systemctl): Warning: Unit file of kamailio.service changed on disk, 'systemctl daemon-reload' recommended.
Job for kamailio.service failed. See 'systemctl status kamailio.service' and 'journalctl -xn' for details.
[FAILED]
[root@vm-vse02-siprouter2 ~]# service kamailio XXX
PATRICK 2
Usage: kamailio {start|stop|restart|condrestart|status|debug|help}
It seems that when ‘stop|start’ are used, linux doesn’t run the /etc/init.d/kamailio script.
As you can see that it is complaining about the ‘systemctl daemon-reload’ command to use.
I proceeded the same (add ‘echo’ command) on another server running the previous Kamailio rpm. On this server there are no display (from the ‘echo’ command) but kamailio stops:
[root@vm-vse02-siprouter1 ~]# ps -ef |grep kam
kamailio 1159 1 0 16:35 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1161 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1162 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1163 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1164 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1165 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1166 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1167 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1168 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1169 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1170 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1171 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1172 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1173 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1210 1189 0 16:36 pts/0 00:00:00 tail -f /var/log/kamailio/kamailio.log
root 1242 1220 0 16:45 pts/1 00:00:00 grep --color=auto kam
[root@vm-vse02-siprouter1 ~]# service kamailio stop
Stopping kamailio (via systemctl): [ OK ]
[root@vm-vse02-siprouter1 ~]# ps -ef |grep kam
root 1210 1189 0 16:36 pts/0 00:00:00 tail -f /var/log/kamailio/kamailio.log
root 1273 1220 0 16:46 pts/1 00:00:00 grep --color=auto kam
[root@vm-vse02-siprouter1 ~]#
[root@vm-vse02-siprouter1 ~]# rpm -qa |grep kam
kamailio-5.0.0-7.1.x86_64
it really strange.
So I’m going to revert back to the previous Kamailio rpm on the server where the stop command doesn’t work.
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : mercredi 5 avril 2017 16:00 À : Ginhoux, Patrick patrick.ginhoux@fr.unisys.com Cc : Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
On 05.04.17 15:46, Ginhoux, Patrick wrote:
Hi,
Nothing happens after the ‘service kamailio stop’; kamailio is still running (same pid) ((as detaillled below).
can you run in terminal and give the output of the next command?
killproc -h
It seems that some versions are using a default path to PID file, which may not match where kamailio writes it.
Cheers, Daniel
Hello,
killproc might be only in opensuse as standalone tool and the other rpms have it in init.d lib functions...
Can you install the rpms for kamailio 5.0.1? They are already built:
https://build.opensuse.org/package/show/home:kamailio:v5.0.x-rpms/kamailio50
I tried to force the pid file path to killproc, but maybe the version is not supporting it. You may need to do 'killall kamailio' first time to stop existing kamailio, then do start and stop after installing the new packages.
If it fails, I will look for a different solution and trigger rpms to be rebuilt.
Cheers, Daniel
On 05.04.17 16:50, Ginhoux, Patrick wrote:
Hi,
The killproc command doesn’t exist :
[root@vm-vse02-siprouter2 ~]# killproc -h
-bash: killproc: command not found
To help the debug, I added ‘echo’ command at the case statement in the /etc/init.d/Kamailio script :
# See how we were called.
case "$1" in
start|debug) echo "GINHOUX Start" start ;; stop) echo "GINHOUX" stop ;; status) status $KAM RETVAL=$? ;; restart) stop start ;; condrestart) if [ -f $PID_FILE ] ; then stop start fi ;; *) echo "PATRICK 2" echo $"Usage: $PROG
{start|stop|restart|condrestart|status|debug|help}"
exit 1
esac
The results of the different action are :
service kamailio stop èNothing is displayed
service kamailio start èNothing is displayed
service kamailio XXX è“PATRICK 2” is displayed
[root@vm-vse02-siprouter2 ~]#
[root@vm-vse02-siprouter2 ~]# service kamailio stop
Stopping kamailio (via systemctl): Warning: Unit file of kamailio.service changed on disk, 'systemctl daemon-reload' recommended.
[ OK ]
[root@vm-vse02-siprouter2 ~]# service kamailio start
Starting kamailio (via systemctl): Warning: Unit file of kamailio.service changed on disk, 'systemctl daemon-reload' recommended.
Job for kamailio.service failed. See 'systemctl status kamailio.service' and 'journalctl -xn' for details.
[FAILED]
[root@vm-vse02-siprouter2 ~]# service kamailio XXX
PATRICK 2
Usage: kamailio {start|stop|restart|condrestart|status|debug|help}
It seems that when ‘stop|start’ are used, linux doesn’t run the /etc/init.d/kamailio script.
As you can see that it is complaining about the ‘systemctl daemon-reload’ command to use.
I proceeded the same (add ‘echo’ command) on another server running the previous Kamailio rpm. On this server there are no display (from the ‘echo’ command) but kamailio stops:
[root@vm-vse02-siprouter1 ~]# ps -ef |grep kam
kamailio 1159 1 0 16:35 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1161 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1162 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1163 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1164 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1165 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1166 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1167 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1168 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1169 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1170 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1171 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1172 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1173 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1210 1189 0 16:36 pts/0 00:00:00 tail -f /var/log/kamailio/kamailio.log
root 1242 1220 0 16:45 pts/1 00:00:00 grep --color=auto kam
[root@vm-vse02-siprouter1 ~]# service kamailio stop
Stopping kamailio (via systemctl): [ OK ]
[root@vm-vse02-siprouter1 ~]# ps -ef |grep kam
root 1210 1189 0 16:36 pts/0 00:00:00 tail -f /var/log/kamailio/kamailio.log
root 1273 1220 0 16:46 pts/1 00:00:00 grep --color=auto kam
[root@vm-vse02-siprouter1 ~]#
[root@vm-vse02-siprouter1 ~]# rpm -qa |grep kam
kamailio-5.0.0-7.1.x86_64
it really strange.
So I’m going to revert back to the previous Kamailio rpm on the server where the stop command doesn’t work.
Cordialement
Patrick GINHOUX
*De :*Daniel-Constantin Mierla [mailto:miconda@gmail.com] *Envoyé :* mercredi 5 avril 2017 16:00 *À :* Ginhoux, Patrick patrick.ginhoux@fr.unisys.com *Cc :* Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
On 05.04.17 15:46, Ginhoux, Patrick wrote:
Hi, Nothing happens after the ‘service kamailio stop’; kamailio is still running (same pid) ((as detaillled below).
can you run in terminal and give the output of the next command?
killproc -h
It seems that some versions are using a default path to PID file, which may not match where kamailio writes it.
Cheers, Daniel
-- Daniel-Constantin Mierla www.twitter.com/miconda http://www.twitter.com/miconda -- www.linkedin.com/in/miconda http://www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com http://www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com http://www.kamailioworld.com
Hi,
I’m going to install the kamailio 5.0.1 .
One question before:
Can you tell me if it included the patch for the htable (issue “ht_db_load_table(): key type must be string (type=6)”) ?
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : mercredi 5 avril 2017 17:09 À : Ginhoux, Patrick patrick.ginhoux@fr.unisys.com Cc : Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
killproc might be only in opensuse as standalone tool and the other rpms have it in init.d lib functions...
Can you install the rpms for kamailio 5.0.1? They are already built:
https://build.opensuse.org/package/show/home:kamailio:v5.0.x-rpms/kamailio50
I tried to force the pid file path to killproc, but maybe the version is not supporting it. You may need to do 'killall kamailio' first time to stop existing kamailio, then do start and stop after installing the new packages.
If it fails, I will look for a different solution and trigger rpms to be rebuilt.
Cheers, Daniel
On 05.04.17 16:50, Ginhoux, Patrick wrote:
Hi,
The killproc command doesn’t exist :
[root@vm-vse02-siprouter2 ~]# killproc -h
-bash: killproc: command not found
To help the debug, I added ‘echo’ command at the case statement in the /etc/init.d/Kamailio script :
# See how we were called.
case "$1" in
start|debug)
echo "GINHOUX Start"
start
;;
stop)
echo "GINHOUX"
stop
;;
status)
status $KAM
RETVAL=$?
;;
restart)
stop
start
;;
condrestart)
if [ -f $PID_FILE ] ; then
stop
start
fi
;;
*)
echo "PATRICK 2"
echo $"Usage: $PROG {start|stop|restart|condrestart|status|debug|help}"
exit 1
esac
The results of the different action are :
- service kamailio stop è Nothing is displayed
- service kamailio start è Nothing is displayed
- service kamailio XXX è “PATRICK 2” is displayed
[root@vm-vse02-siprouter2 ~]#
[root@vm-vse02-siprouter2 ~]# service kamailio stop
Stopping kamailio (via systemctl): Warning: Unit file of kamailio.service changed on disk, 'systemctl daemon-reload' recommended.
[ OK ]
[root@vm-vse02-siprouter2 ~]# service kamailio start
Starting kamailio (via systemctl): Warning: Unit file of kamailio.service changed on disk, 'systemctl daemon-reload' recommended.
Job for kamailio.service failed. See 'systemctl status kamailio.service' and 'journalctl -xn' for details.
[FAILED]
[root@vm-vse02-siprouter2 ~]# service kamailio XXX
PATRICK 2
Usage: kamailio {start|stop|restart|condrestart|status|debug|help}
It seems that when ‘stop|start’ are used, linux doesn’t run the /etc/init.d/kamailio script.
As you can see that it is complaining about the ‘systemctl daemon-reload’ command to use.
I proceeded the same (add ‘echo’ command) on another server running the previous Kamailio rpm. On this server there are no display (from the ‘echo’ command) but kamailio stops:
[root@vm-vse02-siprouter1 ~]# ps -ef |grep kam
kamailio 1159 1 0 16:35 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1161 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1162 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1163 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1164 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1165 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1166 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1167 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1168 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1169 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1170 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1171 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1172 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
kamailio 1173 1159 0 16:36 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio.pid -m 1024 -M 8 -u kamailio -g kamailio
root 1210 1189 0 16:36 pts/0 00:00:00 tail -f /var/log/kamailio/kamailio.log
root 1242 1220 0 16:45 pts/1 00:00:00 grep --color=auto kam
[root@vm-vse02-siprouter1 ~]# service kamailio stop
Stopping kamailio (via systemctl): [ OK ]
[root@vm-vse02-siprouter1 ~]# ps -ef |grep kam
root 1210 1189 0 16:36 pts/0 00:00:00 tail -f /var/log/kamailio/kamailio.log
root 1273 1220 0 16:46 pts/1 00:00:00 grep --color=auto kam
[root@vm-vse02-siprouter1 ~]#
[root@vm-vse02-siprouter1 ~]# rpm -qa |grep kam
kamailio-5.0.0-7.1.x86_64
it really strange.
So I’m going to revert back to the previous Kamailio rpm on the server where the stop command doesn’t work.
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : mercredi 5 avril 2017 16:00 À : Ginhoux, Patrick mailto:patrick.ginhoux@fr.unisys.com patrick.ginhoux@fr.unisys.com Cc : Kamailio (SER) - Users Mailing List mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
On 05.04.17 15:46, Ginhoux, Patrick wrote:
Hi,
Nothing happens after the ‘service kamailio stop’; kamailio is still running (same pid) ((as detaillled below).
can you run in terminal and give the output of the next command?
killproc -h
It seems that some versions are using a default path to PID file, which may not match where kamailio writes it.
Cheers, Daniel
Hello,
yes, the patch for htable should be in 5.0.1.
Cheers, Daniel
On 05.04.17 17:14, Ginhoux, Patrick wrote:
Hi,
I’m going to install the kamailio 5.0.1 .
One question before:
Can you tell me if it included the patch for the htable (issue “ht_db_load_table(): key type must be string (type=6)”) ?
Cordialement
Patrick GINHOUX
*De :*Daniel-Constantin Mierla [mailto:miconda@gmail.com] *Envoyé :* mercredi 5 avril 2017 17:09 *À :* Ginhoux, Patrick patrick.ginhoux@fr.unisys.com *Cc :* Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
killproc might be only in opensuse as standalone tool and the other rpms have it in init.d lib functions...
Can you install the rpms for kamailio 5.0.1? They are already built:
https://build.opensuse.org/package/show/home:kamailio:v5.0.x-rpms/kamailio50
I tried to force the pid file path to killproc, but maybe the version is not supporting it. You may need to do 'killall kamailio' first time to stop existing kamailio, then do start and stop after installing the new packages.
If it fails, I will look for a different solution and trigger rpms to be rebuilt.
Cheers, Daniel
Hi,
Kamailio 5.0.1 is now installed,
The start and then the stop command works fine now. Kamailio is correctly stopped.
I also tested a reboot, and saw kamailio started with success. A new attempt to stop it is also successful.
So I can tell that this issue is closed; the fifo file are created as appropriate:
[root@vm-vse02-siprouter2 ~]# ll /var/run/kamailio/
total 4
srw------- 1 kamailio kamailio 0 Apr 5 17:57 kamailio_ctl
-rw-r----- 1 kamailio kamailio 5 Apr 5 17:57 kamailio.pid
prwxr-xr-x 1 kamailio kamailio 0 Apr 5 17:57 kamailio_rpc_fifo
About the htable fix, it is included in the 5.0.1 as I don’t get the string error anymore.
That’s really a great job you did.
Thanks you so much.
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : mercredi 5 avril 2017 17:55 À : Ginhoux, Patrick patrick.ginhoux@fr.unisys.com Cc : Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
yes, the patch for htable should be in 5.0.1.
Cheers, Daniel
On 05.04.17 17:14, Ginhoux, Patrick wrote:
Hi,
I’m going to install the kamailio 5.0.1 .
One question before:
Can you tell me if it included the patch for the htable (issue “ht_db_load_table(): key type must be string (type=6)”) ?
Cordialement
Patrick GINHOUX
De : Daniel-Constantin Mierla [mailto:miconda@gmail.com] Envoyé : mercredi 5 avril 2017 17:09 À : Ginhoux, Patrick mailto:patrick.ginhoux@fr.unisys.com patrick.ginhoux@fr.unisys.com Cc : Kamailio (SER) - Users Mailing List mailto:sr-users@lists.sip-router.org sr-users@lists.sip-router.org Objet : Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
killproc might be only in opensuse as standalone tool and the other rpms have it in init.d lib functions...
Can you install the rpms for kamailio 5.0.1? They are already built:
https://build.opensuse.org/package/show/home:kamailio:v5.0.x-rpms/kamailio50
I tried to force the pid file path to killproc, but maybe the version is not supporting it. You may need to do 'killall kamailio' first time to stop existing kamailio, then do start and stop after installing the new packages.
If it fails, I will look for a different solution and trigger rpms to be rebuilt.
Cheers, Daniel
Hello,
thanks for testing and reporting back!
It happens that I manage packaging of the rpms, but I actually don't use RPM-based operating systems, so it is more like 'blind' packaging. If anyone wants to jump on board and help maintaining/improving RPM packaging, he is more than welcome -- everything can be done via OpenSuse build platform.
Cheers, Daniel
On 05.04.17 18:04, Ginhoux, Patrick wrote:
Hi,
Kamailio 5.0.1 is now installed,
The start and then the stop command works fine now. Kamailio is correctly stopped.
I also tested a reboot, and saw kamailio started with success. A new attempt to stop it is also successful.
So I can tell that this issue is closed; the fifo file are created as appropriate:
[root@vm-vse02-siprouter2 ~]# ll /var/run/kamailio/
total 4
srw------- 1 kamailio kamailio 0 Apr 5 17:57 kamailio_ctl
-rw-r----- 1 kamailio kamailio 5 Apr 5 17:57 kamailio.pid
prwxr-xr-x 1 kamailio kamailio 0 Apr 5 17:57 kamailio_rpc_fifo
About the htable fix, it is included in the 5.0.1 as I don’t get the string error anymore.
That’s really a great job you did.
Thanks you so much.
Cordialement
Patrick GINHOUX
*De :*Daniel-Constantin Mierla [mailto:miconda@gmail.com] *Envoyé :* mercredi 5 avril 2017 17:55 *À :* Ginhoux, Patrick patrick.ginhoux@fr.unisys.com *Cc :* Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem
Hello,
yes, the patch for htable should be in 5.0.1.
Cheers, Daniel
On 05.04.17 17:14, Ginhoux, Patrick wrote:
Hi, I’m going to install the kamailio 5.0.1 . One question before: Can you tell me if it included the patch for the htable (issue “ht_db_load_table(): key type must be string (type=6)”) ? Cordialement Patrick GINHOUX *De :*Daniel-Constantin Mierla [mailto:miconda@gmail.com] *Envoyé :* mercredi 5 avril 2017 17:09 *À :* Ginhoux, Patrick <patrick.ginhoux@fr.unisys.com> <mailto:patrick.ginhoux@fr.unisys.com> *Cc :* Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org> <mailto:sr-users@lists.sip-router.org> *Objet :* Re: [SR-Users] RPCFIFOPATH / DEFINE_FIFO_NAME settings problem Hello, killproc might be only in opensuse as standalone tool and the other rpms have it in init.d lib functions... Can you install the rpms for kamailio 5.0.1? They are already built: https://build.opensuse.org/package/show/home:kamailio:v5.0.x-rpms/kamailio50 I tried to force the pid file path to killproc, but maybe the version is not supporting it. You may need to do 'killall kamailio' first time to stop existing kamailio, then do start and stop after installing the new packages. If it fails, I will look for a different solution and trigger rpms to be rebuilt. Cheers, Daniel
-- Daniel-Constantin Mierla www.twitter.com/miconda http://www.twitter.com/miconda -- www.linkedin.com/in/miconda http://www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com http://www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com http://www.kamailioworld.com