[sr-dev] [kamailio/kamailio] tls mod cannot be loaded on Alpine Linux (#1188)
sergey-safarov
notifications at github.com
Fri Jul 21 23:10:04 CEST 2017
### Description
I want use kamailio on Alpine linux dist. All looks fine except tls module.
During config file checking i got errors
```
/ #
/ # vi /etc/kamailio/kamailio.cfg
/ # kamailio -c -f /etc/kamailio/kamailio.cfg
loading modules under config path: /usr/lib/kamailio/modules/
0(15) ERROR: <core> [core/sr_module.c:570]: load_module(): could not find module <mi_fifo> in </usr/lib/kamailio/modules/>
0(15) CRITICAL: <core> [core/cfg.y:3400]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 218, column 12-23: failed to load module
0(15) ERROR: <core> [core/sr_module.c:570]: load_module(): could not find module <mi_rpc> in </usr/lib/kamailio/modules/>
0(15) CRITICAL: <core> [core/cfg.y:3400]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 234, column 12-22: failed to load module
0(15) ERROR: <core> [core/sr_module.c:582]: load_module(): could not open module </usr/lib/kamailio/modules/tls.so>: Error relocating /usr/lib/kamailio/modules/tls.so: EC_KEY_new_by_curve_name: symbol not found
0(15) CRITICAL: <core> [core/cfg.y:3400]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 265, column 12-19: failed to load module
0(15) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No module matching <mi_fifo> found
0(15) CRITICAL: <core> [core/cfg.y:3403]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 285, column 67: Can't set module parameter
0(15) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No module matching <tls> found
0(15) CRITICAL: <core> [core/cfg.y:3403]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 411, column 50: Can't set module parameter
ERROR: bad config file (5 errors)
0(15) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
/ #
/ #
```
Error
load_module(): could not open module </usr/lib/kamailio/modules/tls.so>: Error relocating /usr/lib/kamailio/modules/tls.so: EC_KEY_new_by_curve_name: symbol not found
#### Reproduction
docker run -it alpine sh
apk --no-cache add alpine-sdk linux-headers bison flex libressl-dev
cd kamailio
sed -i -e 's/0x10100000L/0x10100000L || defined(LIBRESSL_VERSION_NUMBER)/' src/modules/tls/tls_locking.c
make include_modules="tls" cfg
make all
make install
sed -i '1s/^/#!define WITH_TLS\n/' /usr/local/etc/kamailio/kamailio.cfg
/usr/local/sbin/kamailio -c -f /usr/local/etc/kamailio/kamailio.cfg
#### Log Messages
```
@8bdc47c389e6:/usr/local/etc/kamailio$ /usr/local/sbin/kamailio -c -f /usr/local/etc/kamailio/kamailio.cfg
0(22421) ERROR: <core> [core/sr_module.c:582]: load_module(): could not open module </usr/local/lib64/kamailio/modules/tls.so>: Error relocating /usr/local/lib64/kamailio/modules/tls.so: SSL_CTX_set_min_proto_version: symbol not found
0(22421) CRITICAL: <core> [core/cfg.y:3426]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 276, column 12-19: failed to load module
0(22421) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No module matching <tls> found
0(22421) CRITICAL: <core> [core/cfg.y:3429]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 426, column 60: Can't set module parameter
ERROR: bad config file (2 errors)
0(22421) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
@8bdc47c389e6:/usr/local/etc/kamailio$ /usr/local/sbin/kamailio -v
version: kamailio 5.1.0-dev5 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, 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_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 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 on 20:55:58 Jul 21 2017 with gcc 6.2.1
@8bdc47c389e6:/usr/local/etc/kamailio$
```
* **Operating System**:
Alpine linux 3.6
```
@8bdc47c389e6:/usr/local/etc/kamailio$ uname -a
Linux 8bdc47c389e6 3.10.0-514.16.1.el7.x86_64 #1 SMP Wed Apr 12 15:04:24 UTC 2017 x86_64 Linux```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1188
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20170721/2fc564e4/attachment.html>
More information about the sr-dev
mailing list