[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sr-users
Subject:    Re: [SR-Users] kamailio - mariadb hosted on  remote server - issue
From:       Henning Westerholt <hw () gilawa ! com>
Date:       2022-03-28 18:23:28
Message-ID: PAXPR05MB855810F374986AFCEB9187FCBF1D9 () PAXPR05MB8558 ! eurprd05 ! prod ! outlook ! com
[Download RAW message or body]

[Attachment #2 (text/plain)]

Hello,

have a look to these pages for example for further ideas how to debug it:

https://www.percona.com/blog/2016/05/16/mysql-got-an-error-reading-communication-packet-errors/
 https://www.percona.com/blog/2008/08/23/how-to-track-down-the-source-of-aborted_connects/


Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>

From: Youssef Boujraf <yboujraf@by-research.be>
Sent: Monday, March 28, 2022 6:31 PM
To: Henning Westerholt <hw@gilawa.com>
Cc: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: RE: [SR-Users] kamailio - mariadb hosted on remote server - issue

Dear,

The mysql server no log file in /var/log/mysql or I don't know where mysql stores the \
logs.

I forgot to inform the OS is debian 11.

Best Regards,


On Monday, March 28, 2022 18:15 CEST, Henning Westerholt \
<hw@gilawa.com<mailto:hw@gilawa.com>> wrote:


Hello,

yes, DB connection is usually straight forward.

Do you see any errors in the mysql server logs? Any errors visible with some network \
debugging tools?

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>

From: sr-users <sr-users-bounces@lists.kamailio.org<mailto:sr-users-bounces@lists.kamailio.org>> \
                On Behalf Of Youssef Boujraf
Sent: Monday, March 28, 2022 5:47 PM
To: sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org>
Subject: [SR-Users] kamailio - mariadb hosted on remote server - issue

Dear all,

I don't belive to connect Kamailio to a remote Mariadb will take too much time.


STEP 1 : KAMAILIO :
--------------------------------

$ sudo kamailio -v
version: kamailio 5.5.4 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, \
USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, \
DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, \
USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED \
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE \
65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, \
                select.
id: unknown
compiled with gcc 10.2.1

STEP 2 : Set the kamctlrc config
------------------------------------------------

KAMAILIO IP : 192.168.1.41
MARIADB IP : 192.168.1.39

- /etc/kamailio/kamctlrc

SIP_DOMAIN=example.be
DBENGINE=MYSQL
DBHOST=192.168.1.39 // where the mariadb is installed
DBNAME=kamailio
DBRWUSER="kamailio"
DBRWPW="XX"
DBROUSER="kamailioro"
DBROPW="XX"
DBACCESSHOST=192.168.1.41 // where kamctl is launched (here kamailio srv)
DBROOTUSER="root"
DBROOTPW="kamailio"
class="MsoNormal" style="margin-left:35.4pt">
STEP 3 : MARIADB : hosted on different srv than kamailio
--------------------------------------------------------------------------------------


IP : 192.168.1.39

- /etc/mysql/mariadb.conf.d/50-server.cnf

# this is only for the mysqld standalone daemon
[mysqld]

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address            = 127.0.0.1
bind-address            = 0.0.0.0


STEP 4 : TEST : Reote connection with the DB
----------------------------------------------------------------------

REMOTE IP : 192.168.1.41
DB IP : 192.168.1.39


$ sudo mysql -u root -h 192.168.1.39 -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 298
Server version: 10.5.15-MariaDB-1:10.5.15+maria~bullseye mariadb.org binary \
distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>
The connection is established with success.


STEP 5 : KAMAILIO DB : creation
----------------------------------------------------

$ sudo kamdbctl create
-e \E[37;33mINFO: creating database kamailio ...
-e \E[37;33mINFO: granting privileges to database kamailio ...
-e \E[37;33mINFO: creating standard tables into kamailio ...
-e \E[37;33mINFO: Core Kamailio tables successfully created.
Create the presence related tables? (y/n): y
-e \E[37;33mINFO: creating presence tables into kamailio ...
-e \E[37;33mINFO: Presence tables successfully created.
Create the tables for imc cpl siptrace domainpolicy carrierroute
                drouting userblocklist htable purple uac pipelimit mtree sca mohqueue
                rtpproxy rtpengine secfilter? (y/n): y
-e \E[37;33mINFO: creating extra tables into kamailio ...
-e \E[37;33mINFO: Extra tables successfully created.
Create the tables for uid_auth_db uid_avp_db uid_domain uid_gflags
                uid_uri_db? (y/n): y
-e \E[37;33mINFO: creating uid tables into kamailio ...
-e \E[37;33mINFO: UID tables successfully created.

STEP 6 : DB : verify the users creation and rights
--------------------------------------------------------------------------

MariaDB [(none)]> select user, host from mysql.user;
+-------------+--------------+
> User        | Host         |
+-------------+--------------+
> kamailio    | 192.168.1.39 |
> kamailioro  | 192.168.1.39 |
> kamailio    | 192.168.1.41 |
> kamailioro  | 192.168.1.41 |
> root        | 192.168.1.41 |
> kamailio    | localhost    |
> kamailioro  | localhost    |
> mariadb.sys | localhost    |
> mysql       | localhost    |
> root        | localhost    |
+-------------+--------------+
10 rows in set (0.001 sec)

MariaDB [(none)]> SHOW GRANTS FOR \
kamailio@192.168.1.41<mailto:kamailio@192.168.1.41>; \
+--------------------------------------------------------------------------------------------------------------------+
 | Grants for kamailio@192.168.1.41<mailto:kamailio@192.168.1.41>                     \
| +--------------------------------------------------------------------------------------------------------------------+
 | GRANT USAGE ON *.* TO `kamailio`@`192.168.1.41` IDENTIFIED BY PASSWORD \
'*157PASSWORD' | | GRANT ALL PRIVILEGES ON `kamailio`.* TO `kamailio`@`192.168.1.41`  \
| +--------------------------------------------------------------------------------------------------------------------+
 2 rows in set (0.000 sec)

MariaDB [(none)]> SHOW GRANTS FOR \
kamailio@192.168.1.39<mailto:kamailio@192.168.1.39>; \
+--------------------------------------------------------------------------------------------------------------------+
 | Grants for kamailio@192.168.1.39<mailto:kamailio@192.168.1.39>                     \
| +--------------------------------------------------------------------------------------------------------------------+
 | GRANT USAGE ON *.* TO `kamailio`@`192.168.1.39` IDENTIFIED BY PASSWORD \
'*157PASSWORD' | | GRANT ALL PRIVILEGES ON `kamailio`.* TO `kamailio`@`192.168.1.39`  \
| +--------------------------------------------------------------------------------------------------------------------+
 2 rows in set (0.000 sec)

MariaDB [(none)]> SHOW GRANTS FOR kamailio@localhost;
+-----------------------------------------------------------------------------------------------------------------+
 | Grants for kamailio@localhost                                                      \
| +-----------------------------------------------------------------------------------------------------------------+
 | GRANT USAGE ON *.* TO `kamailio`@`localhost` IDENTIFIED BY PASSWORD '*157PASSWORD' \
| | GRANT ALL PRIVILEGES ON `kamailio`.* TO `kamailio`@`localhost`                    \
| +-----------------------------------------------------------------------------------------------------------------+
 2 rows in set (0.000 sec)
STEP 7 : ADDRESS TABLE : add new ip address
$ sudo systemctl restart kamailio
sipsecure@kamailio:/etc$ sudo kamctl address add 0 192.168.1.26 32 0 HP
-e \E[37;33mINFO: execute '/sbin/kamctl address reload' to synchronize cache and \
database



STEP 8 : DB : verify if the new ip address is created ? Yes

MariaDB [(none)]> select * from kamailio.address;
+----+-----+--------------+------+------+------+
> id | grp | ip_addr      | mask | port | tag  |
+----+-----+--------------+------+------+------+
> 1 |   0 | 192.168.1.26 |   32 |    0 | HP   |
+----+-----+--------------+------+------+------+
1 row in set (0.000 sec)

STEP 9 : Reload the content of the DB into kamailio. It failed
----------------------------------------------------------------------------------------


The host: '192.168.1.41' is kamailio (remote client)
$ sudo kamctl address reload
{
  "jsonrpc":  "2.0",
  "error":  {
    "code": 500,
    "message":  "Reload failed."
  },
  "id": 12397
}


In /var/log/daemon.log

Mar 28 17:09:49 db04srv mariadbd[2430]: 2022-03-28 17:09:49 281 [Warning] Aborted \
connection 281 to db: 'kamailio' user: 'kamailio' host: '192.168.1.41' (Got an error \
                reading communication packets)
Mar 28 17:09:49 db04srv mariadbd[2430]: 2022-03-28 17:09:49 273 [Warning] Aborted \
connection 273 to db: 'kamailio' user: 'kamailio' host: '192.168.1.41' (Got an error \
                reading communication packets)
Mar 28 17:09:49 db04srv mariadbd[2430]: 2022-03-28 17:09:49 295 [Warning] Aborted \
connection 295 to db: 'kamailio' user: 'kamailio' host: '192.168.1.41' (Got an error \
                reading communication packets)
Mar 28 17:09:49 db04srv mariadbd[2430]: 2022-03-28 17:09:49 264 [Warning] Aborted \
connection 264 to db: 'kamailio' user: 'kamailio' host: '192.168.1.41' (Got an error \
reading communication packets)

Now, if I am trying to restart "kamailio" service, I got an error :

Mar 28 17:36:30 kamailio /usr/sbin/kamailio[14196]: DEBUG: <core> \
                [core/sr_module.c:940]: init_mod(): permissions
Mar 28 17:36:30 kamailio /usr/sbin/kamailio[14196]: DEBUG: permissions \
                [address.c:179]: reload_address_db_table(): Number of rows in address \
                table: 1
Mar 28 17:36:30 kamailio /usr/sbin/kamailio[14196]: DEBUG: permissions \
[address.c:191]: reload_address_db_table(): failure during checks of database value 1 \
                (group) in address table
Mar 28 17:36:30 kamailio /usr/sbin/kamailio[14196]: ERROR: permissions \
                [address.c:233]: reload_address_db_table(): database problem - \
                invalid record
Mar 28 17:36:30 kamailio /usr/sbin/kamailio[14196]: CRITICAL: permissions \
                [address.c:536]: init_addresses(): reload of address table failed
Mar 28 17:36:30 kamailio /usr/sbin/kamailio[14196]: ERROR: permissions \
                [permissions.c:657]: mod_init(): failed to initialize the \
                allow_address function
Mar 28 17:36:30 kamailio /usr/sbin/kamailio[14196]: ERROR: <core> \
[core/sr_module.c:942]: init_mod(): Error while initializing module permissions \
                (/usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so)
Mar 28 17:36:30 kamailio kamailio: DEBUG: <core> [core/cfg.y:1860]: yyparse(): \
                loading module permissions.so
Mar 28 17:36:30 kamailio kamailio: DEBUG: <core> [core/sr_module.c:513]: \
ksr_locate_module(): found module to load \
                </usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so>
Mar 28 17:36:30 kamailio kamailio: DEBUG: <core> [core/sr_module.c:563]: \
load_module(): trying to load \
                </usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so>
Mar 28 17:36:30 kamailio kamailio: DEBUG: <core> [core/kemi.c:3090]: \
                sr_kemi_modules_add(): adding module: permissions
Mar 28 17:36:30 kamailio kamailio: DEBUG: <core> [core/cfg.lex:1963]: pp_define(): \
                defining id: MOD_permissions
Mar 28 17:36:30 kamailio kamailio: DEBUG: <core> [core/modparam.c:112]: \
                set_mod_param_regex(): 'permissions' matches module 'permissions'
Mar 28 17:36:30 kamailio kamailio: DEBUG: <core> [core/sr_module.c:811]: \
find_param_export(): found <db_url> in module permissions \
                [/usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so]
Mar 28 17:36:30 kamailio kamailio: DEBUG: <core> [core/modparam.c:128]: \
set_mod_param_regex(): found <db_url> in module permissions \
                [/usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so]
Mar 28 17:36:30 kamailio kamailio: DEBUG: <core> [core/modparam.c:112]: \
                set_mod_param_regex(): 'permissions' matches module 'permissions'
Mar 28 17:36:30 kamailio kamailio: DEBUG: <core> [core/sr_module.c:811]: \
find_param_export(): found <load_backends> in module permissions \
                [/usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so]
Mar 28 17:36:30 kamailio kamailio: DEBUG: <core> [core/modparam.c:128]: \
set_mod_param_regex(): found <load_backends> in module permissions \
                [/usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so]
Mar 28 17:36:31 kamailio kamailio: DEBUG: <core> [core/sr_module.c:719]: \
find_mod_export_record(): found export of <allow_source_address> in module \
                permissions \
                [/usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so]
Mar 28 17:36:31 kamailio kamailio: DEBUG: <core> [core/sr_module.c:719]: \
find_mod_export_record(): found export of <allow_source_address_group> in module \
permissions [/usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so If I remove \
the record from the database manually, I can restart kamailio but no way to add any \
address.

Thanks if someone could highlight my path.

Best Regards,

--
Youssef



--
Youssef BOUJRAF | Managing Director

Direct Line: +32 (0)2 880 33 30
Mobile: +32 (0)477 94 86 89
Dubai Mobile : +971 (0)55 9928871
Fax: +32 (0)2 318 82 21
Skype: y_boujraf<callto://y_boujraf/>
Email: yboujraf@by-research.be<mailto:yboujraf@by-systems.be>
Web : www.by-systems.be/<http://www.by-systems.be/>

BY-SYSTEMS sprl| Avenue Charles Plisnier 13 | B-1070 Anderlecht | Belgium | TVA: BE \
0819.832.617 ________________________________
This communication, issued by BY-SYSTEMS SPRL, is confidential and we do not waive \
confidentiality by mistransmission. If you have received it by mistake please notify \
the sender immediately by reply and then delete it permanently from your system \
without copying it, using it for any purposes or disclosing its contents to any other \
person. Thank you for your cooperation. Any views expressed in this message are those \
of the individual sender and may not necessarily reflect the views of BY-SYSTEMS \
SPRL. Emails are not secure and cannot be guaranteed to be error free as they can be \
intercepted, amended, lost or destroyed, or contain viruses. Anyone who communicates \
with us by email is taken to accept these risks.


[Attachment #3 (text/html)]

<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)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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:Verdana;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
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="#0563C1" vlink="purple" style="word-wrap:break-word">
<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>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">have a look \
to these pages for example for further ideas how to debug it:<o:p></o:p></span></p> \
<p class="MsoNormal"><span lang="EN-GB" \
style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><a \
href="https://www.percona.com/blog/2016/05/16/mysql-got-an-error-reading-communication \
-packet-errors/">https://www.percona.com/blog/2016/05/16/mysql-got-an-error-reading-communication-packet-errors/</a><o:p></o:p></span></p>
 <p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><a \
href="https://www.percona.com/blog/2008/08/23/how-to-track-down-the-source-of-aborted_ \
connects/">https://www.percona.com/blog/2008/08/23/how-to-track-down-the-source-of-aborted_connects/</a><o:p></o:p></span></p>
 <p class="MsoNormal"><span lang="EN-GB" \
style="mso-fareast-language:EN-US"><o:p>&nbsp;</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>&nbsp;</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>&nbsp;</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">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://gilawa.com/"><span \
lang="EN-GB">https://gilawa.com</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>&nbsp;</o:p></span></p> <div \
style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm"> <p \
class="MsoNormal" style="margin-left:35.4pt"><b>From:</b> Youssef Boujraf \
&lt;yboujraf@by-research.be&gt; <br>
<b>Sent:</b> Monday, March 28, 2022 6:31 PM<br>
<b>To:</b> Henning Westerholt &lt;hw@gilawa.com&gt;<br>
<b>Cc:</b> Kamailio (SER) - Users Mailing List \
&lt;sr-users@lists.kamailio.org&gt;<br> <b>Subject:</b> RE: [SR-Users] kamailio - \
mariadb hosted on remote server - issue<o:p></o:p></p> </div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt">Dear,<br>
<br>
The mysql server no log file in /var/log/mysql or I don't know where mysql stores the \
logs.<br> <br>
I forgot to inform the OS is debian 11.<br>
<br>
Best Regards,<br>
<br>
<br>
On Monday, March 28, 2022 18:15 CEST, Henning Westerholt &lt;<a \
href="mailto:hw@gilawa.com">hw@gilawa.com</a>&gt; wrote:<br> &nbsp;<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-left:35.4pt">&nbsp;<o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-left:35.4pt"><span \
style="mso-fareast-language:EN-US">Hello,</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span \
style="mso-fareast-language:EN-US">&nbsp;</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US">yes, \
DB connection is usually straight forward.</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-GB" \
style="mso-fareast-language:EN-US">&nbsp;</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US">Do \
you see any errors in the mysql server logs? Any errors visible with some network \
debugging tools?</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-GB" \
style="mso-fareast-language:EN-US">&nbsp;</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-GB" \
style="mso-fareast-language:EN-US">Cheers,</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-GB" \
style="mso-fareast-language:EN-US">&nbsp;</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-GB" \
style="mso-fareast-language:EN-US">Henning</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-GB" \
style="mso-fareast-language:EN-US">&nbsp;</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US">-- \
</span><o:p></o:p></p> <p class="MsoNormal" style="margin-left:35.4pt"><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">https://skalatan.de/blog/</span></a></span><o:p></o:p></p> <p \
class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" \
style="mso-fareast-language:EN-US">Kamailio services – </span><span \
style="mso-fareast-language:EN-US"><a href="https://gilawa.com/"><span \
lang="EN-GB">https://gilawa.com</span></a></span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-GB" \
style="mso-fareast-language:EN-US">&nbsp;</span><o:p></o:p></p> <div \
style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm"> <p \
class="MsoNormal" style="margin-left:70.8pt"><b>From:</b> sr-users &lt;<a \
href="mailto:sr-users-bounces@lists.kamailio.org">sr-users-bounces@lists.kamailio.org</a>&gt;
 <b>On Behalf Of </b>Youssef Boujraf<br>
<b>Sent:</b> Monday, March 28, 2022 5:47 PM<br>
<b>To:</b> <a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
 <b>Subject:</b> [SR-Users] kamailio - mariadb hosted on remote server - \
issue<o:p></o:p></p> </div>
<p class="MsoNormal" style="margin-left:70.8pt">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt">Dear all,<br>
<br>
I don't belive to connect Kamailio to a remote Mariadb will take too much time.<br>
<br>
<br>
STEP 1 : KAMAILIO :<br>
--------------------------------<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin-left:70.8pt">$ sudo kamailio -v<br>
version: kamailio 5.5.4 (x86_64/linux)<br>
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, \
USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, \
DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, \
USE_NAPTR, USE_DST_BLOCKLIST,  HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED<br>
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE \
65535, DEFAULT PKG_SIZE 8MB<br> poll method support: poll, epoll_lt, epoll_et, \
                sigio_rt, select.<br>
id: unknown<br>
compiled with gcc 10.2.1<o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-left:70.8pt"><br>
STEP 2 : Set the kamctlrc config<br>
------------------------------------------------<br>
<br>
KAMAILIO IP : 192.168.1.41<br>
MARIADB IP : 192.168.1.39<br>
<br>
- /etc/kamailio/kamctlrc<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin-left:70.8pt">SIP_DOMAIN=example.be<br>
DBENGINE=MYSQL<br>
DBHOST=192.168.1.39 // where the mariadb is installed<br>
DBNAME=kamailio<br>
DBRWUSER=&quot;kamailio&quot;<br>
DBRWPW=&quot;XX&quot;<br>
DBROUSER=&quot;kamailioro&quot;<br>
DBROPW=&quot;XX&quot;<br>
DBACCESSHOST=192.168.1.41 // where kamctl is launched (here kamailio srv)<br>
DBROOTUSER=&quot;root&quot;<br>
DBROOTPW=&quot;kamailio&quot;<br>
class=&quot;MsoNormal&quot; style=&quot;margin-left:35.4pt&quot;&gt;<br>
STEP 3 : MARIADB : hosted on different srv than kamailio<br>
--------------------------------------------------------------------------------------<br>
 <br>
IP : 192.168.1.39<br>
<br>
- /etc/mysql/mariadb.conf.d/50-server.cnf<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin-left:70.8pt"># this is only for the mysqld standalone daemon<br>
[mysqld]<br>
<br>
# Instead of skip-networking the default is now to listen only on<br>
# localhost which is more compatible and is not less secure.<br>
#bind-address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = \
127.0.0.1<br> bind-address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
= 0.0.0.0<o:p></o:p></p> </blockquote>
<p class="MsoNormal" style="margin-left:70.8pt"><br>
<br>
STEP 4 : TEST : Reote connection with the DB<br>
----------------------------------------------------------------------<br>
<br>
REMOTE IP : 192.168.1.41<br>
DB IP : 192.168.1.39<br>
&nbsp;<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin-left:70.8pt"><br>
$ sudo mysql -u root -h 192.168.1.39 -p<br>
Enter password:<br>
Welcome to the MariaDB monitor.&nbsp; Commands end with ; or \g.<br>
Your MariaDB connection id is 298<br>
Server version: 10.5.15-MariaDB-1:10.5.15+maria~bullseye mariadb.org binary \
distribution<br> <br>
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.<br>
<br>
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.<br>
<br>
MariaDB [(none)]&gt;<o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-left:70.8pt">The connection is established with \
success.<br> <br>
<br>
STEP 5 : KAMAILIO DB : creation<br>
----------------------------------------------------<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin-left:70.8pt">$ sudo kamdbctl create<br>
-e \E[37;33mINFO: creating database kamailio ...<br>
-e \E[37;33mINFO: granting privileges to database kamailio ...<br>
-e \E[37;33mINFO: creating standard tables into kamailio ...<br>
-e \E[37;33mINFO: Core Kamailio tables successfully created.<br>
Create the presence related tables? (y/n): y<br>
-e \E[37;33mINFO: creating presence tables into kamailio ...<br>
-e \E[37;33mINFO: Presence tables successfully created.<br>
Create the tables for imc cpl siptrace domainpolicy carrierroute<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
drouting userblocklist htable purple uac pipelimit mtree sca mohqueue<br> \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
                rtpproxy rtpengine secfilter? (y/n): y<br>
-e \E[37;33mINFO: creating extra tables into kamailio ...<br>
-e \E[37;33mINFO: Extra tables successfully created.<br>
Create the tables for uid_auth_db uid_avp_db uid_domain uid_gflags<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
                uid_uri_db? (y/n): y<br>
-e \E[37;33mINFO: creating uid tables into kamailio ...<br>
-e \E[37;33mINFO: UID tables successfully created.<o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-left:70.8pt"><br>
STEP 6 : DB : verify the users creation and rights<br>
--------------------------------------------------------------------------<o:p></o:p></p>
 <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin-left:70.8pt">MariaDB [(none)]&gt; select user, host from \
mysql.user;<br> +-------------+--------------+<br>
> User&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | \
> Host&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>
+-------------+--------------+<br>
> kamailio&nbsp;&nbsp;&nbsp; | 192.168.1.39 |<br>
> kamailioro&nbsp; | 192.168.1.39 |<br>
> kamailio&nbsp;&nbsp;&nbsp; | 192.168.1.41 |<br>
> kamailioro&nbsp; | 192.168.1.41 |<br>
> root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 192.168.1.41 |<br>
> kamailio&nbsp;&nbsp;&nbsp; | localhost&nbsp;&nbsp;&nbsp; |<br>
> kamailioro&nbsp; | localhost&nbsp;&nbsp;&nbsp; |<br>
> mariadb.sys | localhost&nbsp;&nbsp;&nbsp; |<br>
> mysql&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | localhost&nbsp;&nbsp;&nbsp; |<br>
> root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | localhost&nbsp;&nbsp;&nbsp; |<br>
+-------------+--------------+<br>
10 rows in set (0.001 sec)<br>
<br>
MariaDB [(none)]&gt; SHOW GRANTS FOR <a \
href="mailto:kamailio@192.168.1.41">kamailio@192.168.1.41</a>;<br> \
+--------------------------------------------------------------------------------------------------------------------+<br>
 | Grants for <a href="mailto:kamailio@192.168.1.41">kamailio@192.168.1.41</a>&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs \
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs \
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
|<br> +--------------------------------------------------------------------------------------------------------------------+<br>
 | GRANT USAGE ON *.* TO `kamailio`@`192.168.1.41` IDENTIFIED BY PASSWORD \
'*157PASSWORD' |<br> | GRANT ALL PRIVILEGES ON `kamailio`.* TO \
`kamailio`@`192.168.1.41`&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& \
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb \
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
|<br> +--------------------------------------------------------------------------------------------------------------------+<br>
 2 rows in set (0.000 sec)<br>
<br>
MariaDB [(none)]&gt; SHOW GRANTS FOR <a \
href="mailto:kamailio@192.168.1.39">kamailio@192.168.1.39</a>;<br> \
+--------------------------------------------------------------------------------------------------------------------+<br>
 | Grants for <a href="mailto:kamailio@192.168.1.39">kamailio@192.168.1.39</a>&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs \
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs \
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
|<br> +--------------------------------------------------------------------------------------------------------------------+<br>
 | GRANT USAGE ON *.* TO `kamailio`@`192.168.1.39` IDENTIFIED BY PASSWORD \
'*157PASSWORD' |<br> | GRANT ALL PRIVILEGES ON `kamailio`.* TO \
`kamailio`@`192.168.1.39`&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& \
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb \
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
|<br> +--------------------------------------------------------------------------------------------------------------------+<br>
 2 rows in set (0.000 sec)<br>
<br>
MariaDB [(none)]&gt; SHOW GRANTS FOR kamailio@localhost;<br>
+-----------------------------------------------------------------------------------------------------------------+<br>
 | Grants for kamailio@localhost&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs \
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
|<br> +-----------------------------------------------------------------------------------------------------------------+<br>
 | GRANT USAGE ON *.* TO `kamailio`@`localhost` IDENTIFIED BY PASSWORD '*157PASSWORD' \
|<br> | GRANT ALL PRIVILEGES ON `kamailio`.* TO \
`kamailio`@`localhost`&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs \
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
|<br> +-----------------------------------------------------------------------------------------------------------------+<br>
 2 rows in set (0.000 sec)<o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-left:70.8pt">STEP 7 : ADDRESS TABLE : add new ip \
address<o:p></o:p></p> <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-left:70.8pt">$ sudo systemctl restart kamailio<br>
sipsecure@kamailio:/etc$ sudo kamctl address add 0 192.168.1.26 32 0 HP<br>
-e \E[37;33mINFO: execute '/sbin/kamctl address reload' to synchronize cache and \
database<o:p></o:p></p> <p style="margin-left:70.8pt">&nbsp;<o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-left:70.8pt"><br>
STEP 8 : DB : verify if the new ip address is created ? Yes<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin-left:70.8pt">MariaDB [(none)]&gt; select * from \
kamailio.address;<br> +----+-----+--------------+------+------+------+<br>
> id | grp | ip_addr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | mask | port | tag&nbsp; |<br>
+----+-----+--------------+------+------+------+<br>
> &nbsp; 1 |&nbsp;&nbsp; 0 | 192.168.1.26 |&nbsp;&nbsp; 32 |&nbsp;&nbsp;&nbsp; 0 | \
> HP&nbsp;&nbsp; |<br>
+----+-----+--------------+------+------+------+<br>
1 row in set (0.000 sec)<o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-left:70.8pt"><br>
STEP 9 : Reload the content of the DB into kamailio. It failed<br>
----------------------------------------------------------------------------------------<br>
 <br>
The host: '192.168.1.41' is kamailio (remote client)<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-left:70.8pt">$ sudo kamctl address reload<br>
{<br>
&nbsp; &quot;jsonrpc&quot;:&nbsp; &quot;2.0&quot;,<br>
&nbsp; &quot;error&quot;:&nbsp; {<br>
&nbsp;&nbsp;&nbsp; &quot;code&quot;: 500,<br>
&nbsp;&nbsp;&nbsp; &quot;message&quot;:&nbsp; &quot;Reload failed.&quot;<br>
&nbsp; },<br>
&nbsp; &quot;id&quot;: 12397<br>
}<o:p></o:p></p>
<p style="margin-left:70.8pt">&nbsp;<o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-left:70.8pt">In /var/log/daemon.log<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin-left:70.8pt">Mar 28 17:09:49 db04srv mariadbd[2430]: 2022-03-28 \
17:09:49 281 [Warning] Aborted connection 281 to db: 'kamailio' user: 'kamailio' \
                host: '192.168.1.41' (Got an error reading communication packets)<br>
Mar 28 17:09:49 db04srv mariadbd[2430]: 2022-03-28 17:09:49 273 [Warning] Aborted \
connection 273 to db: 'kamailio' user: 'kamailio' host: '192.168.1.41' (Got an error \
                reading communication packets)<br>
Mar 28 17:09:49 db04srv mariadbd[2430]: 2022-03-28 17:09:49 295 [Warning] Aborted \
connection 295 to db: 'kamailio' user: 'kamailio' host: '192.168.1.41' (Got an error \
                reading communication packets)<br>
Mar 28 17:09:49 db04srv mariadbd[2430]: 2022-03-28 17:09:49 264 [Warning] Aborted \
connection 264 to db: 'kamailio' user: 'kamailio' host: '192.168.1.41' (Got an error \
reading communication packets)<o:p></o:p></p> </blockquote>
<p class="MsoNormal" style="margin-left:70.8pt"><br>
Now, if I am trying to restart &quot;kamailio&quot; service, I got an error \
:<o:p></o:p></p> <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin-left:70.8pt">Mar 28 17:36:30 kamailio /usr/sbin/kamailio[14196]: \
                DEBUG: &lt;core&gt; [core/sr_module.c:940]: init_mod(): \
                permissions<br>
Mar 28 17:36:30 kamailio /usr/sbin/kamailio[14196]: DEBUG: permissions \
                [address.c:179]: reload_address_db_table(): Number of rows in address \
                table: 1<br>
Mar 28 17:36:30 kamailio /usr/sbin/kamailio[14196]: DEBUG: permissions \
[address.c:191]: reload_address_db_table(): failure during checks of database value 1 \
                (group) in address table<br>
Mar 28 17:36:30 kamailio /usr/sbin/kamailio[14196]: ERROR: permissions \
                [address.c:233]: reload_address_db_table(): database problem - \
                invalid record<br>
Mar 28 17:36:30 kamailio /usr/sbin/kamailio[14196]: CRITICAL: permissions \
                [address.c:536]: init_addresses(): reload of address table failed<br>
Mar 28 17:36:30 kamailio /usr/sbin/kamailio[14196]: ERROR: permissions \
                [permissions.c:657]: mod_init(): failed to initialize the \
                allow_address function<br>
Mar 28 17:36:30 kamailio /usr/sbin/kamailio[14196]: ERROR: &lt;core&gt; \
[core/sr_module.c:942]: init_mod(): Error while initializing module permissions \
                (/usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so)<br>
Mar 28 17:36:30 kamailio kamailio: DEBUG: &lt;core&gt; [core/cfg.y:1860]: yyparse(): \
                loading module permissions.so<br>
Mar 28 17:36:30 kamailio kamailio: DEBUG: &lt;core&gt; [core/sr_module.c:513]: \
ksr_locate_module(): found module to load \
                &lt;/usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so&gt;<br>
Mar 28 17:36:30 kamailio kamailio: DEBUG: &lt;core&gt; [core/sr_module.c:563]: \
load_module(): trying to load \
                &lt;/usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so&gt;<br>
Mar 28 17:36:30 kamailio kamailio: DEBUG: &lt;core&gt; [core/kemi.c:3090]: \
                sr_kemi_modules_add(): adding module: permissions<br>
Mar 28 17:36:30 kamailio kamailio: DEBUG: &lt;core&gt; [core/cfg.lex:1963]: \
                pp_define(): defining id: MOD_permissions<br>
Mar 28 17:36:30 kamailio kamailio: DEBUG: &lt;core&gt; [core/modparam.c:112]: \
                set_mod_param_regex(): 'permissions' matches module 'permissions'<br>
Mar 28 17:36:30 kamailio kamailio: DEBUG: &lt;core&gt; [core/sr_module.c:811]: \
find_param_export(): found &lt;db_url&gt; in module permissions \
                [/usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so]<br>
Mar 28 17:36:30 kamailio kamailio: DEBUG: &lt;core&gt; [core/modparam.c:128]: \
set_mod_param_regex(): found &lt;db_url&gt; in module permissions \
                [/usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so]<br>
Mar 28 17:36:30 kamailio kamailio: DEBUG: &lt;core&gt; [core/modparam.c:112]: \
                set_mod_param_regex(): 'permissions' matches module 'permissions'<br>
Mar 28 17:36:30 kamailio kamailio: DEBUG: &lt;core&gt; [core/sr_module.c:811]: \
find_param_export(): found &lt;load_backends&gt; in module permissions \
                [/usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so]<br>
Mar 28 17:36:30 kamailio kamailio: DEBUG: &lt;core&gt; [core/modparam.c:128]: \
set_mod_param_regex(): found &lt;load_backends&gt; in module permissions \
                [/usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so]<br>
Mar 28 17:36:31 kamailio kamailio: DEBUG: &lt;core&gt; [core/sr_module.c:719]: \
find_mod_export_record(): found export of &lt;allow_source_address&gt; in module \
                permissions \
                [/usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so]<br>
Mar 28 17:36:31 kamailio kamailio: DEBUG: &lt;core&gt; [core/sr_module.c:719]: \
find_mod_export_record(): found export of &lt;allow_source_address_group&gt; in \
module permissions [/usr/lib/x86_64-linux-gnu/kamailio/modules/permissions.so<o:p></o:p></p>
 </blockquote>
<p class="MsoNormal" style="margin-left:70.8pt">If I remove the record from the \
database manually, I can restart kamailio but no way to add any address.<br> <br>
Thanks if someone could highlight my path.<br>
<br>
Best Regards,<br>
<br>
--<br>
<b><span lang="EN-US" \
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1F497D">Youssef
 </span></b><o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-left:35.4pt"><br>
<br>
<br>
--<br>
<b><span lang="EN-US" \
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1F497D">Youssef \
BOUJRAF</span></b>&nbsp;<span lang="EN-US" \
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:gray">| \
Managing Director</span><br> <br>
<span lang="EN-US" style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif;color:gray">Direct \
Line: +32 (0)2 880 33 30</span><br> <span \
style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif;color:gray">Mobile: \
+32 (0)477 94 86 89</span><br> <span \
style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif;color:gray">Dubai \
Mobile : +971 (0)55 9928871</span><br> <span \
style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif;color:gray">Fax: \
+32 (0)2 318 82 21</span><br> <span \
style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif;color:#7F7F7F">Skype:&nbsp;</span><a \
href="callto://y_boujraf/"><span \
style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif">y_boujraf</span></a><br>
 <span lang="EN-US" style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif;color:#7F7F7F">Email:&nbsp;</span><a \
href="mailto:yboujraf@by-systems.be"><span lang="EN-US" \
style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif">yboujraf@by-research.be</span></a><br>
 <span lang="EN-US" style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif;color:gray">Web \
:&nbsp;</span><a href="http://www.by-systems.be/"><span lang="EN-US" \
style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif">www.by-systems.be/</span></a><br>
 <br>
<b><span lang="EN-US" \
style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif;color:gray">BY-SYSTEMS</span></b><span \
lang="EN-US" style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif;color:gray">&nbsp;sprl| \
Avenue Charles Plisnier 13 | B-1070 Anderlecht | Belgium  | TVA: BE \
0819.832.617</span><o:p></o:p></p> <div class="MsoNormal" align="center" \
style="margin-left:35.4pt;text-align:center"> <hr size="2" width="100%" \
align="center"> </div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US" \
style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif;color:gray">This \
communication, issued by BY-SYSTEMS SPRL, is confidential and we do not waive \
confidentiality by mistransmission. If  you have received it by mistake please notify \
the sender immediately by reply and then delete it permanently from your system \
without copying it, using it for any purposes or disclosing its contents to any other \
person. Thank you for your cooperation. Any  views expressed in this message are \
those of the individual sender and may not necessarily reflect the views of \
BY-SYSTEMS SPRL. Emails are not secure and cannot be guaranteed to be error free as \
they can be intercepted, amended, lost or destroyed, or contain  viruses. Anyone who \
communicates with us by email is taken to accept these risks.</span><br> \
&nbsp;<o:p></o:p></p> </div>
</body>
</html>



__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--===============1658506183==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic