READONLY error when using Redis 6.2.2 Sentinel cluster on Kubernetes with dify-plugin-daemon 0.6.10-local

Open
#826 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Souravrajvi0 is already working on this.

Since Sep 26, 2026.

  • #829 by @Souravrajvi0 — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go, kubernetes, redis

Research direction

The error occurs in internal/cluster/cluster_lifetime.go at line 111. Start by examining the Redis client configuration and Sentinel connection logic in the cluster package. Check how the master address is resolved from Sentinel and ensure write operations target the master, not a replica. Review the Redis client library usage and any Sentinel-specific settings. Running the daemon in a test Kubernetes environment with a similar Sentinel setup would help reproduce and debug the issue.

Written by the indexing model from the issue text.

Description

dify version: 1.17.1
dify-plugin-daemon version: 0.6.10-local
Redis version: 6.2.22 with Sentinel cluster
Error log:
2026-09-23T15:11:03.617246426+08:00 2026-09-23T07:11:03.617064805Z ERROR dify-plugin-daemon cluster_lifetime.go:111 failed to lock the slot to be the master of the cluster error="READONLY You can't write against a read only replica.\nREADONLY You can't write against a read only replica.\nREADONLY You can't write against a read only replica."
2026-09-23T15:11:03.617266044+08:00 https://github.com/langgenius/dify-plugin-daemon/internal/cluster.(*Cluster).clusterLifetime
2026-09-23T15:11:03.617268602+08:00 /app/internal/cluster/cluster_lifetime.go:111

Bug description (ready for GitHub issue)

When running dify-plugin-daemon 0.6.10-local with Redis 6.2.2 Sentinel cluster, the daemon fails to acquire cluster slot lock. It reports READONLY You can't write against a read only replica. repeatedly at cluster_lifetime.go:111. It seems the Redis client is connecting to a replica node instead of the current master returned by Sentinel, causing write operations to fail.

Is dify-plugin-daemon-0.6.10-local not well supported for Redis 6.2.2 Sentinel clusters? Please help diagnose the root cause and provide a solution.It is deployed on Kubernetes.

Image
Dominant language
Go
Stars
462
Forks
326
Avg merge
22h 15m
Merged PRs (30d)
8

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from langgenius/dify-plugin-daemon

All issues in langgenius/dify-plugin-daemon

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.