<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
On 4/12/11 11:34 AM, Rick Aldred wrote:
<blockquote cite="mid:730448.7771.qm@web24803.mail.ird.yahoo.com"
type="cite">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="font: inherit;" valign="top">
<div id="yiv1370225934">
<style type="text/css"><!--#yiv1370225934 DIV {margin:0px;}--></style>
<div style="font-family: arial,helvetica,sans-serif;
font-size: 10pt;">
<div>I have set up kamailio 3.1.2 on an install of
Debian Squeeze, using the default config but with
the following defines enabled:</div>
<div><br>
</div>
<div>WITH_MYSQL</div>
<div>WITH_AUTH</div>
<div>WITH_USRLOCDB</div>
<div>WITH_NAT</div>
<div><br>
</div>
<div>Everything works as expected when starting
Kamailio from a terminal, e.g.</div>
<div>service kamailio start</div>
<div><br>
</div>
<div>But after a reboot, the service fails to start
and all SIP requests are dropped with a ICMP port
unreachable error.</div>
<div><br>
</div>
<div>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?</div>
<div><br>
</div>
<div>
<div>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)</div>
<div>Apr 12 10:08:31 SIPServer
/usr/sbin/kamailio[1347]: ERROR: <core>
[db.c:289]: could not add connection to the pool</div>
<div>Apr 12 10:08:31 SIPServer
/usr/sbin/kamailio[1347]: ERROR: usrloc
[dlist.c:486]: failed to open database connection</div>
<div>Apr 12 10:08:31 SIPServer
/usr/sbin/kamailio[1347]: ERROR: registrar
[reg_mod.c:396]: failed to register domain</div>
<div>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</div>
<div>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</div>
<div>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</div>
<div>Apr 12 10:08:34 SIPServer mysqld_safe: Starting
mysqld daemon with databases from /var/lib/mysql</div>
<div>Apr 12 10:08:34 SIPServer mysqld: 110412
10:08:34 [Note] Plugin 'FEDERATED' is disabled.</div>
<div>Apr 12 10:08:36 SIPServer mysqld: 110412
10:08:36 InnoDB: Started; log sequence number 0
44233</div>
<div>Apr 12 10:08:36 SIPServer mysqld: 110412
10:08:36 [Note] Event Scheduler: Loaded 0 events</div>
<div>Apr 12 10:08:36 SIPServer mysqld: 110412
10:08:36 [Note] /usr/sbin/mysqld: ready for
connections.</div>
<div>Apr 12 10:08:36 SIPServer mysqld: Version:
'5.1.49-3' socket: '/var/run/mysqld/mysqld.sock'
port: 3306 (Debian)</div>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</blockquote>
the logs shows that the mysql server is started after kamailio. Be
sure you set the order at startup to run mysql first, maybe google
helps to find the proper way.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote cite="mid:730448.7771.qm@web24803.mail.ird.yahoo.com"
type="cite">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="font: inherit;" valign="top">
<div id="yiv1370225934">
<div style="font-family: arial,helvetica,sans-serif;
font-size: 10pt;">
<div><br>
</div>
<div>Both the Kamailio and mysql services start with
priority 18 on run levels 2345. I tried adjusting
the Kamailio service to priority 19, but the problem
still occurs.</div>
<div><br>
</div>
<div>I am relatively new to Kamailio and mysql as well
as Linux / Debian administration, so I'm not really
sure how to solve this problem. Any ideas would be
greatly appreciated.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Rick Aldred</div>
<div><br>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
</body>
</html>