Hi Bogdan,
I think the problem comes from using write-through mode, I'll see if it
goes away with db-only. It wasn't clear to me from the documentation
that only db-only mode is supported with a shared DB.
Anyway, in case there is more going on, enclosed are the location table
entries for the UAC (name testtcp30001, the 'tcp' means nothing - it
uses UDP) and the relevant DB queries. Registrar A is 79.171.196.85,
registrar B is 79.171.192.85. All servers are synchronized with NTP.
- After T1 there is a single record
- after T2 also
- after T3 the record is gone
The Tx.db files all have 2 lines: the location table before and after Tx.
Regards,
Henk
Bogdan-Andrei Iancu wrote:
Hi Henk,
Reviewing your scenario (in db_only mode):
T1 - registrar A restarts, finds UA registration inserted by registrar B
with expiry time T3, prints "non-local socket ... ignoring" message
T2 - UA registers again with registrar B, sets expiry time to *after* T3
T3 - registrar A deletes record for UA
please check:
- after T1, you have a single record for user in the location table
(inserted by A)
- after T2, do you have 2 records for the user (with different contacts)
or the existing one is updated ?
- after T3 - I understand all the records for the user are removed, right ?
can you make a capture of the sql queries on the mysql server (to see
what queries - location related- are run by each server).
I'm asking for all this because, following the code, I cannot "see" the
behaviour you describe - maybe I miss something or maybe there is a bug
somewhere.
Regarding the other db modes, note they do not work (by design) with
shared dbs.
May be a useless note, but take care to have sync times on both servers
(A and B) !
Regards,
Bogdan
Henk Hesselink wrote:
Hi Bogdan,
Did you make the patch?
Regards,
Henk
Bogdan-Andrei Iancu wrote:
Hi Henk,
Yes, I'm aware of this issue with the db_only mode - I will prepare a
fixing patch for monday, so if you could test it, it will be great!
Thanks and regards,
Bogdan
Henk Hesselink wrote:
Hi all,
We have several OpenSIPS registrars writing to one location table.
When one of the registrars restarts it logs a lot of the following:
WARNING:usrloc:dbrow2info: non-local socket<udp:XXXX:5060>...ignoring
which I believe we can ignore. But it then deletes all those non-local
entries at the 'expires' time that was in the database at the time of
the restart. So:
T1 - registrar A restarts, finds UA registration inserted by registrar B
with expiry time T3, prints "non-local socket ... ignoring" message
T2 - UA registers again with registrar B, sets expiry time to *after* T3
T3 - registrar A deletes record for UA
After T3 the registration for UA never reappears because its register
requests cause registrar B to do an update for a non-existent record.
This seems wrong, or am I missing something?
Thanks,
Henk
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Thu Nov 26 17:43:50 CET 2009
id | username | domain | contact
| received | path | expires | q |
callid | cseq | last_modified | flags | cflags |
user_agent | socket | methods
----+--------------+--------+---------------------------------------------------+-----------------------+------+---------------------+----+------------------------------------------+------+---------------------+-------+--------+--------------------------------------------+------------------------+---------
66 | testtcp30001 | | sip:[email protected]:2048;line=02gt2a14
| sip:87.210.212.0:2048 | | 2009-11-26 18:31:21 | 1 |
3c2a8499a6fb-77vs7rns2ql3 | 1434 | 2009-11-26 17:31:21 | 0 |
64 | snom360/7.3.7 | udp:79.171.196.85:5060 |
7999
Thu Nov 26 17:44:20 CET 2009
id | username | domain | contact
| received | path | expires | q |
callid | cseq | last_modified | flags | cflags |
user_agent | socket | methods
----+--------------+--------+---------------------------------------------------+-----------------------+------+---------------------+----+------------------------------------------+------+---------------------+-------+--------+--------------------------------------------+------------------------+---------
66 | testtcp30001 | | sip:[email protected]:2048;line=02gt2a14
| sip:87.210.212.0:2048 | | 2009-11-26 18:31:21 | 1 |
3c2a8499a6fb-77vs7rns2ql3 | 1434 | 2009-11-26 17:31:21 | 0 |
64 | snom360/7.3.7 | udp:79.171.196.85:5060 |
7999
17:44:11 79.171.192.85 select
username,contact,expires,q,callid,cseq,flags,cflags,user_agent,received,path,socket,methods,last_modified
from location
Thu Nov 26 18:00:51 CET 2009
id | username | domain | contact
| received | path | expires | q |
callid | cseq | last_modified | flags | cflags |
user_agent | socket | methods
----+--------------+--------+---------------------------------------------------+-----------------------+------+---------------------+----+------------------------------------------+------+---------------------+-------+--------+--------------------------------------------+------------------------+---------
66 | testtcp30001 | | sip:[email protected]:2048;line=02gt2a14
| sip:87.210.212.0:2048 | | 2009-11-26 18:31:21 | 1 |
3c2a8499a6fb-77vs7rns2ql3 | 1434 | 2009-11-26 17:31:21 | 0 |
64 | snom360/7.3.7 | udp:79.171.196.85:5060 |
7999
Thu Nov 26 18:01:21 CET 2009
id | username | domain | contact
| received | path | expires | q |
callid | cseq | last_modified | flags | cflags |
user_agent | socket | methods
----+--------------+--------+---------------------------------------------------+-----------------------+------+---------------------+----+------------------------------------------+------+---------------------+-------+--------+--------------------------------------------+------------------------+---------
66 | testtcp30001 | | sip:[email protected]:2048;line=02gt2a14
| sip:87.210.212.0:2048 | | 2009-11-26 19:01:21 | 1 |
3c2a8499a6fb-77vs7rns2ql3 | 1436 | 2009-11-26 18:01:21 | 0 |
64 | snom360/7.3.7 | udp:79.171.196.85:5060 |
7999
18:01:21 79.171.196.85 update location set expires='2009-11-26 19:01:21',q=1.00
,cseq=1436,flags=0,cflags=64,user_agent='snom360/7.3.7',received='sip:87.210.212.0:2048',path=NULL,socket='udp:79.171.196.85:5060',methods=7999,last_modified='2009-11-26
18:01:21' where username='testtcp30001' AND
contact='sip:[email protected]:2048;line=02gt2a14' AND
callid='3c2a8499a6fb-77vs7rns2ql3'
Thu Nov 26 18:30:54 CET 2009
id | username | domain | contact
| received | path | expires | q |
callid | cseq | last_modified | flags | cflags |
user_agent | socket | methods
----+--------------+--------+---------------------------------------------------+-----------------------+------+---------------------+----+------------------------------------------+------+---------------------+-------+--------+--------------------------------------------+------------------------+---------
66 | testtcp30001 | | sip:[email protected]:2048;line=02gt2a14
| sip:87.210.212.0:2048 | | 2009-11-26 19:01:21 | 1 |
3c2a8499a6fb-77vs7rns2ql3 | 1436 | 2009-11-26 18:01:21 | 0 |
64 | snom360/7.3.7 | udp:79.171.196.85:5060 |
7999
Thu Nov 26 18:31:24 CET 2009
id | username | domain | contact
| received | path | expires | q |
callid | cseq | last_modified | flags | cflags |
user_agent | socket | methods
----+--------------+--------+---------------------------------------------------+-----------------------+------+---------------------+----+------------------------------------------+------+---------------------+-------+--------+--------------------------------------------+------------------------+---------
66 | testtcp30001 | | sip:[email protected]:2048;line=02gt2a14
| sip:87.210.212.0:2048 | | 2009-11-26 19:31:22 | 1 |
3c2a8499a6fb-77vs7rns2ql3 | 1438 | 2009-11-26 18:31:22 | 0 |
64 | snom360/7.3.7 | udp:79.171.196.85:5060 |
7999
18:31:22 79.171.196.85 update location set expires='2009-11-26 19:31:22',q=1.00
,cseq=1438,flags=0,cflags=64,user_agent='snom360/7.3.7',received='sip:87.210.212.0:2048',path=NULL,socket='udp:79.171.196.85:5060',methods=7999,last_modified='2009-11-26
18:31:22' where username='testtcp30001' AND
contact='sip:[email protected]:2048;line=02gt2a14' AND
callid='3c2a8499a6fb-77vs7rns2ql3'
Thu Nov 26 18:31:54 CET 2009
id | username | domain | contact
| received | path | expires | q |
callid | cseq | last_modified | flags | cflags |
user_agent | socket | methods
----+--------------+--------+---------------------------------------------------+-----------------------+------+---------------------+----+------------------------------------------+------+---------------------+-------+--------+--------------------------------------------+------------------------+---------
66 | testtcp30001 | | sip:[email protected]:2048;line=02gt2a14
| sip:87.210.212.0:2048 | | 2009-11-26 19:31:22 | 1 |
3c2a8499a6fb-77vs7rns2ql3 | 1438 | 2009-11-26 18:31:22 | 0 |
64 | snom360/7.3.7 | udp:79.171.196.85:5060 |
7999
Thu Nov 26 18:32:24 CET 2009
id | username | domain | contact |
received | path | expires | q | callid
| cseq | last_modified | flags | cflags |
user_agent | socket | methods
----+------------+--------+-------------------------------------------------+-----------------------+------+---------------------+----+------------------------------------------+------+---------------------+-------+--------+--------------------------------------------+------------------------+---------
18:32:12 79.171.192.85 delete from location where username='testtcp30001' AND
contact='sip:[email protected]:2048;line=02gt2a14' AND
callid='3c2a8499a6fb-77vs7rns2ql3'
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users