catalyst / moodle-cachestore_redissentinel

adds support for redis sentinel
2 stars 2 forks source link

Unable to connect to Redis Sentinel serves #2

Closed ludiegu closed 3 years ago

ludiegu commented 3 years ago

Hello, I have installed the plugin on a moodle 3.9.2 but it doesn't seem to work. The store has the following parameters:

Sentinel servers: 10.0.111.131,10.0.111.132,10.0.111.133
Sentinel group: sentinel
Key Prefix: (null)

the sentinels are reachable:

redis-cli -h 10.0.111.131 -p 26379
10.0.111.131:26379>
redis-cli -h 10.0.111.132 -p 26379
10.0.111.132:26379>
redis-cli -h 10.0.111.133 -p 26379
10.0.111.133:26379>

but still, I have the following error:

Unable to connect to Redis Sentinel serves: 10.0.111.131,10.0.111.132,10.0.111.133
line 145 of /cache/stores/redissentinel/lib.php: call to debugging()
line 689 of /cache/locallib.php: call to cachestore_redissentinel->__construct()
line 47 of /cache/admin.php: call to cache_administration_helper::get_store_instance_summaries()

Is there any further configuration I should do? Thanks!

mrkskwsnck commented 3 years ago

@ludiegu Did you have any luck getting it to work? I′m stuck at the very same step.

mrkskwsnck commented 3 years ago

Finally, I got this plug-in to connect to my sentinel servers. The problem was just poor documentation.—As I was digging through the code (a.k.a. debugging) it came to me: One simply need to provide the server list along with the port number -_-

@ludiegu In your case it would be like that:

Sentinel servers: 10.0.111.131:26379,10.0.111.132:26379,10.0.111.133:26379
Sentinel group: sentinel
Key Prefix: (null)
danmarsden commented 3 years ago

Thanks to some improved documentation from @mrkskwsnck this should be easier to use - please create a new issue if you have any other problems!