[OpenSIPS-Users] Failed to insert location into DB

microx acmicrox at gmail.com
Tue Jul 16 14:19:30 CEST 2013


Hi all,

In my environment, each UA is allowed to have only one contact. Thus, I set
modparam("registrar", "max_expires", 1) and use save("location", "sf"). With
SIPp continuing to send REGISTERs (100 REGISTERs/second), I find that the
following error occurs sometimes. The reason is that the insert sql is sent
ahead of the delete sql? Or there exists some other root cause? Any help is
greatly appreciated.

Best wishes,
Chen-Che

/usr/sbin/opensips[17683]: ERROR:core:db_do_insert: error while submitting
query
/usr/sbin/opensips[17683]: ERROR:db_postgres:db_postgres_store_result:
0x7f6ce3f669c8 - invalid query, execution aborted
/usr/sbin/opensips[17683]: ERROR:db_postgres:db_postgres_store_result:
0x7f6ce3f669c8: PGRES_FATAL_ERROR
/usr/sbin/opensips[17683]: ERROR:db_postgres:db_postgres_store_result:
0x7f6ce3f669c8: 
/usr/sbin/opensips[17683]: WARNING:db_postgres:db_postgres_insert:
unexpected result returned
/usr/sbin/opensips[17683]: ERROR:usrloc:db_insert_ucontact: inserting
contact in db failed
/usr/sbin/opensips[17683]: ERROR:usrloc:insert_ucontact: failed to insert in
database
/usr/sbin/opensips[17686]: ERROR:db_postgres:db_postgres_submit_query:
0x7f6ce3f669c8 PQsendQuery Error: ERROR:  duplicate key value violates
unique constraint "location_account_contact_idx"#012DETAIL:  Key (username,
domain, contact, callid)=(2000040875, , sip:2000040875 at 192.168.8.70:5060,
10219-29515 at 192.168.8.70) already exists.#012 Query: insert into location
(username,contact,expires,q,callid,cseq,flags,cflags,user_agent,received,path,socket,methods,last_modified,sip_instance
) values ('2000040875','sip:2000040875 at 192.168.8.70:5060','2013-07-18
04:55:23',-1.00    
,'10219-29515 at 192.168.8.70',2,0,0,'SIPp/Linux',NULL,NULL,'udp:127.0.0.1:5060',63,'2013-07-16
19:35:23',NULL)




--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Failed-to-insert-location-into-DB-tp7587154.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.



More information about the Users mailing list