[horde] ActiveSync failing on fresh install with Horde 5.0.3

Brett Lumsden horde at controlunlimited.net
Thu Jan 24 11:00:31 UTC 2013


Quoting Jan Schneider <jan at horde.org>:

> Zitat von Brett Lumsden <horde at controlunlimited.net>:
>
>> Quoting Jan Schneider <jan at horde.org>:
>>
>>> Zitat von Brett Lumsden <horde at controlunlimited.net>:
>>>
>>>> Quoting Jan Schneider <jan at horde.org>:
>>>>> Why don't you run the database migration scripts from the  
>>>>> adminstration interface instead (configuration section)?
>>>>> -- 
>>>>> Jan Schneider
>>>>> The Horde Project
>>>>> http://www.horde.org/
>>>>>
>>>>> -- 
>>>>> Horde mailing list
>>>>> Frequently Asked Questions: http://horde.org/faq/
>>>>> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>>>>
>>>> Hi Jan,
>>>>
>>>> Thanks for your help, during the installation all of the  
>>>> databases were listed as DB schema is out of date.  After  
>>>> clicking the button Update all DB schemas  all databases  
>>>> including Horde_Activesync report as "DB schema is ready" and the  
>>>> three applications I currently have installed as listed as  
>>>> "Application is ready".  There are no errors displayed in horde,  
>>>> apache error log or mysqld log to indicate that tables could not  
>>>> be created.
>>>>
>>>> From the original message I am mostly concerned about the syncing  
>>>> attempt from the device occurring every 2 to 3 seconds and never  
>>>> actually completing.  My main issue, which I am not 100% sure is  
>>>> related is the error message "2013-01-23T04:01:17+00:00 ERR:  
>>>> SQLSTATE[42S02]: Base table or view not found: 1146 Table  
>>>> 'webmail6.horde_activesync_cache' doesn't exist" would this  
>>>> actually cause the sync to fail?
>>>
>>> So you are still getting this error message even though all  
>>> migration ran without an error, and all schemas are marked up to  
>>> date?
>>>
>>
>> Yes that is correct, all schemas are marked as 'DB Schema is ready'.
>>
>>>> If this is the cause of the failure is there anyway to force the  
>>>> creation or can someone provide a MySQL formatted version of  
>>>> these tables so I can manually add them?
>>>>
>>>> In an attempt to get the table to be created I have delete all  
>>>> horde_activesync_* tables from the database, refreshed the web  
>>>> interface and clicked the Update all DB schemas button.  The  
>>>> following tables are created by updating the DB schemas using the  
>>>> web interface.
>>>>
>>>> mysql> show tables like '%activesync%';
>>>> +-------------------------------+
>>>> | Tables_in_webmail6 (%ctive%)  |
>>>> +-------------------------------+
>>>> | horde_activesync_device       |
>>>> | horde_activesync_device_users |
>>>> | horde_activesync_map          |
>>>> | horde_activesync_schema_info  |
>>>> | horde_activesync_state        |
>>>> +-------------------------------+
>>>
>>> This doesn't make sense, because you indeed have the cache table  
>>> missing. What version number do you have in the  
>>> horde_activesync_schema_info table, what's your Horde_ActiveSync  
>>> version, and which is the highest number in your ActiveSync  
>>> migration scripts?
>>>
>>
>> mysql> select * from horde_activesync_schema_info;
>> +---------+
>> | version |
>> +---------+
>> |       3 |
>> +---------+
>
> Not good. Especially since:
>
>> The only file that makes any sense that contains the word 'version'  
>> in pear/data/Horde_ActiveSync/ is the file  
>> migration/7_horde_activesync_clearstate.php but this is a comment  
>> and references clearing the collection state when moving between  
>> version 1 and 2.
>>
>> If there is a different file that I should be looking at.  All my  
>> references are from the directory that contains two directories  
>> which are horde/ and pear/.
>
> The version is leading number of the migration script. Which means  
> that you *at least* have migration up to version 7 (version 9 is  
> what adds the cache table). Yet your schema has only been updated to  
> version 3.
>
> This could only happen if:
> - There was an error during the migration
> AND
> - The schema is still listed as outdated
> OR
> - Horde cannot determine the highest schema version for some reason,  
> e.g. because it cannot read the migration/ directory.
>

