Hello,
Kamailio after restart(or start) sometimes can't connect to redis (via haproxy) with logs:
Dec 6 07:29:31 siptest /usr/sbin/kamailio[47269]: ERROR: ndb_redis [redis_client.c:130]: redisc_init(): error communicating with redis server [redis] (
127.0.0.1:6380/0): Resource temporarily unavailable
Dec 6 07:29:31 siptest /usr/sbin/kamailio[47269]: ERROR: ndb_redis [ndb_redis_mod.c:122]: child_init(): failed to initialize redis connections
Dec 6 07:29:31 siptest /usr/sbin/kamailio[47269]: ERROR: <core> [core/sr_module.c:923]: init_mod_child(): Error while initializing module ndb_redis (/usr/lib64/kamailio/modules/ndb_redis.so)
Dec 6 07:29:31 siptest /usr/sbin/kamailio[47269]: ERROR: <core> [core/pt.c:334]: fork_process(): init_child failed for process 5, pid 47269, "udp receiver child=4 sock=
192.168.8.213:5060"
Dec 6 07:29:31 siptest /usr/sbin/kamailio[47269]: CRITICAL: <core> [main.c:1611]: main_loop(): Cannot fork
Dec 6 07:29:31 siptest /usr/sbin/kamailio[47252]: ALERT: <core> [main.c:740]: handle_sigs(): child process 47269 exited normally, status=255
Dec 6 07:29:31 siptest /usr/sbin/kamailio[47362]: CRITICAL: <core> [core/pass_fd.c:277]: receive_fd(): EOF on 13
Redis and haproxy working fine (I test it by many attepts - echo ping|ncat localhost 6380)
At tcpdump all attemps from kamailio have:
*1
$4
PING
+PONG
*2
$6
SELECT
$1
0
+OK
my kamailio 5.0.4 config:
modparam("ndb_redis", "server", "name=redis;addr=127.0.0.1;port=6380")
my haproxy 1.5 config:
backend bk_redis
mode tcp
option tcp-check
tcp-check connect
tcp-check send PING\r\n
tcp-check expect string +PONG
tcp-check send QUIT\r\n
tcp-check expect string +OK
--
Aydar A. Kamalov