Hiredis: BZPOPMIN - "ERR unknown command 'BZPOPMIN'"

Created on 12 Mar 2019  Â·  4Comments  Â·  Source: redis/hiredis

I am trying to execute the BZPOPMIN command:

"BZPOPMIN OP:QUEUE:iviu:p00390 OP:QUEUE:iviu:p00160 10"

It fails with:

"ERR unknown command 'BZPOPMIN'"

I have tried all sorts of variations, lower case, and "BZPOPMIN tests", same failure.

If i execute the command via redis-cli:
```
BZPOPMIN OP:QUEUE:iviu:p00160 OP:QUEUE:iviu:p00390 10
1) "OP:QUEUE:iviu:p00390"
2) "{"database

There are no issues.

Does anyone have any advice on next steps ?

Most helpful comment

Hello @Intellipower

Most likely your Redis server's version is lower than 5.

On Tue, Mar 12, 2019, 19:12 Intelipower notifications@github.com wrote:

I forgot to mention, I have tried both redisCommand and redisCommandArgv
If i substitute "BRPOP" I get a usual response for no data.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/redis/hiredis/issues/649#issuecomment-472094612, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFx1_O0KL-vAkJ1dA8vMYhoXH3UNQYwVks5vV9_-gaJpZM4brbTd
.

All 4 comments

I forgot to mention, I have tried both redisCommand and redisCommandArgv
If i substitute "BRPOP" I get a usual response for no data.

Hello @Intellipower

Most likely your Redis server's version is lower than 5.

On Tue, Mar 12, 2019, 19:12 Intelipower notifications@github.com wrote:

I forgot to mention, I have tried both redisCommand and redisCommandArgv
If i substitute "BRPOP" I get a usual response for no data.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/redis/hiredis/issues/649#issuecomment-472094612, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFx1_O0KL-vAkJ1dA8vMYhoXH3UNQYwVks5vV9_-gaJpZM4brbTd
.

Hey, @roger-blain

Are you absolutely certain you're connecting to the exact same Redis instance using hiredis as you are using redis-cli?

Or are you potentially double quoting the command in hiredis, like this:

// This will return: 'ERR unknown command `'BZPOPMIN'`
redisReply *r = redisCommand(c, "'BZPOPMIN' %s %d", "myzset", 1);

If you can, please post a small snippet of code illustrating how you're attempting to use hiredis, which might help us diagnose the issue.

Gents you are spot on, I was inadvertently connecting to my local V4 server, when I thought I was connecting to my cloud server V5!

Thanks so much!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fenglonz picture fenglonz  Â·  4Comments

fenglonz picture fenglonz  Â·  15Comments

lumina7 picture lumina7  Â·  5Comments

ShePastAway0 picture ShePastAway0  Â·  7Comments

kenden picture kenden  Â·  5Comments