sergey-safarov created an issue (kamailio/kamailio#4810)
### Description
When kamailio installed to folder other then `/usr/local`, then required adjust
`tls.cfg`.
Example when use rpm packaging, then config local in `/etc/kamailio` folder but
tls.cfg still use `/usr/local`.
```sh
root@nout:/etc/kamailio# kamailio -D -E /etc/kamailio/kamailio.cfg
Listening on
udp: 192.168.0.62:5060
tcp: 192.168.0.62:5060
Aliases:
tcp: testy.localdomain:5060
udp: testy.localdomain:5060
WARNING: no fork mode
0(156721) INFO: <core> [core/tcp_main.c:5316]: init_tcp(): using epoll_lt as
the io watch method (auto detected)
0(156721) INFO: <core> [main.c:3335]: main(): current open file limits
[soft/hard]: [1024/524288]
0(156721) ERROR: tls [tls_config.c:439]: tls_load_config(): cannot stat config
file /usr/local/etc/kamailio/tls.cfg
0(156721) ERROR: <core> [core/sr_module.c:1053]: init_mod(): Error while
initializing module tls (/usr/lib64/kamailio/modules/tls.so)
ERROR: error while initializing modules
0(156721) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API
not initialized
```
### Troubleshooting
N/A
#### Reproduction
Install rpm packaged Kamailio.
Enable `WITH_TLS`.
Start using command
```sh
kamailio -D -E /etc/kamailio/kamailio.cfg
```
#### Debugging Data
N/A
#### Log Messages
```
root@nout:/etc/kamailio# kamailio -D -E /etc/kamailio/kamailio.cfg
Listening on
udp: 192.168.0.62:5060
tcp: 192.168.0.62:5060
Aliases:
tcp: testy.localdomain:5060
udp: testy.localdomain:5060
WARNING: no fork mode
0(156721) INFO: <core> [core/tcp_main.c:5316]: init_tcp(): using epoll_lt as
the io watch method (auto detected)
0(156721) INFO: <core> [main.c:3335]: main(): current open file limits
[soft/hard]: [1024/524288]
0(156721) ERROR: tls [tls_config.c:439]: tls_load_config(): cannot stat config
file /usr/local/etc/kamailio/tls.cfg
0(156721) ERROR: <core> [core/sr_module.c:1053]: init_mod(): Error while
initializing module tls (/usr/lib64/kamailio/modules/tls.so)
ERROR: error while initializing modules
0(156721) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API
not initialized
```
#### SIP Traffic
N/A
### Possible Solutions
Exec `sed` like
```sh
sed -e "s|/usr/local/etc/kamailio|${new_path}|" /etc/kamailio/tls.cfg
```
### Additional Information
- [ ] LLM/AI Assistants were involved in discovery, analysis or submission of
the issue
- [ ] It happened in a production deployment
- [ ] It happened in a testing or development deployment
- [ ] Testing or fuzzing tools were used to generate SIP traffic when it
happened
* **Kamailio Version** - output of `kamailio -v`
```
root@nout:/etc/kamailio# kamailio -v
version: kamailio 6.1.3 (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, MEM_JOIN_FREE, Q_MALLOC,
F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, DBG_QM_MALLOC, DBG_F_MALLOC,
DBG_TLSF_MALLOC, USE_FUTEX, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_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 on 00:00:00 Sep 13 2022 with gcc 15.2.1
```
* **Operating System**:
```
root@nout:/etc/kamailio# cat /etc/os-release
NAME="Fedora Linux"
VERSION="43 (Workstation Edition)"
RELEASE_TYPE=stable
ID=fedora
VERSION_ID=43
VERSION_CODENAME=""
PRETTY_NAME="Fedora Linux 43 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:43"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f43/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=43
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=43
SUPPORT_END=2026-12-02
VARIANT="Workstation Edition"
VARIANT_ID=workstation
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4810
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/[email protected]>_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the
sender!