I have set up kamailio 3.1.2 on an install of
Debian Squeeze, using the default config but with
the following defines enabled:
Everything works as expected when starting
Kamailio from a terminal, e.g.
But after a reboot, the service fails to start
and all SIP requests are dropped with a ICMP port
unreachable error.
The following is an extract of /var/log/syslog
when this problem occurs. It looks like Kamailio is
failing to access the mysql socket, as the mysql
service has not yet started?
Apr 12 10:08:31 SIPServer
/usr/sbin/kamailio[1347]: ERROR: db_mysql
[km_my_con.c:109]: driver error: Can't connect to
local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
Apr 12 10:08:31 SIPServer
/usr/sbin/kamailio[1347]: ERROR: <core>
[db.c:289]: could not add connection to the pool
Apr 12 10:08:31 SIPServer
/usr/sbin/kamailio[1347]: ERROR: usrloc
[dlist.c:486]: failed to open database connection
Apr 12 10:08:31 SIPServer
/usr/sbin/kamailio[1347]: ERROR: registrar
[reg_mod.c:396]: failed to register domain
Apr 12 10:08:31 SIPServer
/usr/sbin/kamailio[1347]: ERROR: <core>
[route.c:1161]: fixing failed (code=-1) at
cfg:/etc/kamailio/kamailio.cfg:569
Apr 12 10:08:31 SIPServer
/usr/sbin/kamailio[1347]: ERROR: <core>
[route.c:1161]: fixing failed (code=-1) at
cfg:/etc/kamailio/kamailio.cfg:572
Apr 12 10:08:31 SIPServer
/usr/sbin/kamailio[1347]: ERROR: <core>
[route.c:1161]: fixing failed (code=-1) at
cfg:/etc/kamailio/kamailio.cfg:574
Apr 12 10:08:34 SIPServer mysqld_safe: Starting
mysqld daemon with databases from /var/lib/mysql
Apr 12 10:08:34 SIPServer mysqld: 110412
10:08:34 [Note] Plugin 'FEDERATED' is disabled.
Apr 12 10:08:36 SIPServer mysqld: 110412
10:08:36 InnoDB: Started; log sequence number 0
44233
Apr 12 10:08:36 SIPServer mysqld: 110412
10:08:36 [Note] Event Scheduler: Loaded 0 events
Apr 12 10:08:36 SIPServer mysqld: 110412
10:08:36 [Note] /usr/sbin/mysqld: ready for
connections.
Apr 12 10:08:36 SIPServer mysqld: Version:
'5.1.49-3' socket: '/var/run/mysqld/mysqld.sock'
port: 3306 (Debian)