[OpenSIPS-Devel] ERROR:db_mysql:db_mysql_submit_query
Iñaki Baz Castillo
ibc at aliax.net
Wed Dec 10 15:28:22 CET 2008
2008/12/10 Iñaki Baz Castillo <ibc at aliax.net>:
> Hi Bogdan, I attach a debug (level 4) with a OpenSIPS process filtered
> when the SQL query error occurs.
>
> In this case the SQL error occurs when handling presence, and it's
> about a duplicate key entry in the table:
>
> ERROR:db_mysql:db_mysql_submit_query: driver error on query: Duplicate
> entry 'sip:bob at domain1.net-alice-domain1.net-presence' for key 2
> ERROR:core:db_do_insert: error while submitting query
> ERROR:presence:insert_db_subs_auth: in sql insert
> ERROR:presence:handle_subscribe: while inserting record in watchers table
After some testing I've discovered something: The ERROR just occurs
when using "children>1". Some tested cases:
1) OK
children=1
dissable_tcp=no
listen=MY_IP:MY_PORT
2) ERROR:db_mysql:db_mysql_submit_query
children=2
dissable_tcp=no
listen=MY_IP:MY_PORT
3) OK
children=1
dissable_tcp=no
listen=MY_IP:MY_PORT
listen=MY_IP:MY_PORT_2
listen=MY_IP_2:MY_PORT
listen=MY_IP_2:MY_PORT_2
4) ERROR:db_mysql:db_mysql_submit_query
children=2
dissable_tcp=no
listen=MY_IP:MY_PORT
listen=MY_IP:MY_PORT_2
listen=MY_IP_2:MY_PORT
listen=MY_IP_2:MY_PORT_2
This is, the error occurs VERY VERY often when "children>1", no matter
how many listening binds there are.
Also, as you cad see in the following log, the error is related to the
MySQL driver, regardless of the OpenSIPS module:
---------
opensips[23846]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Duplicate entry 'sip:bob at domain.net-bob-oversip.net-presence'
for key 2
opensips[23846]: ERROR:core:db_do_insert: error while submitting query
opensips[23846]: ERROR:presence:update_presentity: inserting new
record in database
opensips[23846]: ERROR:presence:handle_publish: when updating presentity
opensips[23847]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Commands out of sync; you can't run this command now
opensips[23847]: ERROR:core:db_do_query: error while submitting query
opensips[23847]: ERROR:presence:get_p_notify_body: failed to query
presentity table
opensips[23847]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Commands out of sync; you can't run this command now
opensips[23847]: ERROR:core:db_do_query: error while submitting query
opensips[23847]: ERROR:auth_db:get_ha1: failed to query database
opensips[23847]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Commands out of sync; you can't run this command now
opensips[23847]: ERROR:core:db_do_query: error while submitting query
opensips[23847]: ERROR:auth_db:get_ha1: failed to query database
opensips[23847]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Commands out of sync; you can't run this command now
opensips[23847]: ERROR:core:db_do_delete: error while submitting query
opensips[23847]: ERROR:presence:delete_db_subs: sql delete failed
opensips[23847]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Commands out of sync; you can't run this command now
opensips[23847]: ERROR:core:db_do_delete: error while submitting query
opensips[23847]: ERROR:presence:delete_db_subs: sql delete failed
opensips[23847]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Commands out of sync; you can't run this command now
opensips[23847]: ERROR:core:db_do_delete: error while submitting query
opensips[23847]: ERROR:presence:delete_db_subs: sql delete failed
opensips[23847]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Commands out of sync; you can't run this command now
opensips[23847]: ERROR:core:db_do_delete: error while submitting query
opensips[23847]: ERROR:presence:delete_db_subs: sql delete failed
opensips[23847]: ERROR:presence:update_subscription: deleting
subscription record from database
opensips[23847]: ERROR:presence:handle_subscribe: in update_subscription
opensips[23847]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Commands out of sync; you can't run this command now
opensips[23847]: ERROR:core:db_do_delete: error while submitting query
opensips[23847]: ERROR:presence:delete_db_subs: sql delete failed
opensips[23847]: ERROR:presence:update_subscription: deleting
subscription record from database
opensips[23847]: ERROR:presence:handle_subscribe: in update_subscription
opensips[23847]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Commands out of sync; you can't run this command now
opensips[23847]: ERROR:core:db_do_delete: error while submitting query
opensips[23847]: ERROR:presence:delete_db_subs: sql delete failed
opensips[23847]: ERROR:presence:update_subscription: deleting
subscription record from database
opensips[23847]: ERROR:presence:handle_subscribe: in update_subscription
opensips[23847]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Commands out of sync; you can't run this command now
opensips[23847]: ERROR:core:db_do_delete: error while submitting query
opensips[23847]: ERROR:presence:delete_db_subs: sql delete failed
opensips[23847]: ERROR:presence:update_subscription: deleting
subscription record from database
opensips[23847]: ERROR:presence:handle_subscribe: in update_subscription
opensips[23847]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Commands out of sync; you can't run this command now
opensips[23847]: ERROR:core:db_do_delete: error while submitting query
opensips[23847]: ERROR:presence:delete_db_subs: sql delete failed
opensips[23847]: ERROR:presence:update_subscription: deleting
subscription record from database
opensips[23847]: ERROR:presence:handle_subscribe: in update_subscription
opensips[23847]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Commands out of sync; you can't run this command now
opensips[23847]: ERROR:core:db_do_delete: error while submitting query
opensips[23847]: ERROR:presence:delete_db_subs: sql delete failed
opensips[23847]: ERROR:presence:update_subscription: deleting
subscription record from database
opensips[23847]: ERROR:presence:handle_subscribe: in update_subscription
opensips[23847]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Commands out of sync; you can't run this command now
opensips[23847]: ERROR:core:db_do_query: error while submitting query
opensips[23847]: ERROR:auth_db:get_ha1: failed to query database
opensips[23847]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Commands out of sync; you can't run this command now
opensips[23847]: ERROR:core:db_do_query: error while submitting query
opensips[23847]: ERROR:auth_db:get_ha1: failed to query database
opensips[23847]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Commands out of sync; you can't run this command now
opensips[23847]: ERROR:core:db_do_query: error while submitting query
opensips[23847]: ERROR:auth_db:get_ha1: failed to query database
opensips[23847]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Commands out of sync; you can't run this command now
opensips[23847]: ERROR:core:db_do_query: error while submitting query
opensips[23847]: ERROR:auth_db:get_ha1: failed to query database
opensips[23847]: ERROR:db_mysql:db_mysql_submit_query: driver error on
query: Commands out of sync; you can't run this command now
opensips[23847]: ERROR:core:db_do_query: error while submitting query
opensips[23847]: ERROR:auth_db:get_ha1: failed to query database
----------
--
Iñaki Baz Castillo
<ibc at aliax.net>
More information about the Devel
mailing list