[OpenSIPS-Devel] [ opensips-Bugs-3488471 ] usrloc:db_insert_ucontact: inserting contact in db failed
SourceForge.net
noreply at sourceforge.net
Mon Feb 20 13:05:50 CET 2012
Bugs item #3488471, was opened at 2012-02-16 23:32
Message generated for change (Settings changed) made by bogdan_iancu
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3488471&group_id=232389
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: 1.7.x
Status: Open
Resolution: None
>Priority: 8
Private: Yes
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Vladut-Stefan Paiu (vladut-paiu)
Summary: usrloc:db_insert_ucontact: inserting contact in db failed
Initial Comment:
Usrloc strange stuck on this record:
mysql> select * from location order by expires asc;
+-------+----------+--------+---------------------------------+----------+------+---------------------+-------+---------------------------------------------------+-------+---------------------+-------+--------+---------------------------------------+------------------------+---------+
| id | username | domain | contact | received | path | expires | q | callid | cseq | last_modified | flags | cflags | user_agent | socket | methods |
+-------+----------+--------+---------------------------------+----------+------+---------------------+-------+---------------------------------------------------+-------+---------------------+-------+--------+---------------------------------------+------------------------+---------+
| 16638 | | | sip:81.211.5.210:5060 | NULL | NULL | 2012-02-16 18:48:53 | -1.00 | abf2344f-ff1c-ff04-8000-0002a4055cd0 at 81.211.5.210 | 26963 | 2012-02-16 18:38:53 | 0 | 0 | AddPac SIP Gateway | udp:87.249.26.210:5061 | NULL |
Logs:
Feb 17 11:07:12 SimpleOffice-1 /usr/local/sbin/opensips[79108]: ERROR:usrloc:db_insert_ucontact: inserting contact in db failed
Feb 17 11:07:12 SimpleOffice-1 /usr/local/sbin/opensips[79108]: ERROR:usrloc:wb_timer: inserting contact into database failed
Feb 17 11:07:42 SimpleOffice-1 /usr/local/sbin/opensips[79108]: CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver error (1062): Duplicate entry 'sip:81.211.5.210:5060' for key 'account_contact_idx'
Feb 17 11:07:42 SimpleOffice-1 /usr/local/sbin/opensips[79108]: ERROR:usrloc:db_insert_ucontact: inserting contact in db failed
Feb 17 11:07:42 SimpleOffice-1 /usr/local/sbin/opensips[79108]: ERROR:usrloc:wb_timer: inserting contact into database failed
Feb 17 11:08:13 SimpleOffice-1 /usr/local/sbin/opensips[79108]: CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver error (1062): Duplicate entry 'sip:81.211.5.210:5060' for key 'account_contact_idx'
...
Fixed by removing this record from database.
FreeBSD 7.1-RC2 i386
OpenSIPS v1.7.1
Mysql 5.1.58
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2012-02-20 02:50
Message:
Logs are clear...
2012-02-16 18:48:53 we restarted opensips... then this began to appear in
the logfile.
Another restart, again error in the logfile:
Feb 17 16:05:28 SimpleOffice-1 /usr/local/sbin/opensips[38705]:
CRITICAL:db_mysql:wrapper_single_mysql_stmt_execute: driver error (1062):
Duplicate entry 'sip:81.211.5.210:5060' for key 'account_contact_idx'
mysql> select count(*) from location;
+----------+
| count(*) |
+----------+
| 1429 |
+----------+
And only one record is buggy.. i think problem with importing data from
table location on proxy startup.
Tcpdump'ed packet from addpack:
REGISTER sip:87.249.26.210:5061 SIP/2.0
Via: SIP/2.0/UDP 81.211.5.210:5060;branch=z9hG4bKb54ffd01a443419
From: <sip:87.249.26.210>;tag=b54ffd01a4
To: <sip:87.249.26.210>
Call-ID: b5fb344f-efe7-fd41-8001-0002a4055cd0 at 81.211.5.210
CSeq: 43419 REGISTER
Date: Mon, 20 Feb 2012 14:12:58 GMT
User-Agent: AddPac SIP Gateway
Contact: <sip:81.211.5.210:5060>;expires=600
Expires: 600
Content-Length: 0
Max-Forwards: 70
----------------------------------------------------------------------
Comment By: Vladut-Stefan Paiu (vladut-paiu)
Date: 2012-02-20 01:19
Message:
Hello,
Do you, by any chance, still have any logs from the OpenSIPS and/or Mysql
side from 2012-02-16 18:48:53, the date when that specific contact should
have gotten expired & removed from DB ? I'm curious to see if there were
any relevant errors around that time.
Regards,
Vlad
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3488471&group_id=232389
More information about the Devel
mailing list