joaojeronimo / node_redis_cluster

A thin wrapper over node_redis to make it work with Redis Cluster
53 stars 17 forks source link

Other node not connected #23

Open lucarosty opened 5 years ago

lucarosty commented 5 years ago

In the function connectToLink the link that has to be parsed is in the form ip>:<port>@<iport When the client (fastRedis or normal client) is created the string port>@<iport is used as port and the connection fail. The solution is changing the first line of code in the function with this two rows:

var ss = str.split('@'); var spl = ss[0].split(':');

lucarosty commented 5 years ago

Another suggestion is to change the line var link = ( flags === 'myself' || flags === 'myself,master || ... with the line: var link = items[1]. This is useful if the the cluster has a balanced virtual ip