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

RESP3 protocol fails #2089

Closed
vortex314 opened this issue Apr 19, 2022 · 5 comments
Closed

RESP3 protocol fails #2089

vortex314 opened this issue Apr 19, 2022 · 5 comments
Labels

Comments

@vortex314
Copy link

In RESP3 redis interface the same redis client can subscribe and publish without additional connection.
However switching to RESP3 is not possible.

var redisClient = redis.createClient(REDIS_SERVER);

redisClient.on('error', (err) => console.log('Redis Client Error', err))
redisClient.on('connect', () => console.log('Redis Client connecting'))
redisClient.on('ready', () => {
    console.log('Redis Client ready')
       redisClient.hello({protover:"3"})
    //   redisClient.sendCommand(["hello", "3"])

    console.log(" psubscribe and hello ")
})
redisClient.on('reconnecting', () => console.log('Redis Client reconnecting'))
redisClient.connect()

fails with

nodemon] starting `node server.js index.js`
WebSocket server started at ws://locahost:3030
Redis Client connecting
Redis Client ready
 psubscribe and hello 
/home/lieven/workspace/redisDashboard/server/node_modules/redis-parser/lib/parser.js:190
  const err = new ParserError(
              ^

ParserError: Protocol error, got "%" as reply type byte
    at handleError (/home/lieven/workspace/redisDashboard/server/node_modules/redis-parser/lib/parser.js:190:15)
    at parseType (/home/lieven/workspace/redisDashboard/server/node_modules/redis-parser/lib/parser.js:304:14) {
  offset: 1,
  buffer: '{"type":"Buffer","data":[37,55,13,10,36,54,13,10,115,101,114,118,101,114,13,10,36,53,13,10,114,101,100,105,115,13,10,36,55,13,10,118,101,114,115,105,111,110,13,10,36,53,13,10,54,46,48,46,57,13,10,36,53,13,10,112,114,111,116,111,13,10,58,51,13,10,36,50,13,10,105,100,13,10,58,49,56,54,13,10,36,52,13,10,109,111,100,101,13,10,36,49,48,13,10,115,116,97,110,100,97,108,111,110,101,13,10,36,52,13,10,114,111,108,101,13,10,36,54,13,10,109,97,115,116,101,114,13,10,36,55,13,10,109,111,100,117,108,101,115,13,10,42,49,13,10,37,50,13,10,36,52,13,10,110,97,109,101,13,10,36,49,48,13,10,116,105,109,101,115,101,114,105,101,115,13,10,36,51,13,10,118,101,114,13,10,58,49,48,52,49,48,13,10,62,51,13,10,36,49,48,13,10,112,115,117,98,115,99,114,105,98,101,13,10,36,49,55,13,10,97,112,112,58,110,111,116,105,102,105,99,97,116,105,111,110,115,13,10,58,49,13,10]}'                                                                                                  
}

The same effect pops up if you use an older version redis-cli connecting to a RESP3 ready redis-server.

@leibale
Copy link
Contributor

leibale commented Apr 19, 2022

Duplicate of #1502

RESP 3 is not yet supported :(
We plan to add support for it in 4.2.0

@gabzim
Copy link

gabzim commented Jul 26, 2022

4.2.0 is out, does it mean there's support for RESP3 now? I tried looking at the changelog but it seems like it's missing versions since Jan this year.

@leibale
Copy link
Contributor

leibale commented Jul 26, 2022

@gabzim unfortunately, RESP3 is not yet supported
You can see the release notes in https://github.com/redis/node-redis/releases

@varadero
Copy link

Hopefully we will have RESP3 support in v5. I can see a pull request - #2485

@leibale
Copy link
Contributor

leibale commented Jan 16, 2024

@varadero RESP3 and sentinel support are the main features of v5 :)

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

No branches or pull requests

4 participants