Hello,

this is likely to be the issue with the default path to ctl socket set in the packaging.

Edit your config file, look for the lines:

# ----- mi_fifo params -----
#modparam("mi_fifo", "fifo_name", "/var/run/kamailio/kamailio_fifo")

# ----- ctl params -----
#modparam("ctl", "binrpc", "unix:/var/run/kamailio/kamailio_ctl")

and uncomment the two lines with modparam.

Cheers,
Daniel

On 12/08/15 17:12, Mellow Yellow wrote:
Hey guys,
 
I've been pulling out my hair for a few days trying to get SCTP with Kamailio working in CentOS 7... with no luck at all.
 
When attempting to start Kamailio via the 'kamctl start' command I get the following error:
INFO: Starting Kamailio :
ERROR: PID file /var/run/kamailio.pid does not exist -- Kamailio start failed

When attempting to start Kamailio via the 'systemctl start kamailio' command, I get the following:
Job for kamailio.service failed. See 'systemctl status kamailio.service' and 'journalctl -xn' for details.

When checking the 'systemctl status kamailio -l' command, I get the following:
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 Thu 2015-08-13 00:42:51 AEST; 14s ago
  Process: 19229 ExecStart=/etc/rc.d/init.d/kamailio start (code=exited, status=1/FAILURE)

Aug 13 00:42:51 Elastix5.workgroup /usr/sbin/kamailio[19242]: INFO: rr [rr_mod.c:174]: mod_init(): outbound module not available
Aug 13 00:42:51 Elastix5.workgroup /usr/sbin/kamailio[19242]: INFO: usrloc [hslot.c:51]: ul_init_locks(): locks array size 1024
Aug 13 00:42:51 Elastix5.workgroup /usr/sbin/kamailio[19242]: ERROR: ctl [init_socks.c:115]: init_unix_sock(): ERROR: init_unix_sock: bind: No such file or directory [2]
Aug 13 00:42:51 Elastix5.workgroup /usr/sbin/kamailio[19242]: ERROR: ctl [ctl.c:273]: mod_init(): ERROR: ctl: mod_init: init ctrl. sockets failed
Aug 13 00:42:51 Elastix5.workgroup /usr/sbin/kamailio[19242]: ERROR: <core> [sr_module.c:945]: init_mod(): Error while initializing module ctl (/usr/lib64/kamailio/modules/ctl.so)
Aug 13 00:42:51 Elastix5.workgroup /usr/sbin/kamailio[19242]: INFO: <core> [sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
Aug 13 00:42:51 Elastix5.workgroup kamailio[19229]: Starting kamailio:
Aug 13 00:42:51 Elastix5.workgroup systemd[1]: kamailio.service: control process exited, code=exited status=1
Aug 13 00:42:51 Elastix5.workgroup systemd[1]: Failed to start SYSV: Kamailio is a fast, reliable and flexible SIP Server..
Aug 13 00:42:51 Elastix5.workgroup systemd[1]: Unit kamailio.service entered failed state.


So I started to think there was an issue with the SCTP config or whether SCTP was enabled in CentOS. However, everything looks fine:
# cat /proc/modules
sctp 217455 2 - Live 0xffffffffa03ed000

# /sbin/lsmod | grep sctp
sctp                  217455  2
libcrc32c              12644  2 xfs,sctp

# more /proc/sys/net/sctp/addip_enable
1

# checksctp
SCTP supported


SCTP modules installed properly:
Package lksctp-tools-devel-1.0.13-3.el7.x86_64 already installed and latest version
Package lksctp-tools-doc-1.0.13-3.el7.x86_64 already installed and latest version
Package lksctp-tools-1.0.13-3.el7.x86_64 already installed and latest version


Running the ' sctp_test' command between two servers, SCTP is working fine... I can capture SCTP packets between the servers.
 
I've left the Kamailio.cfg file as is... with the only modification being made to enable the SCTP module to start:
enable_sctp = 1
 
Checking 'kamailio -v' USE_SCTP is enabled:
# kamailio -v
version: kamailio 4.3.1 (x86_64/linux) f38e67
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_F_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: f38e67
compiled on 18:17:56 Jul 20 2015 with gcc 4.8.2


I've tried installing Kamailio with the precompiled rpms for CentOS 7, and I also followed some guides on installing in via GIT & compiling it myself... however the issue still remains.
 
Any help would be greatly appreciated as I've completely run out of ideas, and there isn't much info on the web about Kamailio & SCTP.
 
Thanks,
Rob


_______________________________________________
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

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com