Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Raindrifter opened this issue Feb 20, 2024 · 2 comments
Open

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

Raindrifter opened this issue Feb 20, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Raindrifter
Copy link

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
@Raindrifter Raindrifter added the bug Something isn't working label Feb 20, 2024
@Raindrifter
Copy link
Author

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})

@kamikazechaser
Copy link
Collaborator

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants