Bug#921015: kamailio 5.2 invalid permissions at run dir cuases several issues

PICCORO McKAY Lenz mckaygerhard at gmail.com
Fri Feb 1 13:25:31 GMT 2019


Hi victor, you didnt noted tha i mentiones that i use buster, and i
mention that only happened when kamailio need to comunicate
internally.. this means with many modules enables and asterisk in the
game... and i noted that build from upstream already happened in 5.1
and 5.2 so seems its a kamailio bug

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com

El vie., 1 de feb. de 2019 a la(s) 08:56, Victor Seva
(linuxmaniac at torreviejawireless.org) escribió:
>
>  severity 921015 normal
> --
> thanks
>
> Hello,
>
> You didn't mentioned if you are using systemd or sysv. Both have rules to create and set permissions for /var/run/kamailio dir:
>
> # debian/kamailio.init
> HOMEDIR=/var/run/$NAME
> [..]
> USER=kamailio
> GROUP=kamailio
> [..]
> # /var/run can be a tmpfs
> if [ ! -d $HOMEDIR ]; then
>     mkdir -p $HOMEDIR
>     chown ${USER}:${GROUP} $HOMEDIR
> fi
>
>
> # debian/kamailio.service
> # /var/run/kamailio in tmpfs
> RuntimeDirectory=kamailio
> RuntimeDirectoryMode=0750
>
> In my testing with the default config (sysv):
>
> seting RUN_KAMAILIO=yes on /etc/default/kamailio
>
> root at c56eab6f6ec2:/# service kamailio start
> [....] Starting Kamailio SIP Server: kamailio:Listening on
>              udp: 127.0.0.1:5060
>              udp: 172.17.0.2:5060
>              tcp: 127.0.0.1:5060
>              tcp: 172.17.0.2:5060
> Aliases:
>              tcp: c56eab6f6ec2:5060
>              tcp: localhost:5060
>              udp: c56eab6f6ec2:5060
>              udp: localhost:5060
>
> /usr/sbin/kamailio[754]: INFO: rr [../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe module is not loaded
>
> /usr/sbin/kamailio[754]: INFO: rr [rr_mod.c:177]: mod_init(): outbound module not available
>
> /usr/sbin/kamailio[754]: INFO: <core> [main.c:2648]: main(): processes (at least): 32 - shm size: 67108864 - pkg size: 8388608
>
> /usr/sbin/kamailio[754]: INFO: <core> [core/udp_server.c:153]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992
>
> /usr/sbin/kamailio[754]: INFO: <core> [core/udp_server.c:205]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984
>
> /usr/sbin/kamailio[754]: INFO: <core> [core/udp_server.c:153]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992
>
> /usr/sbin/kamailio[754]: INFO: <core> [core/udp_server.c:205]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984
>
> /usr/sbin/kamailio[754]: ERROR: <core> [core/tcp_main.c:2739]: tcp_init(): could not get TCP protocol number
>
> /usr/sbin/kamailio[754]: ERROR: <core> [core/tcp_main.c:2739]: tcp_init(): could not get TCP protocol number
>
> . ok
> root at c56eab6f6ec2:/# ls -lah /var/run/kamailio/
> total 12K
> drwxr-xr-x 2 kamailio kamailio 4.0K Feb  1 12:49 .
> drwxr-xr-x 1 root     root     4.0K Feb  1 12:48 ..
> -rw-r--r-- 1 kamailio kamailio    4 Feb  1 12:49 kamailio.pid
> srw------- 1 kamailio kamailio    0 Feb  1 12:49 kamailio_ctl
> prw-rw---- 1 root     root        0 Feb  1 12:49 kamailio_rpc.fifo
> srw-rw---- 1 root     root        0 Feb  1 12:49 kamailio_rpc.sock
> root at c56eab6f6ec2:/# kamcmd
> kamcmd 1.5
> Copyright 2006 iptelorg GmbH
> This is free software with ABSOLUTELY NO WARRANTY.
> For details type `warranty'.
> kamcmd> ps
> 754 main process - attendant
> 755 udp receiver child=0 sock=127.0.0.1:5060
> 756 udp receiver child=1 sock=127.0.0.1:5060
> 757 udp receiver child=2 sock=127.0.0.1:5060
> 758 udp receiver child=3 sock=127.0.0.1:5060
> 759 udp receiver child=4 sock=127.0.0.1:5060
> 760 udp receiver child=5 sock=127.0.0.1:5060
> 761 udp receiver child=6 sock=127.0.0.1:5060
> 762 udp receiver child=7 sock=127.0.0.1:5060
> 763 udp receiver child=0 sock=172.17.0.2:5060
> 764 udp receiver child=1 sock=172.17.0.2:5060
> 765 udp receiver child=2 sock=172.17.0.2:5060
> 766 udp receiver child=3 sock=172.17.0.2:5060
> 767 udp receiver child=4 sock=172.17.0.2:5060
> 768 udp receiver child=5 sock=172.17.0.2:5060
> 769 udp receiver child=6 sock=172.17.0.2:5060
> 770 udp receiver child=7 sock=172.17.0.2:5060
> 771 slow timer
> 772 timer
> 773 secondary timer
> 774 JSONRPCS FIFO
> 775 JSONRPCS DATAGRAM
> 776 ctl handler
> 777 tcp receiver (generic) child=0
> 778 tcp receiver (generic) child=1
> 779 tcp receiver (generic) child=2
> 780 tcp receiver (generic) child=3
> 781 tcp receiver (generic) child=4
> 782 tcp receiver (generic) child=5
> 783 tcp receiver (generic) child=6
> 784 tcp receiver (generic) child=7
> 785 tcp main process
> kamcmd>
>
>
> Cheers,
> Victor



More information about the Pkg-voip-maintainers mailing list