Am Montag, 20. August 2018, 11:00:57 CEST schrieb Abdulaziz Alghosh:
> i am at the final stages of emigrating from kamailio 3.0.3 to 5.1.0
> including our own module. Unluckily, after writing the command " kamctl
> start", the following error is popping up:
>
> * PID file /var/run/kamailio.pid does not exist -- Kamailio start failed*
>
> Thus, I used the command " kamailio -M 8 -E -e -dd " to get more debugging
> Info and the output is detailing the following:
>
> 0(10334) ERROR: db_mysql [km_my_con.c:129]: db_mysql_new_connection():
> driver error: Can't connect to MySQL server on '192.168.1.207' (4)
> 0(10334) ERROR: <core> [db.c:318]: db_do_init2(): could not add connection
> to the pool 0(10334) ERROR: ABDUL_functions [ABDUL_chk.c:1069]: init_db():
> failed to connect database URL=mysql://ABDUL:ABDUL@192.168.1.207/ABDUL
> 0(10334) ERROR: ABDUL_functions [ABDUL_functions_mod.c:296]: mod_init():
> Module ABDUL_functions not correktly initialized, pid[10334]
> 0(10334) ERROR: <core> [core/sr_module.c:991]: init_mod(): Error while
> initializing module ABDUL_functions
> (//lib64/kamailio/modules/ABDUL_functions.so) > (x86_64)" and my used kamailio *default *file under /etc/default.
>
> Seemingly the error relates to old databases url ( "URL=mysql://
> ABDUL:ABDUL@192.168.1.207/ABDUL " ) inside an old Kamailio.cfg file from my
> 3.0.3 package which I put under another different directory. This old
> Kamailio.cfg file #includes my own module, so he is exporting this url.
> Consequently, my module is trying to connect again to this databases.
>
> I do not know why both kamailio.cfg (new: /etc/kamailio/kamailio.cfg and
> old one out of /etc/kamailio) are both seen for kamctl or (/sbin/kamailio).
> I know that my new url inside the new /etc/kamailio/kamailio.cfg is read
> and connected but again not sure why my hidden old kamailio.cfg is still
> being read as well.
>
> the attached shows my init file for "SUSE Linux Enterprise Server 11
Hello Abdulaziz,
Kamailio gets during compilation some default configuration path, which might
point to the old (wrong) location. Have a look to the 'kamailio -f' output to
see its default, you can also use the '-f' parameter to change this location.
You get all parameters with 'kamailio -h'
Then try again with the debugging method you choose above.
Best regards,
Henning
--
Henning Westerholt
https://skalatan.de/blog/