[horde] ActiveSync stops syncing mail with SQL error

Michael J Rubinsky mrubinsk at horde.org
Sun Feb 22 14:22:07 UTC 2015


This rather sounds like one or more of your emails is breaking things.  
 I would start by moving all of your email out of the inbox,  create a  
new account on the client and start adding email back one message at  
time,  waiting until each email is synced to the client before adding  
the next. if it's a specific  message,  this will track it down.

-mike
Sent from mobile. 

From: Michael Polenske <m.polenske at web.de>
Sent: Feb 22, 2015 2:32 AM
To: horde at lists.horde.org
Subject: Re: [horde] ActiveSync stops syncing mail with SQL error

> On 02/19/2015 10:08 PM, Michael J Rubinsky wrote:
>>
>> Quoting Michael Polenske <m.polenske at web.de>:
>>
>>> On 02/19/2015 07:32 PM, Michael J Rubinsky wrote:
>>>>
>>>> Quoting Michael J Rubinsky <mrubinsk at horde.org>:
>>>>
>>>>> Quoting Michael Polenske <michael at polenske.net>:
>>>>>
>>>>>> On 02/19/2015 04:49 PM, Michael J Rubinsky wrote:
>>>>>>>
>>>>>>> Quoting Michael Polenske <m.polenske at web.de>:
>>>>>>>
>>>>>>>> On 19.02.2015 15:02, Michael J Rubinsky wrote:
>>>>>>>>>
>>>>>>>>> Quoting Michael Polenske <m.polenske at web.de>:
>>>>>>>>>
>>>>>>>>>> On 19.02.2015 12:31, Jan Schneider wrote:
>>>>>>>>>>>
>>>>>>>>>>> Zitat von Michael Polenske <m.polenske at web.de>:
>>>>>>>>>>>
>>>>>>>>>>>> Good morning,
>>>>>>>>>>>> since a few days I cannot see new mails on my mobile  
>>>>>>>>>>>> device (iphone). When I go to webinterface or use Outlook  
>>>>>>>>>>>> 2013 everything seems to be fine. I activated logging für  
>>>>>>>>>>>> ActiveSync and can see a SQL error if I start to sync  
>>>>>>>>>>>> with my mobile device:
>>>>>>>>>>>> 2015-02-19T10:22:52+01:00 ERR: HORDE SQL QUERY FAILED:  
>>>>>>>>>>>> SQLSTATE[23000]: Integrity constraint violation: 1062  
>>>>>>>>>>>> Duplicate entry '{54e5ab5b-f94c-4ffb-911b-2d8ec0a82a03}3'  
>>>>>>>>>>>> for key 'PRIMARY'
>>>>>>>>>>>>   INSERT INTO horde_activesync_state (sync_key,  
>>>>>>>>>>>> sync_data, sync_devid,
>>>>>>>>>>>> [.....]
>>>>>>>>>>>> }}', 1424337772) [pid 11662 on line 204 of  
>>>>>>>>>>>> "/usr/share/php5/PEAR/Horde/Db/Adapter/Pdo/Base.php"]
>>>>>>>>>>>> Calendar, Addressbook and also Mail-Subfolders are synced  
>>>>>>>>>>>> correctly, only the Main-Inbox-Folder stops syncronising.  
>>>>>>>>>>>> Horde was updated with "pear upgrade -a -B -c horde" to  
>>>>>>>>>>>> latest version.
>>>>>>>>>>>>
>>>>>>>>>>>> Any hint/advise ?
>>>>>>>>>>>
>>>>>>>>>>> See the ActiveSync FAQ
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Hi Jan,
>>>>>>>>>>
>>>>>>>>>> thanks for the hint, oversaw in first step the  
>>>>>>>>>> "KnownIssues" part at the end ;-) Good, the SQL-Error seems  
>>>>>>>>>> to be normal. But I'm stillö not able to sync newer mails  
>>>>>>>>>> on my mobile device. Since it works on Outlook2013 and in  
>>>>>>>>>> Webinterface, I assume that ActiveSync may not be the  
>>>>>>>>>> problem. Any other idea what can be the "showstopper" ?  
>>>>>>>>>> Which part of which log do you need to give me a hint where  
>>>>>>>>>> to find the problem ?
>>>>>>>>>
>>>>>>>>> Try recreating the activesync account on the client. If it  
>>>>>>>>> still persists, since I have no idea where your issue is, I  
>>>>>>>>> would need the entire sync log from the start of the new  
>>>>>>>>> account creation, up until the email stops syncing.
>>>>>>>>>
>>>>>>>>
>>>>>>>> Hi Michael,
>>>>>>>>
>>>>>>>> I deleted my account on the mobile and created a new one.  
>>>>>>>> Just enabled mail sync for last 3 days. In mobile I cannot  
>>>>>>>> see any mail in main inbox-folder. Created a clean logfile -  
>>>>>>>> shall I post it here or send you directly ?
>>>>>>>
>>>>>>> You can send it to me directly if you like.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> Hi Michael,
>>>>>> logfile attached.
>>>>>>
>>>>>> Many thanks - Michael
>>>>>>
>>>>>> -- 
>>>>>> ### gesendet mit meinem AtariXL ###
>>>>>
>>>>> What client is this? It looks *badly* broken.
>>>>>
>>>>> It is requesting to PING the sent mail collection before it  
>>>>> initializes it with the initial SYNC request. There appears to  
>>>>> be some other issue with the DEVICEINFORMATION request that I  
>>>>> need to look into, but I don't think that it's related.
>>>>
>>>> This also looks like broken client behavior. It is sending a  
>>>> "DEVICEINFORMATION" node in the SETTINGS request but is using EAS  
>>>> version 14.1 - which requires the DEVICEINFORMATION to be sent  
>>>> only in PROVISION requests. Though, we don't currently block this  
>>>> data from being received in this case so there may be something  
>>>> wrong with the structure it is sending. I would need a wiretrace  
>>>> of the conversation to see what is being sent.
>>>>
>>>>
>>>>
>>>>
>>>
>>> Hmm, if it helps I can setup an seperate WLAN-AP and do a  
>>> wireshark-trace ?!?!
>>
>> It might help.
>>
>> I have access to several devices running iOS 8.1.x, including a 5  
>> (though it's a newer S) and can't reproduce. The device id is also  
>> very strange for an older iPhone. ALL of the iPhone logs I have  
>> seen have something similar to APPLxxxxx as the id. The only other  
>> iPhone I saw with that kind of device id was a 6 Plus.
>>
>>
>>
> Good morning,
>
> Yesterday I played around a lot with the system - strange results ...
>
> - made a factory reset to Iphone5, start to connect to webmail with  
> a clean phone - no emails in rootfolder, subfolders are okay. Set  
> sync-time from one week (default) to one month - okay, see mails in  
> root folder until February 9th.
> - Grabbed my old Iphone3S (IOS 6), factory reset, same result above.
> - Setup VirtualPC with Windows7 and Outlook2013 - everything is  
> fine, see all mails, no problems.
> - Factory reset of an old HTC Y300, install a custom rom on this (CM  
> 11) - also this device is able to sync everything without problems.
>
> Very strange.
>
> - Okay, grab Iphone 4 (also 8.1.3) of my wife (she is still able to  
> sync) - setup my account on her phone - none of my Mails since  
> February 9th on this phone...
> - create an account for my wife on Iphone 3 and 5 ... everything  
> okay, with her account I can sync anything, only MY account will not  
> sync on all Apple-Phone.
>
> Try to move / delete one of the last mails in my folder on the  
> iphone (just to be sure if maybe one of the mails are broken) -  
> cannot move, get strange errors (sorry, forgot to make screenshots).  
> With webmail abd Outlook I was able to move the last 20 emails to a  
> subfolder - but on Iphone I still see the last mails.
>
>
> So, for the moment I assume that not the phone is the problem, there  
> must be something in database that blocks all of the Apple Devices  
> for this one account. I cannot be a general problem, otherwise my  
> wifes account cannot work. Because I have no deeper knowledge of the  
> ActiveSync mechanism I have really NO idea what the exact problem  
> could be ...
>
> I created logs for all of the devices - is it okay if I send this to  
> you, Michael ?
>
>
> Have a nice Sunday - Michael
>
> -- 
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>




More information about the horde mailing list