redis-commander
redis-commander copied to clipboard
Cluster support
Hi,
Are there plans or forks to support Redis Clusters?
Would it be easy to switch to ioredis and would that be sufficient to work with a cluster?
Thanks!
:+1: support for ioredis, as we use Sentinel.
https://github.com/joeferner/redis-commander/pull/169
FWIW: Redis Sentinel and Redis Cluster are 2 completely different things. But ioredis seems to support both anyway
Hi.
Interested in support for redis cluster without sentinel.
let me know if you have any plans for this.
Thx a lot.
Hi,
its on the list but no higher priority right now. Did lots of preparation over last commits for that (refactoring and full sentinel support). But no timeline.
If you have time to prepare a PR i'll help and point you to the parts needed...
Thx @sseide, at the moment I also can't allocate time for it, busy with another job I have now.
Thx for all this great work so far.
Hello everyone, redis-ui come recently with cluster support ;) https://github.com/patrikx3/redis-ui#features
Hello everyone, redis-ui come recently with cluster support ;) https://github.com/patrikx3/redis-ui#features
Doesn't support sentinel
is there any update about cluster connection support?
finally found some time to add cluster support - latest version from "master" and latest docker image support it. All possible ways to configure it are added to the documentation.
in short either use:
redis-commander --redis-host localhost --redis-port 6379 --is-cluster
or
redis-commander --clusters localhost:6379,10.2.3.4:6379
Feedback appreciated.
Hello everyone,
Thanks a lot @sseide for adding the cluster feature !
I tested on our Redis cluster and encountered errors when creating a new key
Here is our configuration :
- server "bounce" : is running redis-commander
- server redis21 : is running Redis master1, 192.168.21.91:7000
- server redis22 : is running Redis master2, 192.168.21.92:7000
- server redis23 : is running Redis master3, 192.168.21.93:7000 the cluster is a full Redis cluster, without Sentinel. It is running 100% fine. For your information : each master has two salve replicas.
Problems :
1/ launching redis-commander with the following command triggers an error "unable to connect to localhost" (but I am not asking to connect to localhost :-) )
# redis-commander --clusters lxc-redis21-infra:7000,lxc-redis22-infra:7000,lxc-redis23-infra:7000 --redis-password xxxx
Using scan instead of keys
No Save: false
listening on 0.0.0.0:8081
access with browser at http://127.0.0.1:8081
setUpConnection (R:localhost:6379:0) Redis error Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1138:16)
2/ launching redis-commander with the following command triggers an error when writing a key and when a REDIRECT is sent by the node :
# redis-commander --redis-host lxc-redis22-infra --redis-port 7000 --redis-password xxx --is-cluster
Using scan instead of keys
No Save: false
listening on 0.0.0.0:8081
access with browser at http://127.0.0.1:8081
Redis Connection lxc-redis22-infra:7000 using Redis DB #0
saving key "anewkey"
saveKey ReplyError: MOVED 3560 192.168.21.92:7001
at parseError (/usr/local/lib/node_modules/redis-commander/node_modules/redis-parser/lib/parser.js:179:12)
at parseType (/usr/local/lib/node_modules/redis-commander/node_modules/redis-parser/lib/parser.js:302:14) {
command: { name: 'type', args: [ 'anewkey' ] }
}
Am I misunderstanding the way I should run redis-commander in a cluster configuration ? any help welcome !
@jbc-avk Thanks for the feedback i will have a look into it.
Short question: is it a "regular" Redis cluster or some DBaaS like ElasticCache/MemoryDB/...
It is a regular Redis cluster, running on Ubuntu 22 This is our own infrastructure
@sseide in addition, the same transaction from the same server using redis-cli is working fine :
# redis-cli -c -h 192.168.21.92 -p 7000 -a xxx
192.168.21.92:7000> SET anewkey valeur
-> Redirected to slot [3560] located at 192.168.21.92:7001
OK
192.168.21.92:7001> GET anewkey
"valeur"
192.168.21.92:7001>
Hello @sseide , do you need any additional information to troubleshoot ?
@jbc-avk i added some more code to hopefully handle it now in a better way.
Either using redis-commander --clusters lxc-redis21-infra:7000,lxc-redis22-infra:7000,lxc-redis23-infra:7000 --redis-password xxxx
or redis-commander --redis-host lxc-redis22-infra --redis-port 7000 --redis-password xxx
should be fine now.
The --is-cluster
should not be needed normally if it can detect that the redis server given is working with cluster mode enabled. It is just there to force cluster mode or speed up inital connection to not have to check wether it is a cluster or not.
@sseide thanks for your reply
unfortunately, no change on my side : I may have done something wrong ?
- ran npm update
- version is 0.8.0 (--version)
- deleted the local config file
- launched redis-commander with the suggested parameters
==> got the same errors :
redis-commander wants to connect to localhost, triggering an error : redis-commander --clusters lxc-redis21-infra:7000,lxc-redis22-infra:7000,lxc-redis23-infra:7000 --redis-password xxxx
Using scan instead of keys
No Save: false
listening on 0.0.0.0:8081
access with browser at http://127.0.0.1:8081
setUpConnection (R:localhost:6379:0) Redis error Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1138:16)
impossible to create a key when using : redis-commander --redis-host lxc-redis22-infra --redis-port 7000 --redis-password xxx
saving key "a"
saveKey ReplyError: MOVED 15495 192.168.21.92:7002
at parseError (/home/nodejs-redis-commander/node_modules/redis-parser/lib/parser.js:179:12)
at parseType (/home/nodejs-redis-commander/node_modules/redis-parser/lib/parser.js:302:14) {
command: { name: 'type', args: [ 'a' ] }
}
Thanks for the reply.
The fixes are in github and docker image only right now. Version 0.8.0 is to old. How did you installed it?
Either running latest docker image "ghcr.io/joeferner/redis-commander:latest" or doing an git clone
of this repo will get you the latest version. Might this be the reason nothing changed?
A new version is released to npm or as versioned docker image as soon is these things are fixed...
@sseide ok, I understand why I did not get the fixes I made the installation using nom install redis-commander on Ubuntu 22.04 This brings the version 0.8 only As I am not a Git / Node JS expert, I will wait for the final release and install it using npm again Just let me know when this happens many thanks !
ok - i understand. I hope the others give some feedback soon.
And it is not that complicated, one way to get the latest version is navigating to "Code" top menu, than on the right top side the green "Code " button -> "Download Zip".
After extracting the zip into a new directory change into the new redis-commander directory and run npm install
there (the directory where the package.json
file is, just use "npm install" without package name - it reads the local package.json
and installs everything mentioned there. Afterwards it is be ready to be used the same as doing an named installation as you did.
Hello, do we have any updates on this feature?
Hello All,
The latest release also have cluster support. You can check.
I have 0.8.0 installed from npm - the latest release. It does not support yet.
I'm using ghcr.io/joeferner/redis-commander:latest
and latest tag is 0.8.1
You can see details on https://github.com/joeferner/redis-commander/tags
Just update your version to 0.8.1
and restart the docker container with new commands. Here is the commit details here: https://github.com/joeferner/redis-commander/commit/861a2a1a00f6c4278159ca59ad613dbfd4d485cc
Best
I'm using
ghcr.io/joeferner/redis-commander:latest
and latest tag is0.8.1
You can see details on https://github.com/joeferner/redis-commander/tagsJust update your version to
0.8.1
and restart the docker container with new commands. Here is the commit details here: 861a2a1Best
How do I specify a parameter to run in cluster mode in k8s deployment? Can i use for cluster and all my nodes password in k8s deployment?
@yoomy set env vars IS_CLUSTER and CLUSTERS to point to your redis servers. If you set it directly on your deployment or via config map is at your decision...