[SR-Users] redis via haproxy
Aidar Kamalov
aidar.kamalov at gmail.com
Wed Dec 6 08:50:39 CET 2017
Hello,
Kamailio after restart(or start) sometimes can't connect to redis (via
haproxy) with logs:
Dec 6 07:29:30 siptest /usr/sbin/kamailio[47291]: NOTICE: <script>: ROOT:
KDMQ usrloc [764c076919c73540-39925 at 192.168.150.225]
Dec 6 07:29:31 siptest /usr/sbin/kamailio[47263]: NOTICE: <script>: ROOT:
OPTIONS <null> [0b4dc11225a6fc77294de97578061844 at 192.168.150.231:5060]
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
server sipkazan 192.168.107.195:6379 check inter 1s
server local 127.0.0.1:6379 check inter 1s backup
--
Aydar A. Kamalov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20171206/0398c93b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fail.pcap
Type: application/vnd.tcpdump.pcap
Size: 25997 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20171206/0398c93b/attachment.pcap>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: success.pcap
Type: application/vnd.tcpdump.pcap
Size: 25875 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20171206/0398c93b/attachment-0001.pcap>
More information about the sr-users
mailing list