[sr-dev] Kamailio, debian and MySQL caching_sha2_password

Nicki Otte duckay at live.com
Thu Jan 21 09:48:49 CET 2021


nbo at Kamailio:~$ ldd /usr/lib/x86_64-linux-gnu/kamailio/modules/db_mysql.so
        linux-vdso.so.1 (0x00007ffdc3137000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f592074f000)
        libmariadb.so.3 => /lib/x86_64-linux-gnu/libmariadb.so.3 (0x00007f59206f8000)
        libsrdb2.so.1 => /usr/lib/x86_64-linux-gnu/kamailio/libsrdb2.so.1 (0x00007f59206e9000)
        libsrdb1.so.1 => /usr/lib/x86_64-linux-gnu/kamailio/libsrdb1.so.1 (0x00007f59206ae000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f592068d000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f59204cc000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f5920798000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5920347000)
        libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f592019a000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f591ff7c000)
        libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f591fe4d000)
        libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f591fe2e000)
        libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007f591fcaa000)
        libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f591fa95000)
        libnettle.so.6 => /lib/x86_64-linux-gnu/libnettle.so.6 (0x00007f591fa5d000)
        libhogweed.so.4 => /lib/x86_64-linux-gnu/libhogweed.so.4 (0x00007f591fa24000)
        libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f591f9a1000)
        libffi.so.6 => /lib/x86_64-linux-gnu/libffi.so.6 (0x00007f591f997000)

// Nicki Bo Otte


From: Henning Westerholt<mailto:hw at skalatan.de>
Sent: 21. januar 2021 09:37
To: Kamailio (SER) - Users Mailing List<mailto:sr-users at lists.kamailio.org>
Cc: Kamailio (SER) - Devel Mailing List<mailto:sr-dev at lists.kamailio.org>
Subject: Re: [SR-Users] Kamailio, debian and MySQL caching_sha2_password

Hello,

It seems that the respective plugin is missing or can not be loaded. Can you do a ldd on the db_mysql module?

E.g. like this: ldd /usr/lib/x86_64-linux-gnu/kamailio/modules/db_mysql.so

Cheers,

Henning

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

From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Nicki Otte
Sent: Thursday, January 21, 2021 8:27 AM
To: sr-users at lists.kamailio.org
Subject: [SR-Users] Kamailio, debian and MySQL caching_sha2_password

Hi all

Have any of you experienced problems using MySQL(Not MariaDB) on a debian machine, with caching_sha2_password?

I am having some trouble:
Jan 21 08:13:41 MobileValue-Kamailio systemd[1]: Starting Kamailio (OpenSER) - the Open Source SIP Server...
Jan 21 08:13:42 MobileValue-Kamailio kamailio: INFO: <core> [core/tcp_main.c:4983]: init_tcp(): using epoll_lt as the io watch method (auto detected)
Jan 21 08:13:42 MobileValue-Kamailio kamailio[24260]: Listening on
Jan 21 08:13:42 MobileValue-Kamailio kamailio[24260]:              udp: 185.31.176.39:5060
Jan 21 08:13:42 MobileValue-Kamailio kamailio[24260]:              tcp: 185.31.176.39:80
Jan 21 08:13:42 MobileValue-Kamailio kamailio[24260]: Aliases:
Jan 21 08:13:42 MobileValue-Kamailio kamailio[24260]:              tcp: voipgw01.evercall.dk:80
Jan 21 08:13:42 MobileValue-Kamailio kamailio[24260]:              udp: voipgw01.evercall.dk:5060
Jan 21 08:13:42 MobileValue-Kamailio /usr/sbin/kamailio[24262]: INFO: rr [../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe module is not loaded
Jan 21 08:13:42 MobileValue-Kamailio /usr/sbin/kamailio[24262]: INFO: rr [rr_mod.c:185]: mod_init(): outbound module not available
Jan 21 08:13:42 MobileValue-Kamailio /usr/sbin/kamailio[24262]: ERROR: db_mysql [km_my_con.c:163]: db_mysql_new_connection(): driver error: Plugin caching_sha2_password could not be loaded: /usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
Jan 21 08:13:42 MobileValue-Kamailio /usr/sbin/kamailio[24262]: ERROR: <core> [db.c:319]: db_do_init2(): could not add connection to the pool
Jan 21 08:13:42 MobileValue-Kamailio /usr/sbin/kamailio[24262]: ERROR: dispatcher [dispatch.c:903]: ds_connect_db(): cannot initialize db connection
Jan 21 08:13:42 MobileValue-Kamailio /usr/sbin/kamailio[24262]: ERROR: dispatcher [dispatch.c:937]: ds_init_db(): unable to connect to the database
Jan 21 08:13:42 MobileValue-Kamailio /usr/sbin/kamailio[24262]: ERROR: dispatcher [dispatcher.c:404]: mod_init(): could not initiate a connect to the database
Jan 21 08:13:42 MobileValue-Kamailio /usr/sbin/kamailio[24262]: ERROR: <core> [core/sr_module.c:849]: init_mod(): Error while initializing module dispatcher (/usr/lib/x86_64-linux-gnu/kamailio/modules/dispatcher.so)
Jan 21 08:13:42 MobileValue-Kamailio /usr/sbin/kamailio[24262]: INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
Jan 21 08:13:42 MobileValue-Kamailio systemd[1]: kamailio.service: Control process exited, code=exited, status=255/EXCEPTION
Jan 21 08:13:42 MobileValue-Kamailio systemd[1]: kamailio.service: Failed with result 'exit-code'.
Jan 21 08:13:42 MobileValue-Kamailio systemd[1]: Failed to start Kamailio (OpenSER) - the Open Source SIP Server.

I can get around the problem, by making the kamailio & kamailioro user use mysql_native_password instead.

But am i wrong to belieave that it should Work out of the box?

Here are the installed packages from APT:
kamailio/unknown,now 5.4.3+bpo10 amd64 [installed]
kamailio-json-modules/unknown,now 5.4.3+bpo10 amd64 [installed]
kamailio-mysql-modules/unknown,now 5.4.3+bpo10 amd64 [installed]
kamailio-outbound-modules/unknown,now 5.4.3+bpo10 amd64 [installed]
default-libmysqlclient-dev/stable,now 1.0.5 amd64 [installed]
default-libmysqld-dev/stable,now 1.0.5 amd64 [installed]
libmariadb-dev/stable,now 1:10.3.27-0+deb10u1 amd64 [installed,automatic]
libmariadb-dev-compat/stable,now 1:10.3.27-0+deb10u1 amd64 [installed,automatic]
mysql-apt-config/unknown,now 0.8.16-1 all [installed]
mysql-client/unknown,now 8.0.23-1debian10 amd64 [installed,automatic]
mysql-common/unknown,now 8.0.23-1debian10 amd64 [installed,automatic]
mysql-community-client/unknown,now 8.0.23-1debian10 amd64 [installed,automatic]
mysql-community-client-core/unknown,now 8.0.23-1debian10 amd64 [installed,automatic]
mysql-community-client-plugins/unknown,now 8.0.23-1debian10 amd64 [installed,automatic]
mysql-community-server/unknown,now 8.0.23-1debian10 amd64 [installed,automatic]
mysql-community-server-core/unknown,now 8.0.23-1debian10 amd64 [installed,automatic]
mysql-server/unknown,now 8.0.23-1debian10 amd64 [installed]

Thanks in advance
Nicki Bo Otte

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210121/80a8eb9c/attachment.htm>


More information about the sr-dev mailing list