There is no problems without haproxy. And haproxy no problems without
kamailio :)
I used tcpdump (can't attach here) to dump port 6380, so kamailio should
connect to haproxy, because it send ping and receive pong.
2017-12-06 11:06 GMT+03:00 Юрий Горличенко <gorlichenko_uv(a)inbox.ru>ru>:
Hi try first to use single redis for make sure that it
is not a ha proxy
trouble.
If error still exists - try to collect debug information.
Среда, 6 декабря 2017, 10:53 +03:00 от Aidar Kamalov <
aidar.kamalov(a)gmail.com>gt;:
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(a)192.168.150.225
<https://e.mail.ru/compose/?mailto=mailto%3a764c076919c73540%2d39925@192.168.150.225>
]
Dec 6 07:29:31 siptest /usr/sbin/kamailio[47263]: NOTICE: <script>: ROOT:
OPTIONS <null> [0b4dc11225a6fc77294de97578061844@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
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Aydar A. Kamalov