Hi,

I'm using Centos7


I checked the kamailio.servirse file

It looks like

[root@p534507 ~]# cat /usr/lib/systemd/system/kamailio.service
[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
Wants=network-online.target
After=network-online.target

ange[Service]
Type=simple
User=kamailio
Group=kamailio
Environment='CFGFILE=/etc/kamailio/kamailio.cfg'
Environment='SHM_MEMORY=64'
Environment='PKG_MEMORY=4'
EnvironmentFile=-/etc/sysconfig/kamailio
ExecStart=/usr/sbin/kamailio -DD -P /var/run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY
Restart=on-failure

[Install]
WantedBy=multi-user.target
[root@p534507 ~]#



I changed
User and Group....... to root..... and kamailio.service is working now. But it looks like strange for me. Why dint't it work with kamailio user?




Вторник, 4 июня 2019, 18:20 +03:00 от Karsten Horsmann <khorsmann@gmail.com>:

Hi,

Starting via cli works and via systemctl not. That's an sign for some permissions that systemctl what's to set (group for example or user) are not there. 

Also included files like tls.cfg and certificates are not readable for the user:group systemctl what's to start Kamailio. 

Cheers 
Karsten 

Daniel-Constantin Mierla <miconda@gmail.com> schrieb am Di., 4. Juni 2019, 15:16:
Hello,

what is the operating system you are using?

Cheers,
Daniel

On 04.06.19 14:21, Олег Подгуйко wrote:
Im trying to use kamailio with websocket and tls. It will be use as registrar for websocket clients.
I'm using default config with additional websocket, https and tls modules. I created some certs for it and  everething looks like good.
But when I started kamailio via (systemctl start kamailio) I get some errors

июн 04 15:00:52 p534507.kvmvps kamailio[23502]: 0(23502) INFO: <core> [core/udp_server.c:205]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984
июн 04 15:00:52 p534507.kvmvps kamailio[23502]: 0(23502) DEBUG: <core> [core/tcp_main.c:2753]: tcp_init(): added 37.143.9.210:443
июн 04 15:00:52 p534507.kvmvps kamailio[23502]: 0(23502) ERROR: <core> [core/tcp_main.c:2855]: tcp_init(): bind(9, 0x7fb6ef026f84, 16) on 37.143.9.210:443 : Permission denied
июн 04 15:00:52 p534507.kvmvps kamailio[23502]: 0(23502) ERROR: tls [tls_init.c:342]: tls_h_init_si(): Error while initializing TCP part of TLS socket 37.143.9.210:443
июн 04 15:00:52 p534507.kvmvps kamailio[23502]: 0(23502) DEBUG: rtpengine [rtpengine.c:1986]: mod_destroy(): rtpengine_hash_table_destroy() success!


If I start it via /usr/sbin/kamailio  - all work.

What I do wrong?

 



--
Олег Подгуйко
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
Олег Подгуйко