6.0.0-beta1
7/3/25

[#14998] Support for redis-sentinel
Summary Support for redis-sentinel
Queue Horde Framework Packages
Type Enhancement
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester michael.menge (at) zdv (dot) uni-tuebingen (dot) de
Created 03/12/2020 (1939 days ago)
Due
Updated 06/08/2020 (1851 days ago)
Assigned
Resolved 03/12/2020 (1939 days ago)
Milestone
Patch Yes

History
06/08/2020 09:16:03 PM Jan Schneider Comment #13 Reply to this comment
Horde_Core 2.31.14 has been releases which should fix this.
06/08/2020 09:05:26 PM Git Commit Comment #12 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

commit c5a97ec86c4edb96de88106650ff93728edad991
Author: Jan Schneider <jan@horde.org>
Date:   Mon, 08 Jun 2020 23:03:50 +0200

[jan] Support Redis Sentinel configuration (Michael Menge 
<michael.menge@zdv.uni-tuebingen.de>, Request #14998).

  M doc/Horde/Core/changelog.yml
  M lib/Horde/Core/Factory/HashTable.php

https://github.com/horde/Core/commit/c5a97ec86c4edb96de88106650ff93728edad991
05/11/2020 01:00:58 PM michael (dot) menge (at) zdv (dot) uni-tuebingen (dot) de Comment #11 Reply to this comment
TLDR The Release of Horde 5.2.22 on 20.04.2020 enabled the configuration
of redis sentinel without the update of the Hashtable that is required 
to use redis sentinel.

Here is the Error message

EMERG: HORDE ERR unknown command `SETNX`, with args beginning with: 
`hht_45289762969fd88794817c4c5ad82ce6_l`, `1`,  [pid 22546 on line 370 
of "/usr/share/pear/Predis/Client.php"]

DEBUG: HORDE  1. Horde_Registry::appInit() /var/www/html/horde/index.php:18
  2. Horde_Registry->__construct() /usr/share/pear/Horde/Registry.php:287
  3. Horde_Session->setup() /usr/share/pear/Horde/Registry.php:535
  4. Horde_Session->start() /usr/share/pear/Horde/Session.php:188
  5. session_start() /usr/share/pear/Horde/Session.php:204
  6. Horde_SessionHandler->read()
  7. Horde_SessionHandler_Storage_Hashtable->read() 
/usr/share/pear/Horde/SessionHandler.php:169
  8. Horde_HashTable_Predis->lock() 
/usr/share/pear/Horde/SessionHandler/Storage/Hashtable.php:96
  9. Predis\Client->__call() /usr/share/pear/Horde/HashTable/Predis.php:187
10. Predis\Client->executeCommand() /usr/share/pear/Predis/Client.php:314
11. Predis\Client->onErrorResponse() /usr/share/pear/Predis/Client.php:335

SETNX is a Redis command, that can not be uses on theredis-sentinel server.

# grep hashtable conf.php
$conf['sessionhandler']['hashtable'] = false;
$conf['hashtable']['params']['hostspec'] = 
array('dbtest1.mail.localhost', 'dbtest2.mail.localhost', 
'dbtest.mail.localhost');
$conf['hashtable']['params']['port'] = array('26379', '26379', '26379');
$conf['hashtable']['params']['service'] = 'mymaster';
$conf['hashtable']['params']['replication'] = 'sentinel';
$conf['hashtable']['params']['protocol'] = 'tcp';
$conf['hashtable']['params']['persistent'] = false;
$conf['hashtable']['driver'] = 'Predis';

I have configured the redis-sentinel servers (Port 26379) but without 
the patch of
Horde/Core/Factory/HashTable.php which has not been released jet, Predis does
not know that that it is talking to the redis-sentinel

It works finde if the normal redis is configured (replication = none) 
but without the
advantages of redis-sentinel




05/08/2020 09:04:18 PM michael (dot) menge (at) zdv (dot) uni-tuebingen (dot) de Comment #10 Reply to this comment
It shouldn't result in a critical error if HashTable hasn't been 
updated yet. Which error is it?
I have already patched my test system again, i have will reproduce
the error on Monday,

But if you configure the sentinel servers without the updated hashtable
horde use the sentinel servers as redis servers, using the wrong protocol.

Also I use the hashtable as session store so this could influence the 
servility of the problem
.

05/08/2020 07:39:55 PM Jan Schneider Comment #9 Reply to this comment
It shouldn't result in a critical error if HashTable hasn't been 
updated yet. Which error is it?
05/04/2020 02:19:40 PM michael (dot) menge (at) zdv (dot) uni-tuebingen (dot) de Comment #8 Reply to this comment
With the release of horde 5.2.22 the option to configure redis 
sentinel setup is included in horde configuration pannel. But this 
feature requires a update of Horde/Core/Factory/HashTable.php to work 
or it will show a critical error.

Could you pleas release a new version of the pear Horde_Core package?
03/13/2020 02:30:00 PM Jan Schneider Comment #7 Reply to this comment
No, the framework packages don't have a FW_5_2 branch
03/13/2020 08:50:57 AM michael (dot) menge (at) zdv (dot) uni-tuebingen (dot) de Comment #6 Reply to this comment
IMHO this commit is missing for the FRAMEWORK_5_2 branch

[Show Quoted Text - 13 lines]
03/12/2020 08:05:45 PM Jan Schneider Comment #5
Assigned to Jan Schneider
State ⇒ Resolved
Reply to this comment
Committed, thanks!
03/12/2020 08:05:09 PM Git Commit Comment #4 Reply to this comment
Changes have been made in Git (master):

commit ed5e079d922a7ef60a88e14ec8ff13130883512d
Author: Jan Schneider <jan@horde.org>
Date:   Thu, 12 Mar 2020 21:05:22 +0100

[jan] Support Redis Sentinel configuration (Michael Menge 
<michael.menge@zdv.uni-tuebingen.de>, Request #14998).

  M config/conf.xml
  M doc/changelog.yml

https://github.com/horde/base/commit/ed5e079d922a7ef60a88e14ec8ff13130883512d
03/12/2020 08:04:25 PM Git Commit Comment #3 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

commit 698b6d795b8ba745d9122a6423742e172afde334
Author: Jan Schneider <jan@horde.org>
Date:   Thu, 12 Mar 2020 21:04:25 +0100

[jan] Support Redis Sentinel configuration (Michael Menge 
<michael.menge@zdv.uni-tuebingen.de>, Request #14998).

  M config/conf.xml
  M docs/changelog.yml

https://github.com/horde/base/commit/698b6d795b8ba745d9122a6423742e172afde334
03/12/2020 08:00:53 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit a1cb69533d3b37d86c15784ff472b2e46011ebc7
Author: Jan Schneider <jan@horde.org>
Date:   Thu, 12 Mar 2020 21:00:56 +0100

[jan] Support Redis Sentinel configuration (Michael Menge 
<michael.menge@zdv.uni-tuebingen.de>, Request #14998).

  M doc/Horde/Core/changelog.yml
  M lib/Horde/Core/Factory/HashTable.php

https://github.com/horde/Core/commit/a1cb69533d3b37d86c15784ff472b2e46011ebc7
03/12/2020 03:27:05 PM michael (dot) menge (at) zdv (dot) uni-tuebingen (dot) de New Attachment: redis-sentinel-base-config.patch Download
 
03/12/2020 03:26:25 PM michael (dot) menge (at) zdv (dot) uni-tuebingen (dot) de Comment #1
Priority ⇒ 2. Medium
State ⇒ New
New Attachment: redis-sentinel-core-factory.patch Download
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Support for redis-sentinel
Type ⇒ Enhancement
Reply to this comment
Redis Sentinel provides high availability for Redis 
(https://redis.io/topics/sentinel)
and is supported by Predis in Version v1.1.0 (2016-06-02)

The attached patches allow horde to use the feature

Saved Queries