Thanks Jan,

To try to rectify the problem I have enabled debug logging, dropped  
the activesync tables again and attempted to recreate the ActiveSync  
tables.

The output from the debug logging is below:

Jan 24 21:19:09 house HORDE: [horde] SQL  (0.2274s)  #012#011CREATE  
INDEX `index_horde_activesync_device_users_on_device_id` ON#012#011   
`horde_activesync_device_users` (`device_id`) [pid 9946 on line 806 of  
"/var/www/webmail6/pear/php/Horde/Db/Adapter/Base.php"]
Jan 24 21:19:09 house HORDE: [horde] SQL  (0.0589s)  #012#011UPDATE  
horde_activesync_schema_info SET version = 1 [pid 9946 on line 806 of  
"/var/www/webmail6/pear/php/Horde/Db/Adapter/Base.php"]
Jan 24 21:19:09 house HORDE: [horde] SQL  (0.0009s)  #012#011SHOW  
TABLES [pid 9946 on line 806 of  
"/var/www/webmail6/pear/php/Horde/Db/Adapter/Base.php"]
Jan 24 21:19:09 house HORDE: [horde] SQL  (0.0005s)  #012#011SELECT  
version FROM horde_activesync_schema_info [pid 9946 on line 806 of  
"/var/www/webmail6/pear/php/Horde/Db/Adapter/Base.php"]
Jan 24 21:19:09 house HORDE: [horde] SQL  (0.2607s)  #012#011ALTER  
TABLE `horde_activesync_device_users` ADD `device_policykey`#012#011   
bigint DEFAULT 0 [pid 9946 on line 806 of  
"/var/www/webmail6/pear/php/Horde/Db/Adapter/Base.php"]
Jan 24 21:19:09 house HORDE: [horde] SQL  (0.2638s)  #012#011ALTER  
TABLE `horde_activesync_device` DROP `device_policykey` [pid 9946 on  
line 806 of "/var/www/webmail6/pear/php/Horde/Db/Adapter/Base.php"]
Jan 24 21:19:09 house HORDE: [horde] SQL  (0.0471s)  #012#011UPDATE  
horde_activesync_schema_info SET version = 2 [pid 9946 on line 806 of  
"/var/www/webmail6/pear/php/Horde/Db/Adapter/Base.php"]
Jan 24 21:19:09 house HORDE: [horde] SQL  (0.0009s)  #012#011SHOW  
TABLES [pid 9946 on line 806 of  
"/var/www/webmail6/pear/php/Horde/Db/Adapter/Base.php"]
Jan 24 21:19:09 house HORDE: [horde] SQL  (0.0004s)  #012#011SELECT  
version FROM horde_activesync_schema_info [pid 9946 on line 806 of  
"/var/www/webmail6/pear/php/Horde/Db/Adapter/Base.php"]
Jan 24 21:19:09 house HORDE: [horde] SQL  (0.2727s)  #012#011ALTER  
TABLE `horde_activesync_map` ADD `sync_clientid` varchar(255) [pid  
9946 on line 806 of  
"/var/www/webmail6/pear/php/Horde/Db/Adapter/Base.php"]
Jan 24 21:19:09 house HORDE: [horde] SQL  (0.0590s)  #012#011UPDATE  
horde_activesync_schema_info SET version = 3 [pid 9946 on line 806 of  
"/var/www/webmail6/pear/php/Horde/Db/Adapter/Base.php"]
Jan 24 21:19:10 house HORDE: [horde] Updated schema for  
horde_activesync. [pid 9946 on line 27 of  
"/var/www/webmail6/pear/php/Horde/Core/Notification/Handler/Decorator/Hordelog.php"]
Jan 24 21:19:10 house HORDE: [horde] SQL  (0.0010s)  #012#011SHOW  
TABLES [pid 9946 on line 806 of  
"/var/www/webmail6/pear/php/Horde/Db/Adapter/Base.php"]
Jan 24 21:19:10 house HORDE: [horde] SQL  (0.0009s)  #012#011SHOW  
TABLES [pid 9946 on line 806 of  
"/var/www/webmail6/pear/php/Horde/Db/Adapter/Base.php"]
Jan 24 21:19:10 house HORDE: [horde] SQL  (0.0002s)  #012#011SELECT  
version FROM horde_alarm_schema_info [pid 9946 on line 806 of  
"/var/www/webmail6/pear/php/Horde/Db/Adapter/Base.php"]

