Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
301 views
in Technique[技术] by (71.8m points)

google cloud platform - 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.

question from:https://stackoverflow.com/questions/65940303/cannot-run-client-command-at-gcp-managed-redis

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...