Hi Alex,
I have just download latest master version of kamailio, created a
minimal kam.cfg file for ndb_redis module, and launch kamailio without
any redis server available.
kam.cfg file:
#!KAMAILIO
debug=4
log_stderror=yes
children=4
fork=yes
#disable_tcp=yes
mpath="modules/"
loadmodule "ndb_redis.so"
# An already configured redis server is needed here
modparam("ndb_redis", "server",
"name=srv1;addr=127.0.0.1;port=6379;db=0")
request_route {
exit;
}
$ ./kamailio -f kam.cfg
And I cannot reproduce the error.
...
0(12132) INFO: <core> [tcp_main.c:4745]: init_tcp(): using epoll_lt as
the io watch method (auto detected)
...
7(12141) DEBUG: <core> [sr_module.c:920]: init_mod_child(): DEBUG:
init_mod_child (7): ndb_redis
4(12138) DEBUG: <core> [sr_module.c:920]: init_mod_child(): DEBUG:
init_mod_child (4): ndb_redis
4(12138) ERROR: ndb_redis [redis_client.c:112]: redisc_init(): error
communicating with redis server [srv1] (127.0.0.1:6379/0): Connection
refused
4(12138) ERROR: ndb_redis [ndb_redis_mod.c:116]: child_init(): failed
to initialize redis connections
4(12138) ERROR: <core> [sr_module.c:923]: init_mod_child(): Error
while initializing module ndb_redis (modules/ndb_redis/ndb_redis.so)
4(12138) ERROR: <core> [pt.c:341]: fork_process(): init_child failed
for process 4, pid 12138, "udp receiver child=3 sock=127.0.0.1:5060"
4(12138) CRITICAL: <core> [main.c:1624]: main_loop(): Cannot fork
1(12135) DEBUG: <core> [sr_module.c:920]: init_mod_child(): DEBUG:
init_mod_child (1): ndb_redis
17(12151) ERROR: ndb_redis [redis_client.c:112]: redisc_init(): error
communicating with redis server [srv1] (127.0.0.1:6379/0): Connection
refused
17(12151) ERROR: ndb_redis [ndb_redis_mod.c:116]: child_init(): failed
to initialize redis connections
17(12151) ERROR: <core> [sr_module.c:923]: init_mod_child(): Error while
initializing module ndb_redis (modules/ndb_redis/ndb_redis.so)
17(12151) ERROR: <core> [pt.c:479]: fork_tcp_process(): init_child
failed for process 17, pid 12151, "tcp receiver (generic) child=2"
17(12151) ERROR: <core> [tcp_main.c:4868]: tcp_init_children(): fork
failed: Connection refused
5(12139) ERROR: ndb_redis [redis_client.c:112]: redisc_init(): error
communicating with redis server [srv1] (127.0.0.1:6379/0): Connection
refused
7(12141) ERROR: ndb_redis [redis_client.c:112]: redisc_init(): error
communicating with redis server [srv1] (127.0.0.1:6379/0): Connection
refused
5(12139) ERROR: ndb_redis [ndb_redis_mod.c:116]: child_init(): failed
to initialize redis connections
5(12139) ERROR: <core> [sr_module.c:923]: init_mod_child(): Error
while initializing module ndb_redis (modules/ndb_redis/ndb_redis.so)
7(12141) ERROR: ndb_redis [ndb_redis_mod.c:116]: child_init(): failed
to initialize redis connections
7(12141) ERROR: <core> [sr_module.c:923]: init_mod_child(): Error
while initializing module ndb_redis (modules/ndb_redis/ndb_redis.so)
...
It fails as it should with "Connection refused"
Could you give me more information?
Thanks,
Vicente.
On 11/12/2014 02:52 AM, Alex Balashov wrote:
PS. The same effect can be achieved by binding a TCP
service other
than Redis to the port Kamailio expects Redis to be on (e.g. 6379).
On 11/11/2014 08:38 PM, Alex Balashov wrote:
If I kill my Redis server and boot Kamailio with
an ndb_redis
configuration to connect to Redis via TCP, I get an infinite loop of:
Nov 11 20:37:00 centosity6 /usr/local/sbin/kamailio[1892]: ERROR: <core>
[io_wait.h:1048]: io_wait_loop_epoll(): epoll_wait(29, 0x7fe025ea06f8,
0, 5000): Invalid argument [22]
Nov 11 20:37:00 centosity6 /usr/local/sbin/kamailio[1892]: ERROR: <core>
[io_wait.h:1048]: io_wait_loop_epoll(): epoll_wait(29, 0x7fe025ea06f8,
0, 5000): Invalid argument [22]
Nov 11 20:37:00 centosity6 /usr/local/sbin/kamailio[1892]: ERROR: <core>
[io_wait.h:1048]: io_wait_loop_epoll(): epoll_wait(29, 0x7fe025ea06f8,
0, 5000): Invalid argument [22]
Nov 11 20:37:00 centosity6 /usr/local/sbin/kamailio[1892]: ERROR: <core>
[io_wait.h:1048]: io_wait_loop_epoll(): epoll_wait(29, 0x7fe025ea06f8,
0, 5000): Invalid argument [22]
Nov 11 20:37:00 centosity6 /usr/local/sbin/kamailio[1892]: ERROR: <core>
[io_wait.h:1048]: io_wait_loop_epoll(): epoll_wait(29, 0x7fe025ea06f8,
0, 5000): Invalid argument [22]
Nov 11 20:37:00 centosity6 /usr/local/sbin/kamailio[1892]: ERROR: <core>
[io_wait.h:1048]: io_wait_loop_epoll(): epoll_wait(29, 0x7fe025ea06f8,
0, 5000): Invalid argument [22]
Nov 11 20:37:00 centosity6 /usr/local/sbin/kamailio[1892]: ERROR: <core>
[io_wait.h:1048]: io_wait_loop_epoll(): epoll_wait(29, 0x7fe025ea06f8,
0, 5000): Invalid argument [22]
Nov 11 20:37:00 centosity6 /usr/local/sbin/kamailio[1892]: ERROR: <core>
[io_wait.h:1048]: io_wait_loop_epoll(): epoll_wait(29, 0x7fe025ea06f8,
0, 5000): Invalid argument [22]
Nov 11 20:37:00 centosity6 /usr/local/sbin/kamailio[1892]: ERROR: <core>
[io_wait.h:1048]: io_wait_loop_epoll(): epoll_wait(29, 0x7fe025ea06f8,
0, 5000): Invalid argument [22]
[...]
<ad infinitum/nauseum/full filesystem>
-- Alex