[OpenSIPS-Users] Using Redis as database for uac_registrant module

Sasmita Panda spanda at 3clogic.com
Fri Sep 11 08:49:28 CEST 2015


Bogdan-Andrei Iancu <bogdan at ...> writes:

> 
> First I missed the PS :).
> 
> Thanks for that, I will keep an eye on the osipsdagram to see how it 
goes !
> 
> Regards,
> 
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
> 
> On 10.07.2014 12:59, Dan Christian Bogos wrote:
> > Hey Bogdan,
> >
> > I will use mongodb for my proof of concept for now. Unfortunately in 
> > the environment I plan using registrant the only option would be 
> > redis, so no option for me but patiently wait for your enhancements 
:).
> >
> > Thanks again, appreciated!
> > DanB
> >
> > PS: In exchange, I give you osipsdagram, a connector to OpenSIPS 
> > mi_datagram and event handler server in Go language, which will grow 
> > over next 2 weeks here:
> > https://github.com/cgrates/osipsdagram ;)
> >
> >
> > On 10.07.2014 11:45, Bogdan-Andrei Iancu wrote:
> >> Hi Dan,
> >>
> >> I'm afraid I put you on some wrong tracks - indeed, the REDIS 
module 
> >> lacks some functionality in order to be used via db_cachedb module 
:( 
> >> - my fault, I should have checked the code.
> >>
> >> Options:
> >>     - we can look in preparing the REDIS module for db_cachedb, but 
> >> this will be somewhere next week ;
> >>     - try to use the only noSQL module that work with db_cachedb - 
> >> mongodb. you can do preliminary tests with it, while we enable the 
> >> other modules.
> >>
> >> Regards,
> >>
> >> Bogdan-Andrei Iancu
> >> OpenSIPS Founder and Developer
> >> http://www.opensips-solutions.com
> >>
> >> On 10.07.2014 10:37, Dan Christian Bogos wrote:
> >>> Hey Bogdan,
> >>>
> >>> As discussed, I am trying to use redis behind db_cachedb module 
for 
> >>> uac_registrant to be able to fetch data out of no-sql db. So far I 
> >>> have implemented just the initial configuration since I could not 
> >>> pass initialization (not sure if that is a good sign though ;) ).
> >>>
> >>>
> >>> Here is what I got in syslog:
> >>> """
> >>> Jul 10 09:27:56 SimwoodDev /usr/sbin/opensips[3310]: 
> >>> ERROR:db_cachedb:db_cachedb_query: The selected NoSQL driver 
cannot 
> >>> convert select queries
> >>> Jul 10 09:27:56 SimwoodDev /usr/sbin/opensips[3310]: 
> >>> ERROR:core:db_table_version: error in db_query
> >>> Jul 10 09:27:56 SimwoodDev /usr/sbin/opensips[3310]: 
> >>> ERROR:core:db_check_table_version: querying version for table 
> >>> registrant
> >>> """
> >>>
> >>> And here is a digest of my config:
> >>> """
> >>> ...
> >>> #### Redis module
> >>> loadmodule "cachedb_redis.so"
> >>> modparam("cachedb_redis", 
> >>> "cachedb_url","redis:local://localhost:6379/")
> >>>
> >>> #### DbCachedb module
> >>> loadmodule "db_cachedb.so"
> >>> 
modparam("db_cachedb","cachedb_url","redis:local://localhost:6379/")
> >>>
> >>> #### UacAuth module
> >>> loadmodule "uac_auth.so"
> >>>
> >>> #### UacRegistrant module
> >>> loadmodule "uac_registrant.so"
> >>> modparam("uac_registrant", "db_url", "cachedb://redis:local")
> >>> ...
> >>> """
> >>>
> >>> To redis I could not spot anything being sent, except some CLUSTER 
> >>> commands. Are these used with a  purpose or can they be disabled?
> >>>
> >>> """
> >>> T 2014/07/10 09:27:46.942284 127.0.0.1:46564 -> 127.0.0.1:6379 
[AP]
> >>> *2.
> >>> $7.
> >>> CLUSTER.
> >>> $5.
> >>> NODES.
> >>>
> >>> ##
> >>> T 2014/07/10 09:27:46.943151 127.0.0.1:6379 -> 127.0.0.1:46564 
[AP]
> >>> -ERR unknown command 'CLUSTER'.
> >>> """
> >>>
> >>> Many thanks in advance for any kind of tip!
> >>>
> >>> DanB
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> Users mailing list
> >>> Users at ...
> >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >>>
> >>>

Hi Bogdan,

   This is a very old post . But I am facing some issue now a days in 
the redis module while using it as a noSQL database . Its showing that 
the The selected NoSQL driver cannot convert select queries . 

    I think, the problem in redis module must be fixed till now . 
I am using opensips-1.11 . Can you please tell me what should I use to 
fix my problem . 

I am doing like bellow example :

loadmodule "auth_db.so"
modparam("auth_db", "load_credentials", "$avp(user_rpid)=rpid")
.....
loadmodule "db_cachedb.so"
loadmodule "cachedb_redis.so"
...
modparam("db_cachedb","cachedb_url","redis:group1://127.0.0.1:27017/")
modparam("auth_db","db_url","cachedb://redis:group1")


Error :

 NOTICE:cachedb_redis:mod_init: initializing module cachedb_redis ...
 WARNING:acc:mod_init: Integer flags are now deprecated! Use unique 
quoted strings!
 ERROR:db_cachedb:db_cachedb_query: The selected NoSQL driver cannot 
convert select queries
 ERROR:core:db_table_version: error in db_query
 ERROR:core:db_check_table_version: querying version for table acc
 ERROR:acc:acc_db_init: error during table version check
 ERROR:acc:mod_init: failed...did you load a database module?
 ERROR:core:init_mod: failed to initialize module acc
 ERROR:core:main: error while initializing modules
 NOTICE .:cachedb_redis:destroy: destroy module cachedb_redis ...
 NOTICE:db_cachedb:destroy: destroy module db_cachedb ... 

So please le me know if I am wrong somewhere
> >>
> >
> 
> 







More information about the Users mailing list