Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
420 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 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...