Hello,
are there more specific errors e.g. from the db_mysql module? Otherwise enable query
logging or checkout the DB error log might help you here.
If you run Kamailio in debug mode you will also see all the queries on that side.
Cheers,
Henning
--
Henning Westerholt –
-----Original Message-----
From: Benoît Panizzon via sr-users <sr-users(a)lists.kamailio.org>
Sent: Freitag, 26. Januar 2024 08:27
To: sr-users(a)lists.kamailio.org
Cc: Benoît Panizzon <benoit.panizzon(a)imp.ch>
Subject: [SR-Users] usrloc database duplicate keys issue
Hi
I have come across an issue with the usrloc database on kamailio 5.6 and 5.7
Jan 26 07:19:45 dev-cpereg01 kamailio[2708456]: ERROR: <core>
[db_query.c:244]: db_do_insert_cmd(): error while submitting query Jan 26
07:19:45 dev-cpereg01 kamailio[2708456]: ERROR: usrloc [ucontact.c:686]:
db_insert_ucontact(): inserting contact in db failed somedudetp0216 (uloc-
65b237f8-28983d-1) Jan 26 07:19:45 dev-cpereg01 kamailio[2708456]: ERROR:
usrloc [urecord.c:419]: wb_timer(): inserting contact into database failed (aor:
somedudetp0216)
settings:
# ----- usrloc params -----
modparam("usrloc", "db_url", DBLOCAL)
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "use_domain", 0)
modparam("usrloc", "ka_mode", 0)
modparam("usrloc", "ka_filter", 1)
modparam("usrloc", "timer_procs", 1)
modparam("usrloc", "ka_from", "sip:ping@sip.imp.ch")
modparam("usrloc",
"server_id_filter", 1)
# Use DMQ to sync userloc
loadmodule "dmq_usrloc.so" # Replicate usrloc via dmq
# Enable userloc sync
modparam("dmq_usrloc", "enable", 1)
# Do a full sync on start
modparam("dmq_usrloc", "sync", 1)
I assume, when kamailio is being restartet there are some expired entries still
present in the database which kamailio tries to insert on a new registration.
This leads to this duplicate key error.
Is there a way to tell kamailio to use 'replace into' instread of 'insert
into'?
Solution for now, is to manually delete expired entries from the database.
--
Mit freundlichen Grüssen
-Benoît Panizzon- @ HomeOffice und normal erreichbar
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web
http://www.imp.ch
______________________________________________________
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send
an email to sr-users-leave(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe: