New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when i use the cluster(just one master node),it has an error #1296
Comments
Hi, It's really hard to say. I connect to a single cluster node as a matter of practice when testing new functionality and it works just fine for me. You can try to connect via redis-cli to see if the issue is actually in phpredis: Then make sure you're actually running in cluster mode by doing something like this: Make sure that cluster is actually enabled and that it's in an |
Same problem here (PHP 7.2, Redis 5.0.3, phpredis 4.2.0, on Ubuntu 18.04). INFO says |
Mkay. My problem that caused the above error was I didn't create the cluster. I expected |
Hey @TTSMike, You don't need to do all of that. With a recent version of You can probably just use
|
Cool, thanks for the tip. I was hoping to do it by hand initially just to better understand what was going on. Unfortunately that went badly so I aborted, and had to nuke my redis installation. I'll have to give that a try when I re-do our staging setup (I need to configure Live right now). |
OK good luck with your configuration. Here's the simplest by hand approach to spinning up a cluster that I can think of: …/cluster-config $ for p in $(seq 7000 7003); do redis-server --cluster-enabled yes --save "" --port $p --cluster-config-file node-$p.conf --daemonize yes; done
…/cluster-config $ redis-cli --cluster create 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 --cluster-replicas 0 |
Much appreciated. Thanks for all the tips. 😄 |
I'm going to close this issue since it doesn't seem to be a bug in phpredis. Feel free to reopen if I'm misunderstanding. |
I'm seeing this behaviour on
mycode:
$redis = new \RedisCluster(NULL, ['127.0.0.1:6380']);
it will throw an exception
"Couldn't map cluster keyspace using any provided seed"
how to fix it
The text was updated successfully, but these errors were encountered: