mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-25 23:15:51 +03:00
[GH-ISSUE #959] [BUG] asynq can not follow the right redis master when using sentinel mode. #2488
Labels
No labels
CLI
bug
designing
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
idea
invalid
investigate
needs-more-info
performance
pr-welcome
pull-request
question
wontfix
work in progress
work in progress
work-around-available
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynq#2488
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hoorayman on GitHub (Nov 7, 2024).
Original GitHub issue: https://github.com/hibiken/asynq/issues/959
Originally assigned to: @hibiken, @kamikazechaser on GitHub.
Describe the bug
asynq can not follow the right redis master.
Environment:
asynqpackage version [e.g. v0.25.0]To Reproduce

use helm to install a redis cluster, with sentinel be set to true.
configure the asynq using sentinel:
Expected behavior
asynq can follow the right master and running normally.
Screenshots

go-redis can find the right master and change:
But asynq report error:
asynq: pid=1 2024/11/07 08:23:58.539202 ERROR: Dequeue error: UNKNOWN: redis eval error: READONLY You can't write against a read only replica. script: a8153319360adc71cdc370107f8ab9786f204765, on @user_script:3.
asynq: pid=1 2024/11/07 08:23:58.557608 ERROR: Failed to write server state data: UNKNOWN: redis command error: SADD failed: READONLY You can't write against a read only replica.
@kamikazechaser commented on GitHub (Nov 13, 2024):
This is most likely an issue with misconfiguration when using go-redis with Redis sentinel (Also, because you are running this in k8s, you will most likely have only 1 service that points to the redis sentinel endpoint). Could you debug a simple go-redis application first https://redis.uptrace.dev/guide/go-redis-sentinel.html#redis-server-client?
@hoorayman commented on GitHub (Apr 12, 2025):
It might be because I only configured one service name. I'll configure three headless services and observe again.