Brief update:
Removed the domain parameter in the schema (subscriber). The registation now works.
Thanks,
Bou
From: sr-users-bounces(a)lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org]
On Behalf Of Boudewyn Ligthart
Sent: 21 August 2012 16:45
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List
Subject: Re: [SR-Users] db_cassandra
Hi,
Kamailio now, connects to Cassandra ok. However the query against the column family
does not yield any results. Followed the docs to only create the column family inside the
keyspace.
From log:
0(11171) DEBUG: auth_db [authorize.c:274]: realm value [172.23.1.188]
0(11171) DEBUG: auth [api.c:96]: auth: digest-algo: MD5 parsed value: 1
0(11171) DEBUG: db_cassandra [dbcassa_base.cpp:608]: query table=subscriber
0(11171) DEBUG: db_cassandra [dbcassa_table.c:461]: found dbname=openser,
table=subscriber
0(11171) DEBUG: db_cassandra [dbcassa_base.cpp:350]: query col = username
0(11171) DEBUG: db_cassandra [dbcassa_base.cpp:350]: query col = domain
0(11171) DEBUG: db_cassandra [dbcassa_base.cpp:375]: key = userX 172.23.1.188
0(11171) DEBUG: db_cassandra [dbcassa_base.cpp:498]: Query col: password
0(11171) DEBUG: db_cassandra [dbcassa_base.cpp:500]: get 1 columns
0(11171) DEBUG: db_cassandra [dbcassa_table.c:461]: found dbname=openser,
table=subscriber
0(11171) DEBUG: db_cassandra [dbcassa_base.cpp:665]:
RES_NAMES(0x7fd2fb336fe0)[0]=[password]
0(11171) DEBUG: db_cassandra [dbcassa_base.cpp:672]: The query returned no result
0(11171) DEBUG: db_cassandra [dbcassa_base.cpp:715]: Exited with success
0(11171) DEBUG: auth_db [authorize.c:112]: no result for user
'userX(a)172.23.1.188'
Noticed that the key is a combined key, is this correct?
The values in the column family are:
RowKey: userX
=> (column=domain, value=172.23.1.188, timestamp=1345563751910000)
=> (column=password, value=pass123, timestamp=1345563765514000)
Thanks,
Bou
From: sr-users-bounces(a)lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org]
On Behalf Of Anca Vamanu
Sent: 14 August 2012 14:53
To: sr-users(a)lists.sip-router.org
Subject: Re: [SR-Users] db_cassandra
Hi,
If you are using cassandra-cli you can fill in the tables using something like this:
version table:
set version['location']['table_version']='1004';
set version['subscriber']['table_version']='6';
and the subscriber table:
set subscriber['userX']['domain']='domain.com';
set subscriber['userX']['password']='pass123';
Regards,
Anca
On 08/14/2012 04:26 PM, Boudewyn Ligthart wrote:
HI Anca,
Thanks for pointing me to the latest GIT version, this compiles as per normal.
Another question,
Have you got pointers on how to install the tables / setup Cassandra.
I have created the column families for location, subscriber, version but not yet filled
these with data.
Regards
Bou
From:
sr-users-bounces@lists.sip-router.org<mailto:sr-users-bounces@lists.sip-router.org>
[mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Anca Vamanu
Sent: 14 August 2012 13:39
To: sr-users@lists.sip-router.org<mailto:sr-users@lists.sip-router.org>
Subject: Re: [SR-Users] db_cassandra
Hi,
I tried compiling the module with the latest 3.1 from git and indeed it did not compile
initially.
This very simple patch that is attached was needed. There were some problems with implicit
casts.
I see that you are talking about 3.1.1 version, I have not tried with this exact version.
You should maybe consider using the latest git for 3.1, it should also be more stable.
Regards,
Anca
On 08/14/2012 01:05 PM, Boudewyn Ligthart wrote:
Hi,
I am trying to get the db_cassandra working in kamailio 3.1.1 with thrift 0.6.1 API and
however I get the following
compile error.
ol.h:33,
from dbcassa_base.h:38,
from dbcassa_base.cpp:47:
../../lib/srdb1/db.h:388:20: error: expected unqualified-id before âdeleteâ
dbcassa_base.cpp: In function âColumnVecPtr cassa_translate_query(const db1_con_t*, str*
const*, const db_val_t*, str* const*, int, int, int*)â:
dbcassa_base.cpp:538:8: warning: format â%dâ expects argument of type âintâ, but argument
7 has type âstd::vector<org::apache::cassandra::KeySlice>::size_type {aka long
unsigned int}â [-Wformat]
dbcassa_base.cpp:538:8: warning: format â%dâ expects argument of type âintâ, but argument
5 has type âstd::vector<org::apache::cassandra::KeySlice>::size_type {aka long
unsigned int}â [-Wformat]
dbcassa_base.cpp:538:8: warning: format â%dâ expects argument of type âintâ, but argument
6 has type âstd::vector<org::apache::cassandra::KeySlice>::size_type {aka long
unsigned int}â [-Wformat]
dbcassa_base.cpp:538:8: warning: format â%dâ expects argument of type âintâ, but argument
4 has type âstd::vector<org::apache::cassandra::KeySlice>::size_type {aka long
unsigned int}â [-Wformat]
dbcassa_base.cpp:538:8: warning: format â%dâ expects argument of type âintâ, but argument
4 has type âstd::vector<org::apache::cassandra::KeySlice>::size_type {aka long
unsigned int}â [-Wformat]
../../lib/srdb1/db_res.h: At global scope:
../../lib/srdb1/db_res.h:105:19: warning: inline function âdb1_res_t* db_new_result()â
used but never defined [enabled by default]
../../lib/srdb1/db_res.h:121:12: warning: inline function âint
db_allocate_columns(db1_res_t*, unsigned int)â used but never defined [enabled by
default]
../../lib/srdb1/db_res.h:98:12: warning: inline function âint db_free_columns(db1_res_t*)â
used but never defined [enabled by default]
../../lib/srdb1/db_res.h:129:12: warning: inline function âint
db_allocate_rows(db1_res_t*)â used but never defined [enabled by default]
../../lib/srdb1/db_row.h:74:12: warning: inline function âint db_allocate_row(const
db1_res_t*, db_row_t*)â used but never defined [enabled by default]
../../lib/srdb1/db_res.h:111:12: warning: inline function âint db_free_result(db1_res_t*)â
used but never defined [enabled by default]
make[1]: *** [dbcassa_base.o] Error 1
make: *** [install-modules] Error 1
Anybody has got any ideas?
Thanks in advance,
Bou