[GH-ISSUE #826] [BUG] connect error when use older redis (undex7.2.x) #2429

Open
opened 2026-03-15 20:28:36 +03:00 by kerem · 2 comments
Owner

Originally created by @Raindrifter on GitHub (Feb 20, 2024).
Original GitHub issue: https://github.com/hibiken/asynq/issues/826

Originally assigned to: @hibiken on GitHub.

Describe the bug
when connect to older redis (undex7.2.x) , will report error.

To Reproduce
go.mod :
asynq v0.24.1
go-redis/v9 v9.5.0

Expected behavior

Screenshots

asynq: pid=34328 2024/02/20 05:44:55.832563 WARN: recoverer: could not list lease expired tasks: INTERNAL_ERROR: redis eval error: ERR Unknown subcommand or wrong number of arguments for 'setinfo'. Try CLIENT HELP
asynq: pid=34328 2024/02/20 05:44:55.870496 ERROR: Dequeue error: UNKNOWN: redis eval error: ERR Unknown subcommand or wrong number of arguments for 'setinfo'. Try CLIENT HELP
asynq: pid=34328 2024/02/20 05:44:55.919511 ERROR: Failed to write server state data: UNKNOWN: redis command error: SADD failed: ERR Unknown subcommand or wrong number of arguments for 'setinfo'. Try CLIENT HELP
asynq: pid=34328 2024/02/20 05:44:55.952470 WARN: recoverer: could not reclaim stale aggregation sets in queue "default": INTERNAL_ERROR: redis eval error: ERR Unknown subcommand or wrong number of arguments for 'setinfo'. Try CLIENT HELP

Environment (please complete the following information):

  • OS: Linux
  • Version of asynq package: asynq v0.24.1
Originally created by @Raindrifter on GitHub (Feb 20, 2024). Original GitHub issue: https://github.com/hibiken/asynq/issues/826 Originally assigned to: @hibiken on GitHub. **Describe the bug** when connect to older redis (undex7.2.x) , will report error. **To Reproduce** go.mod : asynq v0.24.1 go-redis/v9 v9.5.0 **Expected behavior** **Screenshots** ``` asynq: pid=34328 2024/02/20 05:44:55.832563 WARN: recoverer: could not list lease expired tasks: INTERNAL_ERROR: redis eval error: ERR Unknown subcommand or wrong number of arguments for 'setinfo'. Try CLIENT HELP asynq: pid=34328 2024/02/20 05:44:55.870496 ERROR: Dequeue error: UNKNOWN: redis eval error: ERR Unknown subcommand or wrong number of arguments for 'setinfo'. Try CLIENT HELP asynq: pid=34328 2024/02/20 05:44:55.919511 ERROR: Failed to write server state data: UNKNOWN: redis command error: SADD failed: ERR Unknown subcommand or wrong number of arguments for 'setinfo'. Try CLIENT HELP asynq: pid=34328 2024/02/20 05:44:55.952470 WARN: recoverer: could not reclaim stale aggregation sets in queue "default": INTERNAL_ERROR: redis eval error: ERR Unknown subcommand or wrong number of arguments for 'setinfo'. Try CLIENT HELP ``` **Environment (please complete the following information):** - OS: Linux - Version of `asynq` package: asynq v0.24.1
Author
Owner

@Raindrifter commented on GitHub (Feb 20, 2024):

Related issue:
redis/go-redis#2910
redis/go-redis#2911

temp resolve: opt.DisableIndentity = true


type FixedRedisClientOpt struct {
	Addr     string
	Password string
	DB       int
}

func (opt FixedRedisClientOpt) MakeRedisClient() interface{} {
	return redis.NewClient(&redis.Options{
		Addr:             opt.Addr,
		Password:         opt.Password,
		DB:               opt.DB,
		DisableIndentity: true,
	})
}

asynq.NewClient(FixedRedisClientOpt{Addr: "localhost:6379", Password: "password", DB: 0})

<!-- gh-comment-id:1953563469 --> @Raindrifter commented on GitHub (Feb 20, 2024): Related issue: redis/go-redis#2910 redis/go-redis#2911 temp resolve: opt.DisableIndentity = true ``` type FixedRedisClientOpt struct { Addr string Password string DB int } func (opt FixedRedisClientOpt) MakeRedisClient() interface{} { return redis.NewClient(&redis.Options{ Addr: opt.Addr, Password: opt.Password, DB: opt.DB, DisableIndentity: true, }) } asynq.NewClient(FixedRedisClientOpt{Addr: "localhost:6379", Password: "password", DB: 0}) ```
Author
Owner

@kamikazechaser commented on GitHub (Feb 23, 2024):

Known bug with v9.5.0. If you are using Redis elsewhere or sharing a connection pool, you can expect this problem. We will hold off on bumping go-redis in this library for now.

<!-- gh-comment-id:1960782411 --> @kamikazechaser commented on GitHub (Feb 23, 2024): Known bug with v9.5.0. If you are using Redis elsewhere or sharing a connection pool, you can expect this problem. We will hold off on bumping go-redis in this library for now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#2429
No description provided.