[horde] Activesync Calendar not in sync

Michael J Rubinsky mrubinsk at horde.org
Wed Sep 18 13:34:45 UTC 2013


Quoting Philipp Fäustlin <philipp.faeustlin at uni-hohenheim.de>:

> Am 16.09.2013 15:56, schrieb Michael J Rubinsky:
>>
>> Quoting philipp.faeustlin at uni-hohenheim.de:
>>
>>> ----- Nachricht von Michael J Rubinsky <mrubinsk at horde.org> ---------
>>>     Datum: Fri, 13 Sep 2013 09:03:22 -0400
>>>       Von: Michael J Rubinsky <mrubinsk at horde.org>
>>> Antwort an: mrubinsk at horde.org
>>>   Betreff: Re: [horde] Activesync Calendar not in sync
>>>        An: horde at lists.horde.org
>>>
>>>
>>>> Quoting Philipp Fäustlin <philipp.faeustlin at uni-hohenheim.de>:
>>>>
>>>>> Am 12.09.2013 18:16, schrieb Michael J Rubinsky:
>>>>>>
>>>>>> Quoting Philipp Fäustlin <philipp.faeustlin at uni-hohenheim.de>:
>>>>>>
>>>>>>> Since Horde 5.1.2 (Horde_ActiveSync 2.7.3) I have a problem syncing
>>>>>>> with activesync.
>>>>>>>
>>>>>>> After the initial sync Calendar entries/changes in Horde won't get
>>>>>>> recognized and won't get synced to my devices.
>>>>>>>
>>>>>>> Changes on my devices (IPAD, Outlook 2013) instead are immediately
>>>>>>> synced to Horde calendar.
>>>>>>>
>>>>>>> Changes in the horde calendar don't even show any changes to
>>>>>>> activesync log idling.
>>>>>>> ----------------------------------------------
>>>>>>> 2013-09-12T17:53:49+02:00 INFO: [27538] SyncCache collections
>>>>>>> refreshed..
>>>>>>> 2013-09-12T17:53:49+02:00 INFO: [27538] Refreshing @Calendar@ from
>>>>>>> the
>>>>>>> cache.
>>>>>>> 2013-09-12T17:53:49+02:00 INFO: [27538] Initializing state for
>>>>>>> collection: @Calendar@, synckey:
>>>>>>> {5231d4ef-1a64-475c-9e98-75d29029041b}6
>>>>>>> 2013-09-12T17:53:49+02:00 INFO: [27538] Loading state for synckey
>>>>>>> {5231d4ef-1a64-475c-9e98-75d29029041b}6
>>>>>>> 2013-09-12T17:53:49+02:00 INFO: [27538] Initializing message diff
>>>>>>> engine for @Calendar@ (@Calendar@)
>>>>>>> 2013-09-12T17:53:49+02:00 INFO: [27538] Using MODSEQ 962060 for
>>>>>>> @Calendar at .
>>>>>>> 2013-09-12T17:53:49+02:00 INFO: [27538]
>>>>>>> Horde_Core_ActiveSync_Driver::getServerChanges(@Calendar@, 962060,
>>>>>>> 962060, 1376582029, 1)
>>>>>>> 2013-09-12T17:53:49+02:00 INFO: [27538] Fetching changes for calendar
>>>>>>> using MODSEQ.
>>>>>>> 2013-09-12T17:53:49+02:00 INFO: [27538] Found 0 message changes in
>>>>>>> @Calendar at .
>>>>>>> 2013-09-12T17:53:49+02:00 INFO: [27538] Sleeping for 5 seconds.
>>>>>>> --------------------------------------------
>>>>>>>
>>>>>>> Is there a bug or do I have a configuration problem?
>>>>>>
>>>>>> Are you sure the changes on the Horde side are in the calendar that is
>>>>>> being synched?
>>>>>>
>>>>>>
>>>>> I'm pretty sure, because my test user only has one calendar.
>>>>>
>>>>> I have this problem also when I change an entry in horde that was
>>>>> create by the device and synced to horde.
>>>>> These changes won't get synced back to the device.
>>>>>
>>>>> How should the activesync modul recognise a change in the horde
>>>>> database? Is there a trigger?
>>>>
>>>> On every check (the ::getServerChanges() call in the log), it queries
>>>> the Horde_History system for changes. Seeing how your start and end
>>>> range numbers (962060 in the snippit above) are the same, this tells
>>>> me that the History system does not yet know about any changes in the
>>>> calendar, or there is some other error involving the history system.
>>>> Check in your horde_histories table to see if the changes are
>>>> actually being logged.
>>>> --
>>>> mike
>>>>
>>>> The Horde Project (www.horde.org)
>>>> mrubinsk at horde.org
>>>
>>>
>>> ----- Ende der Nachricht von Michael J Rubinsky <mrubinsk at horde.org>
>>> -----
>>> The changes are locked in the horde_histories table, as far as I can
>>> tell..
>>>
>>> For example a change on an kronolith entry:
>>> history_id | object_uid | history_action | history_ts | history_desc |
>>> history_who | history_extra | history_modseq
>>> 1700333 | kronolith:testuser:20130916... | modify | 1379324866 | NULL
>>> | testuser | a:2{ .... | 141867
>>>
>>> But nothing happens on the device.
>>
>> You'll have to trace why the change is not returned from
>> Kronolith_Api::getChanges(). Works fine here.
>>
>>> What is the horde_histories_modseq table for?
>>
>> It tracks the next available modification sequence number.
>>
>>> This table is nearly empty on my system, there is only one entry:
>>> history_modseq | history_modseqempty
>>> 141903 | 0
>>>
>>> Is this correct?
>>
>> Yes.
>>
>>
>>
> I think I there are probably some faults in the data of my history system>
> What are the attributes in the  
> Horde_Core_ActiveSync_Driver::getServerChanges(@Calendar@, 962060,  
> 962060, 1376582029, 1) function stand for?
>
> Am I correct? The getServerChanges above would search for "Calendar"  
> changes with a modseq bigger 962060 and lower/equal 962060, which  
> always gives an empty result.

This is correct.

> If I do some changes in my calendar in horde, this changes are  
> inserted in horde_histories with a modseq about 141867. Probably the  
> value listed in horde_histories_modseq.

When an entry is logged, the current value of horde_histories_modseq  
is incremented, saved back to horde_histories_modseq and then used for  
the new log entry.

> Now the number in horde_histories_modseq is much lower then the  
> biggest value ("962060") of history_modseq in horde_histories.
>
> Is it correct?
> The horde_histories_modseq should always be higher then the biggest  
> "history_modseq" value in horde_histories, correct?

No. It will probably be equal to the highest value in horde_histories,  
unless an entry in the histories table was removed that happened to be  
the current highest modseq value.


> If I'm right, how can I safely clear the horde history system?

You shouldn't need to. You need to find out why  
Horde_History_Sql::getHightestModSeq() is not returning the correct  
highest modseq value for the calendar collection. This method (which  
is where activesync get's the second 962060 value from in your example  
above) should return the max modseq value in all the history entries  
made for kronolith at the time the call is made. You can see what  
value this is returning by running the following in the horde phpshell  
admin page:

var_dump($GLOBALS['injector']->getInstance('Horde_History')->getHighestModSeq('kronolith'));



-- 
mike

The Horde Project (www.horde.org)
mrubinsk at horde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5849 bytes
Desc: S/MIME Signature
URL: <http://lists.horde.org/archives/horde/attachments/20130918/0b991501/attachment-0001.bin>


More information about the horde mailing list