0
votes

I created a Redis at GCP. Note it is GCP service, not a Redis created using compute engine. But when I run redis-cli and then run CLIENT command, like "client list", "client kill", etc. it showed:

(error) ERR unknown command 'client', with args beginning with: 

Look like it does not support command about CLIENT, and maybe some other commands as well.   If I run "info" in the redis-cli, it shows the version is: redis_version:4.0.14

  How to have the GCP managed Redis run command of "client"? I need to disconnect with all clients so I want to run "client kill".

if "client kill" is not available, can I use "shutdown" as a workaround? I am not sure if shutdown will terminate the redis or just stop it. if it just stops the redis and no data is lost, then I can use it as well.

1
Can you share the documentation consulted when using GCP managed redis? Did you use GCP documentation or Redis guides? - Jose Luis Delgadillo
I use redis.io/commands/client-kill. GCP redis blocked all CLIENT commands and SHUTDOWN command. - user389955

1 Answers

2
votes

Your issue is with CLIENT LIST command which currently is not available in Memorystore for Redis. Memorystore for Redis is a managed service and comes with some constraints. So some commands that interfere with a managed Redis service are blocked as per documentation.

As a workaround you can use the MONITOR command which is available for instances created after November 4, 2019. From the Redis documentation the MONITOR is a debugging command that streams back every command processed by the Redis server.

MONITOR will show the clients sending traffic to Redis server, as mentioned in this SO answer.

There is a PIT for this issue as Feature request. Please feel free to post there if you have further concern on that issue.