Re: ndb_redis behavior

John Petrini via sr-users <[email protected]>
Newsgroups gmane.comp.voip.ser
Message-ID <BYAPR11MB29672BEB41A4C2B119972CECD1EFA@BYAPR11MB2967.namprd11.prod.outlook.com>
I encountered the same issue, I'm not sure if it's a bug or if I made a mistake somewhere but we opted to just keep sending auth with each request as that's what we've been doing for years anyway.

      redis_cmd("write", "AUTH REDIS_PASS", "r");
      redis_cmd("write", "SET %s %s", "$fU", "$avp(an_avp)", "r");

Another option is to use a unix socket if the db is local.
________________________________
From: Володимир Іванець via sr-users <[email protected]>
Sent: Friday, October 10, 2025 9:03 AM
To: Kamailio (SER) - Users Mailing List <[email protected]>
Cc: Володимир Іванець <[email protected]>
Subject: [SR-Users] Re: ndb_redis behavior


CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Kamailio version is 6.0.2.

Thank you!

пт, 10 жовт. 2025 р. о 15:55 Володимир Іванець <[email protected]<mailto:[email protected]>> пише:
Hello everyone!

Can someone please tell if this is expected behavior and I should remove authentication?

I have a Redis cluster with authentication enabled. Kamailio configuration is as follows:
modparam("ndb_redis", "server", "name=redis-cluster;addr=redis-redis-cluster;port=6379;pass=mypassword")
modparam("ndb_redis", "init_without_redis", 1)
modparam("ndb_redis", "connect_timeout", 1000)
modparam("ndb_redis", "cmd_timeout", 1000)
modparam("ndb_redis", "cluster", 1)
modparam("ndb_redis", "allow_dynamic_nodes", 1)
modparam("ndb_redis", "flush_on_reconnect", 0)

Kamailio stops request to Redis with "NOAUTH Authentication required" error when it tries to execute redis_cmd("redis-cluster", "HGET cnf:accounts:$AU password", "r");
 4(1630) DEBUG: ndb_redis [redis_client.c:439]: redisc_get_server(): Hash 1969359015 (redis-cluster)
 4(1630) DEBUG: ndb_redis [redis_client.c:442]: redisc_get_server(): Entry 1969359015 (redis-cluster)
 4(1630) DEBUG: ndb_redis [redis_client.c:446]: redisc_get_server(): Using entry 1969359015 (redis-cluster)
 4(1630) DEBUG: ndb_redis [redis_client.c:1033]: redisc_exec(): rsrv->ctxRedis = 0x55563cd13c30
 4(1630) DEBUG: ndb_redis [redis_client.c:1039]: redisc_exec(): rsrv->ctxRedis = 0x55563cd13c30
 4(1630) DEBUG: ndb_redis [redis_client.c:898]: check_cluster_reply(): Redis replied: "MOVED 1875 10.42.0.36:6379<https://urldefense.com/v3/__http://10.42.0.36:6379__;!!KWzduNI!aTVDOqq2zrpUtoBQ5lO840-dzwocBaaPLOLLm0U57XyJIgNfAGvrJZDGKtar-aOCXi2CJ-HvBb2ssz2s6bSbIgEm$>"
 4(1630) DEBUG: ndb_redis [redis_client.c:906]: check_cluster_reply(): Port "6379" [4] => 6379
 4(1630) DEBUG: ndb_redis [redis_client.c:916]: check_cluster_reply(): Host "10.42.0.36" [10]
 4(1630) DEBUG: ndb_redis [redis_client.c:927]: check_cluster_reply(): Name of new connection: 10.42.0.36:6379<https://urldefense.com/v3/__http://10.42.0.36:6379__;!!KWzduNI!aTVDOqq2zrpUtoBQ5lO840-dzwocBaaPLOLLm0U57XyJIgNfAGvrJZDGKtar-aOCXi2CJ-HvBb2ssz2s6bSbIgEm$>
 4(1630) DEBUG: ndb_redis [redis_client.c:439]: redisc_get_server(): Hash 2703334398 (10.42.0.36:6379<https://urldefense.com/v3/__http://10.42.0.36:6379__;!!KWzduNI!aTVDOqq2zrpUtoBQ5lO840-dzwocBaaPLOLLm0U57XyJIgNfAGvrJZDGKtar-aOCXi2CJ-HvBb2ssz2s6bSbIgEm$>)
 4(1630) DEBUG: ndb_redis [redis_client.c:442]: redisc_get_server(): Entry 1969359015 (redis-cluster)
 4(1630) DEBUG: ndb_redis [redis_client.c:452]: redisc_get_server(): No entry found.
 4(1630) DEBUG: ndb_redis [redis_client.c:439]: redisc_get_server(): Hash 2703334398 (10.42.0.36:6379<https://urldefense.com/v3/__http://10.42.0.36:6379__;!!KWzduNI!aTVDOqq2zrpUtoBQ5lO840-dzwocBaaPLOLLm0U57XyJIgNfAGvrJZDGKtar-aOCXi2CJ-HvBb2ssz2s6bSbIgEm$>)
 4(1630) DEBUG: ndb_redis [redis_client.c:442]: redisc_get_server(): Entry 2703334398 (10.42.0.36:6379<https://urldefense.com/v3/__http://10.42.0.36:6379__;!!KWzduNI!aTVDOqq2zrpUtoBQ5lO840-dzwocBaaPLOLLm0U57XyJIgNfAGvrJZDGKtar-aOCXi2CJ-HvBb2ssz2s6bSbIgEm$>)
 4(1630) DEBUG: ndb_redis [redis_client.c:446]: redisc_get_server(): Using entry 2703334398 (10.42.0.36:6379<https://urldefense.com/v3/__http://10.42.0.36:6379__;!!KWzduNI!aTVDOqq2zrpUtoBQ5lO840-dzwocBaaPLOLLm0U57XyJIgNfAGvrJZDGKtar-aOCXi2CJ-HvBb2ssz2s6bSbIgEm$>)
 4(1630) DEBUG: ndb_redis [redis_client.c:595]: redisc_reconnect_server(): rsrv->ctxRedis = (nil)
 4(1630) DEBUG: ndb_redis [redis_client.c:628]: redisc_reconnect_server(): rsrv->ctxRedis = 0x55563cd1bce0
 4(1630) DEBUG: ndb_redis [redis_client.c:969]: check_cluster_reply(): Connected to the new server with name: 10.42.0.36:6379<https://urldefense.com/v3/__http://10.42.0.36:6379__;!!KWzduNI!aTVDOqq2zrpUtoBQ5lO840-dzwocBaaPLOLLm0U57XyJIgNfAGvrJZDGKtar-aOCXi2CJ-HvBb2ssz2s6bSbIgEm$>
 4(1630) DEBUG: ndb_redis [redis_client.c:1084]: redisc_exec(): rsrv->ctxRedis = 0x55563cd1bce0
 4(1630) DEBUG: ndb_redis [redis_client.c:1090]: redisc_exec(): rsrv->ctxRedis = 0x55563cd1bce0
 4(1630) DEBUG: ndb_redis [redis_client.c:1118]: redisc_exec(): rpl->rplRedis->type:6
 4(1630) ERROR: ndb_redis [redis_client.c:1120]: redisc_exec(): Redis error:NOAUTH Authentication required.

Thank you!

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.