<div dir="ltr"><div>Hi Henning,</div><div><br></div><div>thank u. I spotted the error. It was old definition database users and their passwords in header files.</div><div><br></div><div>BR</div><div>Abdul<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 20, 2018 at 8:42 PM, Henning Westerholt <span dir="ltr"><<a href="mailto:hw@kamailio.org" target="_blank">hw@kamailio.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Am Montag, 20. August 2018, 11:00:57 CEST schrieb Abdulaziz Alghosh:<br>
> i am at the final stages of emigrating from kamailio 3.0.3 to 5.1.0<br>
> including our own module. Unluckily, after writing the command " kamctl<br>
> start", the following error is popping up:<br>
> <br>
</span>> * PID file /var/run/kamailio.pid does not exist -- Kamailio start failed*<br>
<span class="">> <br>
> Thus, I used the command " kamailio -M 8 -E -e -dd " to get more debugging<br>
> Info and the output is detailing the following:<br>
> <br>
>  0(10334) ERROR: db_mysql [km_my_con.c:129]: db_mysql_new_connection():<br>
> driver error: Can't connect to MySQL server on '192.168.1.207' (4)<br>
>  0(10334) ERROR: <core> [db.c:318]: db_do_init2(): could not add connection<br>
> to the pool 0(10334) ERROR: ABDUL_functions [ABDUL_chk.c:1069]: init_db():<br>
> failed to connect database URL=mysql://<a href="http://ABDUL:ABDUL@192.168.1.207/ABDUL" rel="noreferrer" target="_blank">ABDUL:ABDUL@192.<wbr>168.1.207/ABDUL</a><br>
>  0(10334) ERROR: ABDUL_functions [ABDUL_functions_mod.c:296]: mod_init():<br>
> Module ABDUL_functions not correktly initialized, pid[10334]<br>
>  0(10334) ERROR: <core> [core/sr_module.c:991]: init_mod(): Error while<br>
> initializing module ABDUL_functions<br>
> (//lib64/kamailio/modules/<wbr>ABDUL_functions.so)<br>
> <br>
> Seemingly the error relates to old databases url ( "URL=mysql://<br>
> <a href="http://ABDUL:ABDUL@192.168.1.207/ABDUL" rel="noreferrer" target="_blank">ABDUL:ABDUL@192.168.1.207/<wbr>ABDUL</a>" ) inside an old Kamailio.cfg file from my<br>
> 3.0.3 package which I put under another different directory. This old<br>
> Kamailio.cfg file #includes my own module, so he is exporting this url.<br>
> Consequently, my module is trying to connect again to this databases.<br>
> <br>
> I do not know why both kamailio.cfg (new: /etc/kamailio/kamailio.cfg and<br>
> old one out of /etc/kamailio) are both seen for kamctl or (/sbin/kamailio).<br>
> I know that my new url inside the new /etc/kamailio/kamailio.cfg is read<br>
> and connected but again not sure why my hidden old kamailio.cfg is still<br>
> being read as well.<br>
> <br>
> the attached shows my init file for "SUSE Linux Enterprise Server 11<br>
</span>> (x86_64)" and my used kamailio *default *file under /etc/default.<br>
<br>
Hello Abdulaziz,<br>
<br>
Kamailio gets during compilation some default configuration path, which might <br>
point to the old (wrong) location. Have a look to the 'kamailio -f' output to <br>
see its default, you can also use the '-f' parameter to change this location. <br>
You get all parameters with 'kamailio -h'<br>
<br>
Then try again with the debugging method you choose above.<br>
<br>
Best regards,<br>
<br>
Henning <br>
<span class="HOEnZb"><font color="#888888"><br>
-- <br>
Henning Westerholt<br>
<a href="https://skalatan.de/blog/" rel="noreferrer" target="_blank">https://skalatan.de/blog/</a><br>
</font></span></blockquote></div><br></div>