Linux – Unable to create redis cluster (sorry, unable to connect to node)

Unable to create redis cluster (sorry, unable to connect to node)… here is a solution to the problem.

Unable to create redis cluster (sorry, unable to connect to node)

I’m trying to follow redis cluster tutorial, but whenever I try to run:

./redis-trib.rb create --replicas 1 127.0.0.1:7000 127.0.0.1:7001 \
  127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005` 

I get the error :

[ERR] Sorry, can’t connect to node 127.0.0.1:7000

The server is running and I can use

Connect to port 7000

redis-cli -p 7000

What am I missing?

Solution

Turns out I set REDIS_URL in the .bashrc of the previous project. Apparently, the Redis gem is setting the password for that URL for all Redis connections (even though I’m not using that URL for my cluster).

Thanks to soveran in this question This possibility is pointed out

Related Problems and Solutions