Skip to content

Version 5.1.0 of the library breaks compatibility with 4.0 of the server #2968

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

Closed
tlhunter opened this issue May 20, 2025 · 3 comments · Fixed by #2969
Closed

Version 5.1.0 of the library breaks compatibility with 4.0 of the server #2968

tlhunter opened this issue May 20, 2025 · 3 comments · Fixed by #2969
Labels

Comments

@tlhunter
Copy link
Contributor

Description

I noticed that the v5.1.0 release of the Redis library break compatibility with the 4.0 release of the server:

Redis Client Error [SimpleError: ERR Syntax error, try CLIENT (LIST | KILL | GETNAME | SETNAME | PAUSE | REPLY)]

I have not looked into exactly which version of the Redis server is last compatible. E.g. I don't know if Redis server 5.0 is compatible with 5.1.0 of the library.

While Redis v4.0 is pretty old it would likely be considered a major change to stop supporting it.

Node.js Version

v22.13.1

Redis Server Version

4.0.14

Node Redis Version

5.1.0

Platform

macOS

Logs

@nkaradzhov
Copy link
Collaborator

Thanks for the catch. We test 3 versions back, hence why we didnt catch this. I will look into it.

@nkaradzhov
Copy link
Collaborator

CLIENT SETINFO <LIB-NAME|LIB-VER> is unsupported below redis server v7.2.0

redis server v7, v6, v5 all return the same error: ERR Unknown subcommand or wrong number of arguments for 'SETINFO'. Try CLIENT HELP which we ignore as per the recommendation.

redis server v4 returns different error: ERR Syntax error, try CLIENT (LIST | KILL | GETNAME | SETNAME | PAUSE | REPLY) which we didnt expect (since we didnt test with v4) and are actually throwing instead of ignoring.

Will provide a fix soon, [email protected] should have it.

@submarines-and
Copy link

For redis 7.2 (GCP) it also fails to connect with error below after this update. Not sure if related.

[SimpleError: ERR unknown command 'CLIENT', with args beginning with: 'SETINFO' 'LIB-VER' '5.0.1' ]

nkaradzhov added a commit to nkaradzhov/node-redis that referenced this issue May 21, 2025
As per the documentation (https://redis.io/docs/latest/commands/client-setinfo):

Client libraries are expected to pipeline this command after authentication on all connections and ignore failures since they could be connected to an older version that doesn't support them.

Turns out different versions of redis server return different errors, so its better to catch all.

fixes redis#2968
nkaradzhov added a commit that referenced this issue May 21, 2025
As per the documentation (https://redis.io/docs/latest/commands/client-setinfo):

Client libraries are expected to pipeline this command after authentication on all connections and ignore failures since they could be connected to an older version that doesn't support them.

Turns out different versions of redis server return different errors, so its better to catch all.

fixes #2968
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants