Skip to content
This repository was archived by the owner on Jan 4, 2026. It is now read-only.
This repository was archived by the owner on Jan 4, 2026. It is now read-only.

slaveClient not able to resolve to an end point  #22

@vivekkrbajpai

Description

@vivekkrbajpai

Hi ,
I am using redis-sentinel with three sentinel server and 8 slave with one master.

Setup

8 machine each has redis 2.8.14 , out of these 3 machine having sentinel. They are monitoring a single master at machine 1.

Here is the piece of code i am using to get connected to a slaveClient

var endpoints = [
{host: 'host1', port: 26739},
{host:'host2',port:26739},
{host:'host3',port:26739}
];

 var opts = {}; // Standard node_redis client options
 var masterName = 'mymaster';
 var redisClient = sentinel.createClient(endpoints, masterName, opts);
 var slaveClient = sentinel.createClient(endpoints, masterName, {role: 'slave'});
 slaveClient.on("connect", function () {
 console.log("hey")

 console.log(redisClient.server_info)
});
slaveClient.on("error", function (err) {
console.log("err",err )
});

Most of the time it prints the "hey" and server_info but few times it neither print the "hey" nor server_info infact the entire node process hangs without printing any error.

Is there any thing i am doing wrong ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions