<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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Vorformatiert Zchn";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.HTMLVorformatiertZchn
{mso-style-name:"HTML Vorformatiert Zchn";
mso-style-priority:99;
mso-style-link:"HTML Vorformatiert";
font-family:Consolas;
mso-fareast-language:DE;}
span.E-MailFormatvorlage21
{mso-style-type:personal-reply;
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:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></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="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">just an idea – maybe the easiest way would be to introduce another character for the groups, e.g. ‘{ }’ or similar. The overlapping between IPv6 and groups was not intended, the group
support is probably older as IPv6 in Kamailio. </span><span lang="EN-GB" style="font-family:"Segoe UI Emoji",sans-serif;mso-fareast-language:EN-US">😉</span><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">-- <o:p>
</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Henning Westerholt -
</span><span style="mso-fareast-language:EN-US"><a href="https://skalatan.de/blog/"><span lang="EN-GB" style="color:#0563C1">https://skalatan.de/blog/</span></a></span><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Kamailio services -
</span><span style="mso-fareast-language:EN-US"><a href="https://skalatan.de/services"><span lang="EN-GB" style="color:#0563C1">https://skalatan.de/services</span></a></span><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><b>From:</b> sr-users <sr-users-bounces@lists.kamailio.org>
<b>On Behalf Of </b>Karsten Horsmann<br>
<b>Sent:</b> Wednesday, October 23, 2019 6:17 PM<br>
<b>To:</b> Daniel-Constantin Mierla <miconda@gmail.com><br>
<b>Cc:</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org><br>
<b>Subject:</b> Re: [SR-Users] driver error: Can't connect to MySQL server with kamailio 5.3.x and mysql-config-groups<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hi Daniel,<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">you mean this commit (see below). Maybe Alexey Vasilyev can told us something to that change?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">How can i use mysql-groups in the [] notation? Like:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">#!define DBURL "mysql://[kamailio]/kamailio"<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><a href="https://kamailio.org/docs/modules/5.3.x/modules/db_mysql.html#idm140">https://kamailio.org/docs/modules/5.3.x/modules/db_mysql.html#idm140</a> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">AFAIK this change splits [ and ] to ipv6 Host and sets ST_HOST6 and <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">commit a7588f382605991bef4499de8c89b10a9468c8cf<br>
Author: Alexey Vasilyev <<a href="mailto:alexei.vasilyev@gmail.com">alexei.vasilyev@gmail.com</a>><br>
Date: Wed Sep 4 13:47:23 2019 +0300<br>
<br>
db_mysql: database URL supports IPv6 address as hostname<br>
<br>
- changed parsing of db_url to accept IPv6 address for hostname<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Any help would be appreciated.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Cheers Karsten<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Am Mi., 23. Okt. 2019 um 08:10 Uhr schrieb Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>>:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p style="margin-left:35.4pt">Hello,<o:p></o:p></p>
<p style="margin-left:35.4pt">it could be that a patch to support ipv6 in the db url is conflicting with the syntax for the group name, because both seem to use [ ] . Iirc, such a commit was not long time ago. I will have to look at the code for mysql conf
group to see what exactly it expects, not sure I got time for it today, though, maybe others can check quicker.<o:p></o:p></p>
<p style="margin-left:35.4pt">Cheers,<br>
Daniel<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">On 22.10.19 16:38, Karsten Horsmann wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hi Daniel, <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">i create an Logfile with debug=3 on startup here: <a href="https://gist.github.com/khorsmann/91642daaa3715c59624cd5272bc3398a#file-logfile-txt-L4345" target="_blank">https://gist.github.com/khorsmann/91642daaa3715c59624cd5272bc3398a#file-logfile-txt-L4345</a> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"> 0(29174) DEBUG: db_mysql [km_my_con.c:108]: db_mysql_new_connection(): opening connection: mysql://xxxx:xxxx@kamailio/kamailio<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">I dont know where kamailio though that there is an "hostname" kamailio that holds the mysqldb/kamailio.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">I want to use groups in the future - cos i auto-generate mysql-passwords with / for example and that is possible in groups, but i dunno how in normal defines.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Cheers<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Karsten<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Am Di., 22. Okt. 2019 um 15:40 Uhr schrieb Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>>:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p style="margin-left:35.4pt">Hello,<o:p></o:p></p>
<p style="margin-left:35.4pt">if you set debug=3, do you see any other log message that can give hints about the error?<o:p></o:p></p>
<p style="margin-left:35.4pt">I do not recall any change in using mysql conf groups, but there were some changes in supporting usernames with domains and few other updates that could have affected indirectly this part.<o:p></o:p></p>
<p style="margin-left:35.4pt">Cheers,<br>
Daniel<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">On 22.10.19 15:20, Karsten Horsmann wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hi List, <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">me again - i also updated the test-system to latest CentOS 7.7.1908 to be sure that the rpm building source and my target system are on the same versions.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"> lsb_release -a<br>
LSB Version: :core-4.1-amd64:core-4.1-noarch<br>
Distributor ID: CentOS<br>
Description: CentOS Linux release 7.7.1908 (Core)<br>
Release: 7.7.1908<br>
Codename: Core<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Am Di., 22. Okt. 2019 um 14:58 Uhr schrieb Karsten Horsmann <<a href="mailto:khorsmann@gmail.com" target="_blank">khorsmann@gmail.com</a>>:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hi List, <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">i updated one of my testing kamailios from 5.2.x to latest 5.3.x.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">After restarting the process, i got an mysql error that the server "kamailio" is not found.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">I use the config-feature of my.cnf config-group names within the kamailio.cfg<br>
I can start my kamailio 5.3.x installation with "normal username:password@host" definitions for DBURL.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:35.4pt">
Did anyone have the same issue?<br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"> 0(19625) ERROR: db_mysql [km_my_con.c:139]: db_mysql_new_connection(): driver error: Can't connect to MySQL server on 'kamailio' (4)<br>
0(19625) ERROR: <core> [db.c:319]: db_do_init2(): could not add connection to the pool<br>
0(19625) ERROR: dialplan [dp_db.c:179]: dp_connect_db(): unable to connect to the database<br>
0(19625) ERROR: dialplan [dialplan.c:191]: mod_init(): could not initialize data<br>
0(19625) ERROR: <core> [core/sr_module.c:850]: init_mod(): Error while initializing module dialplan (/usr/lib64/kamailio/modules/dialplan.so)<br>
ERROR: error while initializing modules<br>
<br>
<br>
from my kamailio.cfg i defined the DBURL like this:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><br>
# Use /etc/my.cnf.d/kamailio.cnf to store credentials<br>
# within a mysql-db-group<br>
#!define DBURL "mysql://[kamailio]/kamailio"<br>
<br>
and special modules can use it like this (or via DBURL)<br>
modparam("sqlops", "sqlcon", "cb=>mysql://[kamailio]/kamailio")<br>
<br>
cat /etc/my.cnf.d/kamailio.cnf<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><br>
# MySQL configuration group for kamailio<br>
[kamailio]<br>
user=kamailio<br>
password="kamailiorw"<br>
host=172.20.100.22<br>
<br>
<br>
rpm -qa | grep kam<br>
kamailio-dialplan-5.3.0-13.1.x86_64<br>
kamailio-websocket-5.3.0-13.1.x86_64<br>
kamailio-jansson-5.3.0-13.1.x86_64<br>
kamailio-mysql-5.3.0-13.1.x86_64<br>
kamailio-tls-5.3.0-13.1.x86_64<br>
kamailio-ims-5.3.0-13.1.x86_64<br>
kamailio-statsd-5.3.0-13.1.x86_64<br>
kamailio-5.3.0-13.1.x86_64<br>
kamailio-redis-5.3.0-13.1.x86_64<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"> cat /etc/redhat-release<br>
CentOS Linux release 7.6.1810 (Core)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt">-- <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Cheers<br>
*Karsten Horsmann*<o:p></o:p></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt">-- <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Mit freundlichen Grüßen<br>
*Karsten Horsmann*<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<pre style="margin-left:35.4pt">_______________________________________________<o:p></o:p></pre>
<pre style="margin-left:35.4pt">Kamailio (SER) - Users Mailing List<o:p></o:p></pre>
<pre style="margin-left:35.4pt"><a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><o:p></o:p></pre>
<pre style="margin-left:35.4pt"><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></pre>
</blockquote>
<pre style="margin-left:35.4pt">-- <o:p></o:p></pre>
<pre style="margin-left:35.4pt">Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a><o:p></o:p></pre>
<pre style="margin-left:35.4pt"><a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a><o:p></o:p></pre>
<pre style="margin-left:35.4pt">Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- <a href="https://asipto.com/u/kat" target="_blank">https://asipto.com/u/kat</a><o:p></o:p></pre>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt">-- <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Mit freundlichen Grüßen<br>
*Karsten Horsmann*<o:p></o:p></p>
</div>
</blockquote>
<pre style="margin-left:35.4pt">-- <o:p></o:p></pre>
<pre style="margin-left:35.4pt">Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a><o:p></o:p></pre>
<pre style="margin-left:35.4pt"><a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a><o:p></o:p></pre>
<pre style="margin-left:35.4pt">Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- <a href="https://asipto.com/u/kat" target="_blank">https://asipto.com/u/kat</a><o:p></o:p></pre>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt">-- <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Mit freundlichen Grüßen<br>
*Karsten Horsmann*<o:p></o:p></p>
</div>
</div>
</body>
</html>