简体   繁体   中英

Cannot run CLIENT command at GCP managed Redis

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM