Bugs item #2335003, was opened at 2008-11-23 22:54 Message generated for change (Comment added) made by ibc_sf You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2335003&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: core Group: trunk Status: Open Resolution: None Priority: 5 Private: No Submitted By: Iñaki Baz (ibc_sf) Assigned to: Nobody/Anonymous (nobody) Summary: ERROR:db_mysql:db_mysql_submit_query Initial Comment: This error occurs to me very often (sometimes during an INVITE, during a SUBSCRIBE...). If it occurs during an INVITE, then OpenSIPS returns 500: ----------- Nov 23 16:42:07 [12195] ERROR:db_mysql:db_mysql_submit_query: driver error on query: Commands out of sync; you can't run this command now Nov 23 16:42:07 [12195] ERROR:core:db_do_query: error while submitting query Nov 23 16:42:07 [12195] ERROR:auth_db:get_ha1: failed to query database ----------- I've two users registered (alice and bob), both registered in the same Twinkle sofphone. - If alice calls (so OpenSIPS sends 407) the OpenSIPS returns 500 when alice re-sends the INVITE with credentials (auth_db issue clearly). - If bob calls (OpenSIPS sends also 407) bob re-sends the INVITE with credentials and there is no problem. After restarting OpenSIPS the issue dissapears (temporaly). I've found similar problems, specially this thread: http://www.mail-archive.com/devel%40lists.openser.org/msg02761.html in which Bogdan finally says: --------- as the DB connections are TCP connections, if the connection is opened before the fork, it will inherited by all the forked child procs. This is a typical error if you mishandle a DB connection from mod_init(). --------- ---------------------------------------------------------------------- >Comment By: Iñaki Baz (ibc_sf) Date: 2008-12-10 17:47 Message: The ERROR just occurs when "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 can 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:[EMAIL PROTECTED]' 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 ---------- ---------------------------------------------------------------------- Comment By: Iñaki Baz (ibc_sf) Date: 2008-11-24 14:23 Message: I use Debian Etch (64 bits) with OpenSIPS trunk version: ii libmysqlclient15-dev 5.0.32-7etch6 ii libmysqlclient15off 5.0.32-7etch6 ii mysql-client-5.0 5.0.32-7etch6 ii mysql-common 5.0.32-7etch6 ii mysql-server-5.0 5.0.32-7etch6 ii opensips-mysql-module 1.4.0-1 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2335003&group_id=232389 _______________________________________________ Devel mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
