[SR-Users] Link problem between kamailio and MariaDB

Ginhoux, Patrick patrick.ginhoux at fr.unisys.com
Wed May 23 15:34:41 CEST 2018


Hi,

 

At the moment, I'm trying to replace MySQL by MariaDB on my Kamailio server
(5.0.1) . In  previous post I have been told that Kamailio supports MariaDB
and there is no special module to load.

 

This work is done on a new server running RHEL 7.4 and MariaDB 10.2.14 that
is installed under /opt/mysql/na/10.2.14 folder.

 

I encounter different problem:

 

-          Without changing anything in the kamailio script, kamailio failed
to find the libmysqlclient.so.18 library.

-          So I thought that I could get rid of the above error by changing
the MODULEPATH in the Kamailio-local.cfg as follows :

MODULEPATH="/usr/lib64/kamailio/modules/:/opt/mysql/na/10.2.14/lib64/"

But with this, I get 2 problem:

The kamailio.log that was written in a /opt/log/Kamailio folder is no longer
updated.

I can only find the errors in the /var/log/messages file:

May 23 11:19:19 vm-siprouter74 systemd: Starting SYSV: Kamailio is a fast,
reliable and flexible SIP Server....

May 23 11:19:19 vm-siprouter74 kamailio: Not starting : invalid
configuration file!

May 23 11:19:19 vm-siprouter74 kamailio: 0(3328) DEBUG: <core>
[core/cfg.lex:1822]: pp_define_get(): ### returning define ID
[DEFINE_LOG_FACILITY] value [LOG_LOCAL0]

May 23 11:19:19 vm-siprouter74 kamailio: 0(3328) DEBUG: <core>
[core/cfg.lex:1822]: pp_define_get(): ### returning define ID [LOCAL_LISTEN]
value [udp:129.227.82.109:5060]

May 23 11:19:19 vm-siprouter74 kamailio: 0(3328) DEBUG: <core>
[core/cfg.lex:1822]: pp_define_get(): ### returning define ID
[LOCAL_LISTEN_2] value [udp:127.0.0.1:5060]

May 23 11:19:19 vm-siprouter74 kamailio: 0(3328) DEBUG: <core>
[core/cfg.lex:1822]: pp_define_get(): ### returning define ID [MODULEPATH]
value ["/usr/lib64/kamailio/modules/:/opt/mysql/na/10.2.14/lib64/"]

May 23 11:19:19 vm-siprouter74 kamailio: 0(3328) DEBUG: <core>
[core/cfg.y:1632]: yyparse(): loading modules under
/usr/lib64/kamailio/modules/:/opt/mysql/na/10.2.14/lib64/

May 23 11:19:19 vm-siprouter74 kamailio: 0(3328) DEBUG: <core>
[core/cfg.y:1613]: yyparse(): loading module db_mysql.so

May 23 11:19:19 vm-siprouter74 kamailio: 0(3328) DEBUG: <core>
[core/sr_module.c:575]: load_module(): trying to load
</usr/lib64/kamailio/modules/db_mysql.so>

May 23 11:19:19 vm-siprouter74 kamailio: 0(3328) ERROR: <core>
[core/sr_module.c:582]: load_module(): could not open module
</usr/lib64/kamailio/modules/db_mysql.so>: libmysqlclient.so.18: cannot open
shared object file: No such file or directory

May 23 11:19:19 vm-siprouter74 kamailio: 0(3328) CRITICAL: <core>
[core/cfg.y:3401]: yyerror_at(): parse error in config file
//etc/kamailio/kamailio.cfg, line 191, column 12-24: failed to load module

May 23 11:19:19 vm-siprouter74 kamailio: 0(3328) DEBUG: <core>
[core/cfg.y:1613]: yyparse(): loading module jsonrpcs.so

May 23 11:19:19 vm-siprouter74 kamailio: 0(3328) DEBUG: <core>
[core/sr_module.c:575]: load_module(): trying to load
</usr/lib64/kamailio/modules/jsonrpcs.so>

 

To work around the problem we have created 2 symbol links:

<<< ln -s /opt/mysql/na/10.2.14/lib64/libmysqlclient.so.18.0.0
/usr/lib64/libmysqlclient.so.18 >>> the libmysqlclient error

<<< ln -s /myqdata/mysiprdb/data/my.cnf /etc/my.cnf >>> to fix the issue to
open the db

 

It seems that kamailio is always looking for the my.cnf in the /etc/
directory.

 

My concern are to share this job with people who have much more experience
with Kamailio.

 

I would like to know 

-          If the different workaround (ln) makes sense to you or is there
better change to do

-          How to explain the logging issue when changing the modulepath
variable

-          Is it true that kamailio is always looking for the my.cnf in the
/etc/ directory?

 

Any thoughts are welcome.

 

Thanks in advance.

 

Cordialement.

Patrick GINHOUX

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180523/c0d9cdc2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 7876 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180523/c0d9cdc2/attachment.bin>


More information about the sr-users mailing list