[SR-Users] NDB_REDIS password to REDIS remote DB

Marc Soda msoda at coredial.com
Fri Jan 30 14:46:27 CET 2015


Thanks for the insight.  I ended up doing something like this:

redis_cmd("localredis", "AUTH REDIS_PASS", "r");

if ($redis(r=>type) == REDIS_REPLY_ERROR) {
    xlog("L_ERROR", "Redis authentication error");
    exit;
}

I think the confusion came from the fact that you do not specify the
password in the modparam() connection string, as you do with other DB
modules.  Maybe calling something like this out in the documentation would
help clear that up.

On Thu, Jan 29, 2015 at 3:48 PM, Marc Soda <msoda at coredial.com> wrote:

> Ah, so you should be able to do something like:
>
> redis_cmd("localredis", "AUTH $var(redis_password)");
>
> Nice.  I will try that and post my results.
>
> On Thu, Jan 29, 2015 at 1:28 PM, Daniel-Constantin Mierla <
> miconda at gmail.com> wrote:
>
>>  Hello,
>>
>> it appears that hiredis library does the authentication after connecting
>> and can be done from config -- that's on a very quick search, not sure if
>> something has changed with the hiredis api meanwhile:
>>
>>  - https://github.com/redis/hiredis/issues/56
>>
>> Cheers,
>> Daniel
>>
>>
>> On 29/01/15 17:20, Marc Soda wrote:
>>
>> The only way it will work right now is to not use a password:
>>
>> modparam("ndb_redis", "server",
>> "name=localredis;addr=localhost;port=6379")
>>
>> I've been wanting to look at contributing support at that, but no time...
>>  On Thu, Jan 29, 2015 at 10:16 AM, Yuriy Gorlichenko <ovoshlook at gmail.com
>> > wrote:
>>
>>> Hello. I try to use NDB_REDIS with remote REDIS DB and can not to
>>> connect because remote DB use password, but Kamailio module have no any
>>> variable or attr of modparam that implenets password for DB.
>>>
>>> How I can connect to my REDIS?
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> --
>> Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150130/f3e23d34/attachment.html>


More information about the sr-users mailing list