RedisException with message 'Redis server ha-sentinel-proxy:26379 went away
Closed this issue · 1 comments
I'm using this package to work with sentinel in Laravel 9 but I'm having problems connecting to the master. I have three sentinel hosts. These hosts are always available using HAProxy. But right now when I want to connect to the master, I'm facing this error: "RedisException with message 'Redis server ha-sentinel-proxy:26379 went away'"
We are using Kubernetes and this is the result of telnet
from one of the Laravel app pods to the sentinel (HAProxy):
$ telnet ha-sentinel-proxy 26379
Trying 10.104.11.114...
Connected to ha-sentinel-proxy.
Escape character is '^]'.
$ sentinel master master
*40
$4
name
$6
master
$2
ip
$14
192.168.23.131
$4
port
$4
6379
$5
runid
$40
e07ca62c09a3df9a1ac259a82e61a8f7b543da86
$5
flags
$6
master
$21
link-pending-commands
$1
0
$13
link-refcount
$1
1
$14
last-ping-sent
$1
0
$18
last-ok-ping-reply
$3
637
$15
last-ping-reply
$3
637
$23
down-after-milliseconds
$4
5000
$12
info-refresh
$4
5934
$13
role-reported
$6
master
$18
role-reported-time
$10
1248675536
$12
config-epoch
$1
0
$10
num-slaves
$1
0
$19
num-other-sentinels
$1
0
$6
quorum
$1
2
$16
failover-timeout
$5
10000
$14
parallel-syncs
$2
20
And this is the result of the telnet
to one of the Redises from the same pod
$ telnet 192.168.23.131 6379
Trying 192.168.23.131...
Connected to 192.168.23.131.
Escape character is '^]'.
And this is the config value from here:
^ array:13 [
"sentinel_host" => "ha-sentinel-proxy"
"sentinel_port" => 26379
"sentinel_service" => "master"
"sentinel_timeout" => 0.2
"sentinel_persistent" => null
"sentinel_retry_interval" => 0
"sentinel_read_timeout" => 0.0
"sentinel_password" => "masked"
"password" => null
"database" => 4
"serializer" => 1
"cluster" => "redis"
"parameters" => []
]
We can connect to the same sentinel service using predis
and monospice/laravel-redis-sentinel-drivers. As you know monospice/laravel-redis-sentinel-drivers
is not compatible with phpredis
and Laravel 9.
Any suggestions? Thank you
seems like it was a config issue on Redis password, writing the issue here helped me find it