Hi, I am running docker with this:
https://hub.docker.com/layers/kamailio/kamailio/5.4.3-trusty/images/sha256-cff154ee955e828dc00021531e0d0a7d1794939c9bdd785aa7ee0f1ce63e3dc2?context=explore
and
https://hub.docker.com/layers/mysql/library/mysql/8.0.23/images/sha256-870892ea5cc8c623b389717c2eedd58248c82a8569d7601ede62a63d527641bd?context=explore
I made some configurations in Kamailio:
/etc/default/kamailio
RUN_KAMAILIO=yes
USER=kamailio
GROUP=kamailio
CFGFILE=/etc/kamailio/kamailio.cfg
DUMP_CORE=yes

/etc/kamailio/kamailio.cfg
#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_USRLOCDB

/etc/kamailio/kamctlrc
SIP_DOMAIN=kamailio.org
DBENGINE=MYSQL
DBHOST=172.19.0.3
DBPORT=3306
DBNAME=kamailio
DBRWUSER="kamailio"
DBRWPW="kamailiorw"
DBROUSER="kamailioro"
DBROPW="kamailioro"
DBACCESSHOST=172.19.0.5
DBROOTUSER="root"
DBROOTPW="negro"
CHARSET="latin1"
USERCOL="user"

Then I run creation of database:
/usr/sbin/kamdbctl create
All was ok so I can see in database:
+------------------+------------+-----------------------+
| user | host | plugin |
+------------------+------------+-----------------------+
| root | % | mysql_native_password |
| kamailio | 172.19.0.3 | mysql_native_password |
| kamailioro | 172.19.0.3 | mysql_native_password |
| kamailio | 172.19.0.5 | mysql_native_password |
| kamailioro | 172.19.0.5 | mysql_native_password |
| kamailio | localhost | mysql_native_password |
| kamailioro | localhost | mysql_native_password |
| mysql.infoschema | localhost | caching_sha2_password |
| mysql.session | localhost | caching_sha2_password |
| mysql.sys | localhost | caching_sha2_password |
| root | localhost | mysql_native_password |
+------------------+------------+-----------------------+

At this point, if I try to restart kamailio i got an error and container never go up again, I have to delete it and restart the installation and configuration process with this log:
ON RESTART KAMAILIO FROM CONTAINER CONSOLE:
Listening on

udp: 127.0.0.1:5060

udp: 172.17.0.4:5060

tcp: 127.0.0.1:5060

tcp: 172.17.0.4:5060

Aliases:

tcp: mykamailio:5060

tcp: localhost:5060

udp: mykamailio:5060

udp: localhost:5060

0(1) INFO: [core/tcp_main.c:4984]: init_tcp(): using epoll_lt as the io watch method (auto detected)

