[ejabberd] Error when moving a user to another group

Yann Leboulanger asterix at lagaule.org
Fri Aug 13 00:28:14 MSD 2010


On 07/29/2010 02:04 PM, Yann Leboulanger wrote:
> On 02/01/2010 03:41 AM, Evgeniy Khramtsov wrote:
>> Yann Leboulanger wrote:
>>> Yann Leboulanger wrote:
>>>> Hi,
>>>>
>>>> I use ejabberd 2.1.1 with MySQL to store rosters. Since I upgraded to
>>>> 2.1.1, I have an error when I change the groups of my contacts:
>>>>
>>>> =ERROR REPORT==== 2010-01-26 22:20:36 ===
>>>> E(<0.16553.7>:ejabberd_odbc:317) : SQL transaction restarts exceeded
>>>> ** Restarts: 10
>>>> ** Last abort reason: "#23000Duplicate entry 'MY_USERNAME-CONTACT_JID'
>>>> for key 'i_rosteru_user_jid'"
>>>> ** Stacktrace: [{ejabberd_odbc,sql_query_t,1},
>>>> {odbc_queries,update_roster,5},
>>>> {mod_roster_odbc,'-process_item_set/3-fun-0-',7},
>>>> {ejabberd_odbc,outer_transaction,3},
>>>> {ejabberd_odbc,handle_call,3},
>>>> {gen_server,handle_msg,5},
>>>> {proc_lib,init_p_do_apply,3}]
>>>> ** When State == {state,<0.16554.7>,mysql}
>>>>
>>>> It happens only in one of my 2 domain hosted on this server.
>>>>
>>>> Any idea what could be the reason?
>>>>
>>>> Thanks for your help!
>>>
>>> No idea? That's really annoying to not be able to change the group of a
>>> contact :/
>>>
>>
>> Enable logging in MySQL to see what happens. It is hard to say anything
>> without SQL logs.
>>
>
> Here are SQL logs when I move a contact in another group:
>
> 100729 13:56:01 275 Query begin
> 275 Query select username, jid, nick, subscription, ask, askmessage,
> server, subscribe, type from rosterusers where username='ME' and
> jid='CONTACT'
> 275 Query update rosterusers set username='ME', jid='CONTACT',
> nick='NICK', subscription='B', ask='N', askmessage='', server='N',
> subscribe='', type='item' where username='ME' and jid='CONTACT'
> 275 Query insert into rosterusers(username, jid, nick, subscription,
> ask, askmessage, server, subscribe, type) values ('ME', 'CONTACT',
> 'NICK', 'B', 'N', '', 'N', '', 'item')
> 275 Query rollback
>
>
> 1/ I don't understand why there is a update in rosterusers table, only
> rostergroups should be updated
> 2/ There should definitively not be a insert, which cause the
> rostergroups update to be aborded.
>
> Any idea why this happen?

Am I the only one with this problem? Any idea why ejabberd try to 
re-insert the user in database?

-- 
Yann


More information about the ejabberd mailing list