[horde] active sync problem after upgrade Debian stretch to buster

Arjen de Korte build+horde at de-korte.org
Fri Nov 29 12:40:25 UTC 2019


Citeren r.j.baart at prompt.nl:

> Thank you for your answer.
>
> I removed the File_Fstab module.
>
> My memcache configuration was:
>
>    $conf['sessionhandler']['params']['track'] = true;
>    $conf['sessionhandler']['type'] = 'HashTable';
>    $conf['sessionhandler']['hashtable'] = true;

This doesn't work reliably (unfortunately). I assume you have a  
cluster of servers and you want to use memcache to share the session  
information between them. In that case, you need to configure this in  
the 'php.ini' file:

     session.save_handler = memcache
     session.save_path =  
'tcp://192.168.xxx.yyy:11211,tcp://192.168.xxx.zzz:11211,tcp://192.168.yyy.zzz:11211'

In the Horde configuration, you should then choose

     $conf['sessionhandler']['type'] = 'Builtin';
     $conf['sessionhandler']['hashtable'] = false;

If however, you only have a single server, it is probably detrimental  
to store your sessions on a different server. In that case,  
performance will be much better if you use the 'Builtin'  
sessionhandler (even if it is filebased).

>    $conf['hashtable']['params']['hostspec'] = array('192.168.xxx.yyy');
>    $conf['hashtable']['params']['port'] = array('11211');
>    $conf['hashtable']['params']['weight'] = array();
>    $conf['hashtable']['params']['persistent'] = true;
>    $conf['hashtable']['params']['compression'] = false;
>    $conf['hashtable']['params']['large_items'] = true;
>    $conf['hashtable']['driver'] = 'Memcache';
>
> This is another server. Also a Debian but still the stretch distribution.

Only use an external memcache server if it is in a cluster of servers  
and you need shared storage between them. In pretty much every other  
use case, it is probably better to not use a hashtable at all (because  
of the network latency) or use a local memcache server instead.

