I installed Flexisip using official documentation , installed additional components like MariaDB (MySQL) and Redis, performed initial setup of configuration files, created database and DB user.
I started flexisip services with
1 |
systemctl start flexisip-proxy flexisip-presence flexisip-conference |
and by looking in /var/opt/belledonne-communications/log/flexisip/flexisip-conference.log
I noticed the following error:
1 2 3 4 5 6 |
2020-02-02 03:12:30:790 liblinphone-message-Linphone core [0x56197d8a7d60] notified [global_state_changed] 2020-02-02 03:12:30:790 liblinphone-message-No charset defined forcing utf8 4 bytes specially for conference subjet storage 2020-02-02 03:12:30:790 liblinphone-message-Opening linphone database db=xxx user=xxx password='xxx' host=127.0.0.1 charset=utf8mb4 with backend Mysql 2020-02-02 03:12:30:791 liblinphone-warning-Unable to build db session with uri: Failed to find shared library for backend mysql 2020-02-02 03:12:30:791 liblinphone-error-Unable to open linphone database with uri db=xxx user=xxx password='xxx!' host=127.0.0.1 charset=utf8mb4 and backend Mysql 2020-02-02 03:12:30:791 bctbx-error-Linphone Core couldn't start because the connection to the database has failed |
What I tried:
1) Installed libsoci-mysql3.2
package:
1 |
# apt install libsoci-mysql3.2 |
(there is no libsoci-mysql4.0
package available for Debian 9 at the moment)
2) Restarted flexisip-conference service and got the same error
3) ~ 3 hours of digging in /usr/lib/ , checked each and every library dependency, made soft links like
1 |
ln -s /usr/lib/x86_64-linux-gnu/libsoci_mysql.so.3.2.3 /usr/lib/libsoci_mysql.so |
and so on but nothing helped
4) Launched
1 |
ldd /opt/belledonne-communications/bin/flexisip |
and found the following line:
1 2 3 |
[...] libsoci_core.so.4.0 => /opt/belledonne-communications/lib/libsoci_core.so.4.0 (0x00007f7f40f2f000) [...] |
FlexiSip comes bundled with Libsoci core library (libsoci_core.so.4.0) but without backend libraries and libsoci_core.so.4.0 looks for backend extensions libsoci_{backend}.so.{version} at the same path where it resides!
5) Copied :
1 |
cp /usr/lib/x86_64-linux-gnu/libsoci_mysql.so.3.2.3 /opt/belledonne-communications/lib/libsoci_mysql.so.3.2.3 |
and renamed:
1 |
mv /opt/belledonne-communications/lib/libsoci_mysql.so.3.2.3 /opt/belledonne-communications/lib/libsoci_mysql.so.4.0 |
6) Restarted Flexisip conference:
1 |
systemctl restart flexisip-conference |
7) Checked the log (debug level enabled already):
1 2 3 4 5 |
tail /var/opt/belledonne-communications/log/flexisip/flexisip-conference.log [...] 2020-02-02 03:50:44:882 liblinphone-message-Linphone core [0x55f3db3c9d40] notified [global_state_changed] 2020-02-02 03:50:44:882 liblinphone-message-No charset defined forcing utf8 4 bytes specially for conference subjet storage 2020-02-02 03:50:44:882 liblinphone-message-Opening linphone database db=flexisip user=xxxxx password='xxxxxxxx' host=127.0.0.1 charset=utf8mb4 with backend Mysql |
The error is gone!
Check my guide on Flexisip installation and configuration on Debian 9 !
Good luck!