0(1) INFO: rr [../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe module is not loaded

0(1) INFO: rr [rr_mod.c:185]: mod_init(): outbound module not available

0(1) INFO: [main.c:2834]: main(): processes (at least): 33 - shm size: 67108864 - pkg size: 8388608

0(1) INFO: [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992

0(1) INFO: [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984

0(1) INFO: [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992

0(1) INFO: [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984

21(28) INFO: jsonrpcs [jsonrpcs_sock.c:443]: jsonrpc_dgram_process(): a new child 0/28

23(30) INFO: ctl [io_listener.c:214]: io_listen_loop(): io_listen_loop: using epoll_lt io watch method (config)

0(1) ALERT: [main.c:774]: handle_sigs(): child process 205 exited normally, status=255

0(1) INFO: [main.c:802]: handle_sigs(): terminating due to SIGCHLD

2(9) INFO: [main.c:857]: sig_usr(): signal 15 received

1(8) INFO: [main.c:857]: sig_usr(): signal 15 received

3(10) INFO: [main.c:857]: sig_usr(): signal 15 received

4(11) INFO: [main.c:857]: sig_usr(): signal 15 received

6(13) INFO: [main.c:857]: sig_usr(): signal 15 received

5(12) INFO: [main.c:857]: sig_usr(): signal 15 received

7(14) INFO: [main.c:857]: sig_usr(): signal 15 received

10(17) INFO: [main.c:857]: sig_usr(): signal 15 received

12(19) INFO: [main.c:857]: sig_usr(): signal 15 received

14(21) INFO: [main.c:857]: sig_usr(): signal 15 received

29(36) INFO: [main.c:857]: sig_usr(): signal 15 received

24(31) INFO: [main.c:857]: sig_usr(): signal 15 received

28(35) INFO: [main.c:857]: sig_usr(): signal 15 received

15(22) INFO: [main.c:857]: sig_usr(): signal 15 received

19(26) INFO: [main.c:857]: sig_usr(): signal 15 received

13(20) INFO: [main.c:857]: sig_usr(): signal 15 received

17(24) INFO: [main.c:857]: sig_usr(): signal 15 received

8(15) INFO: [main.c:857]: sig_usr(): signal 15 received

23(30) INFO: [main.c:857]: sig_usr(): signal 15 received

22(29) INFO: [main.c:857]: sig_usr(): signal 15 received

21(28) INFO: [main.c:857]: sig_usr(): signal 15 received

26(33) INFO: [main.c:857]: sig_usr(): signal 15 received

20(27) INFO: [main.c:857]: sig_usr(): signal 15 received

31(38) INFO: [main.c:857]: sig_usr(): signal 15 received

32(39) INFO: [main.c:857]: sig_usr(): signal 15 received

9(16) INFO: [main.c:857]: sig_usr(): signal 15 received

30(37) INFO: [main.c:857]: sig_usr(): signal 15 received

11(18) INFO: [main.c:857]: sig_usr(): signal 15 received

16(23) INFO: [main.c:857]: sig_usr(): signal 15 received

27(34) INFO: [main.c:857]: sig_usr(): signal 15 received

18(25) INFO: [main.c:857]: sig_usr(): signal 15 received

25(32) INFO: [main.c:857]: sig_usr(): signal 15 received

0(1) ERROR: ctl [ctl.c:390]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: No such file or directory (2)

0(1) INFO: [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized

SO CONTAINER WAS DOWN, AND THEN IF I TRY TO START CONTAINER AGAIN:
Listening on

udp: 127.0.0.1:5060

udp: 172.17.0.4:5060

udp: 172.19.0.5:5060

tcp: 127.0.0.1:5060

tcp: 172.17.0.4:5060

tcp: 172.19.0.5:5060

Aliases:

tcp: mykamailio:5060

tcp: localhost:5060

udp: mykamailio:5060

udp: localhost:5060

0(1) INFO: [core/tcp_main.c:4984]: init_tcp(): using epoll_lt as the io watch method (auto detected)

0(1) INFO: rr [../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe module is not loaded

0(1) INFO: rr [rr_mod.c:185]: mod_init(): outbound module not available

0(1) INFO: auth [auth_mod.c:346]: mod_init(): qop set, but nonce-count (nonce_count) support disabled

0(1) INFO: [main.c:2834]: main(): processes (at least): 41 - shm size: 67108864 - pkg size: 8388608

0(1) ERROR: db_mysql [km_my_con.c:163]: db_mysql_new_connection(): driver error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

0(1) ERROR: [db.c:319]: db_do_init2(): could not add connection to the pool

0(1) ERROR: usrloc [dlist.c:852]: register_udomain(): failed to open database connection

0(1) ERROR: registrar [registrar.c:711]: domain_fixup(): failed to register domain

0(1) ERROR: [core/route.c:1167]: fix_actions(): fixing failed (code=-1) at cfg:/etc/kamailio/kamailio.cfg:698

0(1) ERROR: [core/rvalue.c:3869]: fix_rval_expr(): failure in cfg at line: 698 col: 22

0(1) ERROR: [core/rvalue.c:3869]: fix_rval_expr(): failure in cfg at line: 698 col: 22

0(1) ERROR: [core/route.c:1167]: fix_actions(): fixing failed (code=-1) at cfg:/etc/kamailio/kamailio.cfg:701

error -1 while trying to fix configuration

0(1) INFO: [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized

SO NO WAY TO GET IT UP.

Any idea on what is the problem here? I tried giving permissions to some folders in Kamailio docker container:
chown kamailio:kamailio /usr/sbin/kam*
chmod 755 /usr/sbin/kam*
chown -R kamailio:kamailio /etc/kamailio
chmod -R 755 /etc/kamailio

chown -R root:kamailio /var/run
chmod -R 755 /var/run

chown -R kamailio:kamailio /run/kamailio
chown -R 755 /run/kamailio

But had no effect...
thank you in advance.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.