Hi,
What is the Kamailio version you are using?
Your issue looks like the one described in this issue:
https://github.com/kamailio/kamailio/issues/2461
If you cannot upgrade Kamailio to a fixed version, you could use Redis sentinel instead of
a Redis cluster.
Julien
De : sr-users <sr-users-bounces(a)lists.kamailio.org> au nom de Maharaja Azhagiah
<er.maharaja(a)gmail.com>
Répondre à : "sr-users-bounces(a)lists.kamailio.org"
<sr-users-bounces(a)lists.kamailio.org>
Date : mercredi 2 mars 2022 à 02:35
À : "sr-users(a)lists.kamailio.org" <sr-users(a)lists.kamailio.org>
Objet : [SR-Users] ndb_redis - redis-cluster error
Hi All,
I am new to Kamailio and testing location server using kamailio and redis-cluster.
My setup is simple: All SIP REGISTER messages will be forwarded to this location-server.
The server checks for AUTH and then needs to save the usrloc in redis-cluster.
I have hiredis and hiredis-cluster libraries installed
I am using ndb_redis to support redis-cluster with below configuration:
modparam("ndb_redis", "server",
"name=172.17.0.3:7000;addr=172.17.0.3;port=7000")
modparam("ndb_redis", "server",
"name=172.17.0.4:7001;addr=172.17.0.4;port=7001")
modparam("ndb_redis", "server",
"name=172.17.0.5:7002;addr=172.17.0.5;port=7002")
modparam("ndb_redis", "server",
"name=172.17.0.6:7003;addr=172.17.0.6;port=7003")
modparam("ndb_redis", "server",
"name=172.17.0.7:7004;addr=172.17.0.7;port=7004")
modparam("ndb_redis", "server",
"name=172.17.0.8:7005;addr=172.17.0.8;port=7005")
modparam("ndb_redis", "cluster", 1)
If SIP method is REGISTER, Kamailio sends redis_cmd to store as below:
redis_cmd("172.17.0.3:7000<http://172.17.0.3:7000>", "sadd %s
%s",
"location:usrdom::437780082:mazhagiah.sip.zang.io<http://mazhagiah.sip.zang.io>",
"location:entry::$xavp(ulrcd=>ruid)", "r");
However, redis-cluster replies with MOVED message, but kamailio / ndb_redis throughs error
as below:
0(3915) DEBUG: ndb_redis [redis_client.c:391]: redisc_get_server(): Hash 2590462363
(172.17.0.3:7000<http://172.17.0.3:7000>)
0(3915) DEBUG: ndb_redis [redis_client.c:395]: redisc_get_server(): Entry 2591109923
(172.17.0.8:7005<http://172.17.0.8:7005>)
0(3915) DEBUG: ndb_redis [redis_client.c:395]: redisc_get_server(): Entry 2590232843
(172.17.0.7:7004<http://172.17.0.7:7004>)
0(3915) DEBUG: ndb_redis [redis_client.c:395]: redisc_get_server(): Entry 2590175467
(172.17.0.6:7003<http://172.17.0.6:7003>)
0(3915) DEBUG: ndb_redis [redis_client.c:395]: redisc_get_server(): Entry 2590347603
(172.17.0.5:7002<http://172.17.0.5:7002>)
0(3915) DEBUG: ndb_redis [redis_client.c:395]: redisc_get_server(): Entry 2590290227
(172.17.0.4:7001<http://172.17.0.4:7001>)
0(3915) DEBUG: ndb_redis [redis_client.c:395]: redisc_get_server(): Entry 2590462363
(172.17.0.3:7000<http://172.17.0.3:7000>)
0(3915) DEBUG: ndb_redis [redis_client.c:896]: redisc_exec(): rsrv->ctxRedis =
0x558e4d739210
0(3915) DEBUG: ndb_redis [redis_client.c:903]: redisc_exec(): rsrv->ctxRedis =
0x558e4d739210
0(3915) DEBUG: ndb_redis [redis_client.c:957]: redisc_exec():
rpl->rplRedis->type:6
0(3915) ERROR: ndb_redis [redis_client.c:959]: redisc_exec(): Redis error:MOVED 10082
172.17.0.4:7001<http://172.17.0.4:7001>
0(3915) DEBUG: <core> [sruid.c:182]: sruid_next(): new sruid is
[uloc-621e8438-f4b-b] (11 / 19)
0(3915) DEBUG: registrar [save.c:410]: pack_ci(): generated ruid is:
uloc-621e8438-f4b-b
0(3915) DEBUG: <core> [sruid.c:182]: sruid_next(): new sruid is
[uloc-621e8438-f4b-c] (12 / 19)
Please help if I am missing anything with my configuration or library.
Thanks
Raja