0
votes

I am facing issue while trying to use the UNLINK command with redis. Version that I am using is 5.0.8.

Any work around with this?

 root@test:/tmp/redis-stable# redis-cli --version 
 redis-cli 5.0.8
 root@test:/tmp/redis-stable# redis-cli
 127.0.0.1:6379> keys
 (error) ERR wrong number of arguments for 'keys' command
 127.0.0.1:6379> keys *
 1) "51"
 2) "key2"
 3) "key1"
 127.0.0.1:6379>
 127.0.0.1:6379>
 127.0.0.1:6379>
 127.0.0.1:6379> UNLINK key1
 (error) ERR unknown command 'UNLINK'
 127.0.0.1:6379>
 127.0.0.1:6379>
 127.0.0.1:6379>
 127.0.0.1:6379> UNLINK key1 key2
 (error) ERR unknown command 'UNLINK'
 127.0.0.1:6379>
 127.0.0.1:6379>
 127.0.0.1:6379>

Is this a known issue or any version specific version..

Regards, Vicky

1
What version does INFO server return? The --version switch only tells you about the cli's version... - Itamar Haber
@ItamarHaber: Thanks for the information, and I can see the problem I get the following: # Server redis_version:3.0.6 I upgraded my local installation on untuntu 16.04.. is there some file specific I can cross check this? - Vicky
Thanks @ItamarHaber, on doing a SHUTDOWN from redis-cli and again starting the redis-server, resolved the issue. I am marking this as a valid answer! - Vicky
Great, happy I could point you in the right direction and happy hunting! - Itamar Haber

1 Answers

2
votes

Thanks @ItamarHaber,

I did had an upgraded version of 5.0.8 running but seems the old version was being picked up.

On doing a SHUTDOWN from redis-cli and again starting the redis-server, resolved the issue.