> On 26-11-2019 22:03, Arjen de Korte wrote:
>> Citeren r.j.baart at prompt.nl:
>>
>>> Found the problem.
>>>
>>> I had two problems after the upgrade (Debian stretch -> buster and  
>>> PHP 7.0->7.3):
>>>
>>> 1) In the horde logfile:
>>>
>>> 2019-11-25T21:35:06+01:00 EMERG: HORDE [horde] ParseError: syntax  
>>> error, unexpected 'new' (T_NEW) in /usr/share/php/File/Fstab.php:110
>>> Stack trace:
>>> #0 /usr/share/php/Horde/Autoloader.php(65):  
>>> Horde_Autoloader->_include('/usr/share/php/...')
>>> #1 [internal function]: Horde_Autoloader->loadClass('File_Fstab')
>>> #2 [internal function]: spl_autoload_call('File_Fstab')
>>> #3 /home/websites/webmail/horde/lib/Test.php(646):  
>>> class_exists('File_Fstab')
>>> #4 /home/websites/webmail/horde/test.php(135):  
>>> Horde_Test->pearModuleCheck()
>>> #5 {main} [pid 26338 on line 74 of "/usr/share/php/Horde/ErrorHandler.php"]
>>>
>>> Solution: change line 110 in Fstab.php:
>>>
>>>             Existing line: $instances[$fstab] = &new  
>>> File_Fstab(array('file' => $fstab));
>>>             Changed line: $instances[$fstab] = new  
>>> File_Fstab(array('file' => $fstab));
>>
>> File_Fstab is not compatible with PHP-7.0+. Unless you really need  
>> it, it is probably better to uninstall it as it is no longer  
>> maintained (see https://pear.php.net/package/File_Fstab/). This  
>> *should* have failed on PHP-7.0, so the error message is probably  
>> not something new.
>>
>>> 2) In logfile:
>>>
>>> Access denied for user xyz at xx.yy per policy settings. etc.. See below
>>>
>>> Solution: disable memcache hasttable.
>>
>> Do you use memcache or memcached? The memcache module doesn't run  
>> on PHP-7, but as far as I know there are no issues with memcached.  
>> Check the version you're using.
>>
>>> On 25-11-2019 22:52, r.j.baart at prompt.nl wrote:
>>>> Hi,
>>>>
>>>> next problem is an active sync problem. For unknown reason the  
>>>> active sync validation does not work anymore. The errors:
>>>>
>>>> In the device logfile:
>>>>
>>>> 1006][2019-11-25T22:34:53+01:00] INFO:  
>>>> ----------Horde_Core_ActiveSync_Driver::authenticate() attempt  
>>>> for xyz at xx.yy----------
>>>> [1006][2019-11-25T22:34:53+01:00] INFO: Access denied for user  
>>>> xyz at xx.yy per policy settings.
>>>> [1006][2019-11-25T22:34:53+01:00] INFO: ----------SYNC request  
>>>> received for user
>>>>
>>>> In horde logfile:
>>>>
>>>> 2019-11-25T22:46:16+01:00 ERR: HORDE SQL QUERY FAILED:  
>>>> SQLSTATE[23502]: Not null violation: 7 ERROR:  null value in  
>>>> column "device_user" violates not-null constraint
>>>> DETAIL:  Failing row contains (ANDROIDC729032334, null, 0).
>>>>         INSERT INTO horde_activesync_device_users (device_id, device_user,
>>>>           device_policykey) VALUES('ANDROIDC729032334', NULL, 0)  
>>>> [pid 1006 on line 236 of  
>>>> "/usr/share/php/Horde/Db/Adapter/Pdo/Base.php"]
>>>> 2019-11-25T22:46:16+01:00 ERR: HORDE Returning HTTP 500 while  
>>>> handling FolderSync command. Error is: SQLSTATE[23502]: Not null  
>>>> violation: 7 ERROR:  null value in column "device_user" violates  
>>>> not-null constraint
>>>> DETAIL:  Failing row contains (ANDROIDC729032334, null, 0). [pid  
>>>> 1006 on line 160 of "/home/websites/webmail/horde/rpc.php"]
>>>> 2019-11-25T22:46:16+01:00 ERR: HORDE Error in communicating with  
>>>> ActiveSync server: SQLSTATE[23502]: Not null violation: 7 ERROR:  
>>>> null value in column "device_user" violates not-null constraint
>>>> DETAIL:  Failing row contains (ANDROIDC729032334, null, 0). [pid  
>>>> 1006 on line 165 of "/usr/share/php/Horde/Rpc/ActiveSync.php"]
>>>> 2019-11-25T22:46:16+01:00 ERR: HORDE #0  
>>>> /usr/share/php/Horde/ActiveSync/Device.php(397):  
>>>> Horde_ActiveSync_State_Sql->setDeviceInfo(Object(Horde_ActiveSync_Device),  
>>>> Array)
>>>> #1 /usr/share/php/Horde/ActiveSync.php(936):  
>>>> Horde_ActiveSync_Device->save()
>>>> #2 /usr/share/php/Horde/ActiveSync.php(794):  
>>>> Horde_ActiveSync->_handleDevice('ANDROIDC7290323...')
>>>> #3 /usr/share/php/Horde/Rpc/ActiveSync.php(143):  
>>>> Horde_ActiveSync->handleRequest('FolderSync', 'ANDROIDC7290323...')
>>>> #4 /home/websites/webmail/horde/rpc.php(160):  
>>>> Horde_Rpc_ActiveSync->getResponse(NULL)
>>>> #5 {main} [pid 1006 on line 165 of  
>>>> "/usr/share/php/Horde/Rpc/ActiveSync.php"]
>>>> 2019-11-25T22:46:16+01:00 ERR: HORDE Buffer contents:  [pid 1006  
>>>> on line 165 of "/usr/share/php/Horde/Rpc/ActiveSync.php"]
>>>> 2019-11-25T22:46:18+01:00 ERR: HORDE SQL QUERY FAILED:  
>>>> SQLSTATE[23502]: Not null violation: 7 ERROR:  null value in  
>>>> column "device_user" violates not-null constraint
>>>> DETAIL:  Failing row contains (ANDROIDC729032334, null, 0).
>>>>         INSERT INTO horde_activesync_device_users (device_id, device_user,
>>>>           device_policykey) VALUES('ANDROIDC729032334', NULL, 0)  
>>>> [pid 868 on line 236 of  
>>>> "/usr/share/php/Horde/Db/Adapter/Pdo/Base.php"]
>>>> 2019-11-25T22:46:18+01:00 ERR: HORDE Returning HTTP 500 while  
>>>> handling Provision command. Error is: SQLSTATE[23502]: Not null  
>>>> violation: 7 ERROR:  null value in column "device_user" violates  
>>>> not-null constraint
>>>> DETAIL:  Failing row contains (ANDROIDC729032334, null, 0). [pid  
>>>> 868 on line 160 of "/home/websites/webmail/horde/rpc.php"]
>>>> 2019-11-25T22:46:18+01:00 ERR: HORDE Error in communicating with  
>>>> ActiveSync server: SQLSTATE[23502]: Not null violation: 7 ERROR:  
>>>> null value in column "device_user" violates not-null constraint
>>>> DETAIL:  Failing row contains (ANDROIDC729032334, null, 0). [pid  
>>>> 868 on line 165 of "/usr/share/php/Horde/Rpc/ActiveSync.php"]
>>>> 2019-11-25T22:46:18+01:00 ERR: HORDE #0  
>>>> /usr/share/php/Horde/ActiveSync/Device.php(397):  
>>>> Horde_ActiveSync_State_Sql->setDeviceInfo(Object(Horde_ActiveSync_Device),  
>>>> Array)
>>>> #1 /usr/share/php/Horde/ActiveSync.php(936):  
>>>> Horde_ActiveSync_Device->save()
>>>> #2 /usr/share/php/Horde/ActiveSync.php(794):  
>>>> Horde_ActiveSync->_handleDevice('ANDROIDC7290323...')
>>>> #3 /usr/share/php/Horde/Rpc/ActiveSync.php(143):  
>>>> Horde_ActiveSync->handleRequest('Provision', 'ANDROIDC7290323...')
>>>> #4 /home/websites/webmail/horde/rpc.php(160):  
>>>> Horde_Rpc_ActiveSync->getResponse(NULL)
>>>> #5 {main} [pid 868 on line 165 of  
>>>> "/usr/share/php/Horde/Rpc/ActiveSync.php"]
>>>> 2019-11-25T22:46:18+01:00 ERR: HORDE Buffer contents:  [pid 868  
>>>> on line 165 of "/usr/share/php/Horde/Rpc/ActiveSync.php"]
>>>>
>>> -- 
>>>
>>> Cordialement,
>>>
>>> R.J. Baart





More information about the horde mailing list