<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:387456665;
        mso-list-type:hybrid;
        mso-list-template-ids:-1738921466 284323362 67895299 67895301 67895297 67895299 67895301 67895297 67895299 67895301;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-font-family:Calibri;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>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.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>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.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I encounter different problem:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span lang=EN-US><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>          </span></span></span><![endif]><span lang=EN-US>Without changing anything in the kamailio script, kamailio failed to find the </span><span lang=EN-US style='font-family:Consolas'>libmysqlclient.so.18 library.</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoListParagraph><span lang=EN-US style='font-family:Consolas'> </span><span lang=EN-US><o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span lang=EN-US><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>          </span></span></span><![endif]><span lang=EN-US>So I thought that I could get rid of the above error by changing the MODULEPATH in the Kamailio-local.cfg as follows :<o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:70.8pt'><span lang=EN-US style='font-family:Consolas'>MODULEPATH="/usr/lib64/kamailio/modules/:/opt/mysql/na/10.2.14/lib64/"</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoListParagraph><span lang=EN-US>But with this, I get 2 problem:<o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:70.8pt'><span lang=EN-US>The kamailio.log that was written in a /opt/log/Kamailio folder is no longer updated.<o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:70.8pt'><span lang=EN-US>I can only find the errors in the /var/log/messages file:<o:p></o:p></span></p><p class=MsoNormal style='margin-left:84.0pt;text-autospace:none'><span lang=EN-US style='font-size:9.0pt;font-family:Consolas'>May 23 11:19:19 vm-siprouter74 systemd: Starting SYSV: Kamailio is a fast, reliable and flexible SIP Server....<o:p></o:p></span></p><p class=MsoNormal style='margin-left:84.0pt;text-autospace:none'><span lang=EN-US style='font-size:9.0pt;font-family:Consolas'>May 23 11:19:19 vm-siprouter74 kamailio: Not starting : invalid configuration file!<o:p></o:p></span></p><p class=MsoNormal style='margin-left:84.0pt;text-autospace:none'><span lang=EN-US style='font-size:9.0pt;font-family:Consolas'>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]<o:p></o:p></span></p><p class=MsoNormal style='margin-left:84.0pt;text-autospace:none'><span lang=EN-US style='font-size:9.0pt;font-family:Consolas'>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]<o:p></o:p></span></p><p class=MsoNormal style='margin-left:84.0pt;text-autospace:none'><span lang=EN-US style='font-size:9.0pt;font-family:Consolas'>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]<o:p></o:p></span></p><p class=MsoNormal style='margin-left:84.0pt;text-autospace:none'><span lang=EN-US style='font-size:9.0pt;font-family:Consolas'>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/"]<o:p></o:p></span></p><p class=MsoNormal style='margin-left:84.0pt;text-autospace:none'><span lang=EN-US style='font-size:9.0pt;font-family:Consolas'>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/<o:p></o:p></span></p><p class=MsoNormal style='margin-left:84.0pt;text-autospace:none'><span lang=EN-US style='font-size:9.0pt;font-family:Consolas'>May 23 11:19:19 vm-siprouter74 kamailio: 0(3328) DEBUG: <core> [core/cfg.y:1613]: yyparse(): loading module db_mysql.so<o:p></o:p></span></p><p class=MsoNormal style='margin-left:84.0pt;text-autospace:none'><span lang=EN-US style='font-size:9.0pt;font-family:Consolas'>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><o:p></o:p></span></p><p class=MsoNormal style='margin-left:84.0pt;text-autospace:none'><span lang=EN-US style='font-size:9.0pt;font-family:Consolas'>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<o:p></o:p></span></p><p class=MsoNormal style='margin-left:84.0pt;text-autospace:none'><span lang=EN-US style='font-size:9.0pt;font-family:Consolas'>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<o:p></o:p></span></p><p class=MsoNormal style='margin-left:84.0pt;text-autospace:none'><span lang=EN-US style='font-size:9.0pt;font-family:Consolas'>May 23 11:19:19 vm-siprouter74 kamailio: 0(3328) DEBUG: <core> [core/cfg.y:1613]: yyparse(): loading module jsonrpcs.so<o:p></o:p></span></p><p class=MsoNormal style='margin-left:84.0pt;text-autospace:none'><span lang=EN-US style='font-size:9.0pt;font-family:Consolas'>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><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US>To work around the problem we have created 2 symbol links:<o:p></o:p></span></p><p class=MsoNormal style='margin-left:106.2pt'><span lang=EN-US><<< ln -s /opt/mysql/na/10.2.14/lib64/libmysqlclient.so.18.0.0 /usr/lib64/libmysqlclient.so.18 >>> the libmysqlclient error<o:p></o:p></span></p><p class=MsoNormal style='margin-left:106.2pt'><span lang=EN-US><<< ln -s /myqdata/mysiprdb/data/my.cnf /etc/my.cnf >>> to fix the issue to open the db<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>It seems that kamailio is always looking for the my.cnf in the /etc/ directory.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>My concern are to share this job with people who have much more experience with Kamailio.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I would like to know <o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span lang=EN-US><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>          </span></span></span><![endif]><span lang=EN-US>If the different workaround (ln) makes sense to you or is there better change to do<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span lang=EN-US><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>          </span></span></span><![endif]><span lang=EN-US>How to explain the logging issue when changing the modulepath variable<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span lang=EN-US><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>          </span></span></span><![endif]><span lang=EN-US>Is it true that kamailio is always looking for the my.cnf in the /etc/ directory?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Any thoughts are welcome.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Thanks in advance.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div style='mso-element:para-border-div;border:none;border-top:solid #CCCCCC 1.0pt;padding:4.0pt 0cm 0cm 0cm'><p class=MsoNormal style='margin-bottom:3.0pt;border:none;padding:0cm'><span lang=EN-US style='color:#444444;mso-fareast-language:FR'>Cordialement.<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:3.0pt;border:none;padding:0cm'><b><span lang=EN-US style='color:#444444;mso-fareast-language:FR'>Patrick GINHOUX</span></b><span lang=EN-US style='color:#444444;mso-fareast-language:FR'><o:p></o:p></span></p></div></div></body></html>