Again there are no errors reported in syslog (which is where I'm  
sending the debug logging).

I have ensured the ownership of the directory chown -R  
www-data.www-data /var/www/webmail6/ before I did the Update all DB  
schemas button in the Administration interface.

Sorry for being such a pain with this :(

I really appreciate the help!

>>>> From looking through the files in  
>>>> pear/data/Horde_ActiveSync/migration/ I am concerned that there  
>>>> might be more than just the horde_activesync_cache table missing.  
>>>>  However not being familiar enough with Horde 5 yet I am not 100%  
>>>> sure.
>>>>
>>>> Is there an alternative way to actually trigger the creation of  
>>>> the missing tables considering the Configuration screen shows the  
>>>> DB Schema to be ready?
>>>>
>>>> Also I have tried to fix the database using the horde-db-migrate  
>>>> script from the pear directory however the script errors when I  
>>>> run it, I am guessing here but I think it is throwing errors  
>>>> because I have installed pear in a new location rather than  
>>>> updating the system version of it.
>>>>
>>>> Quoting Michael J Rubinsky <mrubinsk at horde.org>:
>>>>
>>>>>
>>>>> If you don't want your install to provide email, you can disable  
>>>>> it in the administrative interface. This "mocks" the email  
>>>>> support, so the device thinks it is working.
>>>>> -- 
>>>>> mike
>>>>>
>>>>> The Horde Project (www.horde.org)
>>>>> mrubinsk at horde.org
>>>>
>>>> Hi Mike,
>>>>
>>>> Thanks for the assistance, I don't have a need for ActiveSync to  
>>>> provide email as I already have K9-Mail setup to access my  
>>>> mailbox via IMAP.  I left it enabled initially as was recommended  
>>>> by http://wiki.horde.org/ActiveSync#toc11 - The entry for Samsung  
>>>> Galaxy Nexus 4.1.2 (Jelly Bean) to ensure the initial folder sync  
>>>> occurred.  As I can't seem to even get the initial folder sync to  
>>>> happen email syncing at the moment is the last of my worries.
>>>>
>>>> Quoting Luis Felipe Marzagao <lfbm.andamentos at gmail.com>:
>>>>>
>>>>> That´s what I did here and sync is working just fine in two  
>>>>> Galaxy Note 2 devices, with multiple horde accounts. But I  
>>>>> always leave email sync on in the device. If I turn it off,  
>>>>> calendar won´t work.
>>>>>
>>>>> -- 
>>>>> Horde mailing list
>>>>> Frequently Asked Questions: http://horde.org/faq/
>>>>> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>>>>
>>>> Thanks for the input Luis, I'm glad to know that I should be able  
>>>> to get it work, as mentioned above to Jan it may be related to  
>>>> the issue with the table creation :(
>>>>
>>>> I really appreciate the tip that I will have to leave email  
>>>> syncing enabled otherwise the calendar may stop syncing!
>>>>
>>>> Thanks for any further assistance anyone can provide.
>>>>
>>>> Brett
>>>
>>>
>>> -- 
>>> Jan Schneider
>>> The Horde Project
>>> http://www.horde.org/
>>>
>>> -- 
>>> Horde mailing list
>>> Frequently Asked Questions: http://horde.org/faq/
>>> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>>
>> Thanks,
>>
>> Brett
>
>
> -- 
> Jan Schneider
> The Horde Project
> http://www.horde.org/
>
> -- 
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org

Thanks Brett



More information about the horde mailing list