Skip to content
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

Connecting to redis sentinel troubleshooting #64

Closed
bendpx opened this issue Jun 4, 2015 · 2 comments
Closed

Connecting to redis sentinel troubleshooting #64

bendpx opened this issue Jun 4, 2015 · 2 comments

Comments

@bendpx
Copy link

bendpx commented Jun 4, 2015

I'm trying to use this configuration for a sentinal connection

var REDIS_CONFIG = {
    sentinels: [{ host: 'redis-1', port: 26379},
                { host: 'redis-2', port: 26379},
                { host: 'redis-3', port: 26379}],
    name: 'redismastert',
    db: 0
};

var REDIS_CLIENT = new Redis(REDIS_CONFIG);

But connection fail to establish due to:

info: connected to sentinel redis-1:26379 successfully, but got a invalid reply: null
info: connected to sentinel redis-2:26379 successfully, but got a invalid reply: null
info: connected to sentinel redis-3:26379 successfully, but got a invalid reply: null

what is this invalid reply and how can i solve it?

thanks luin, love this library

@luin
Copy link
Collaborator

luin commented Jun 4, 2015

It's because sentinel nodes didn't return the master address.
Could you please use redis-cli to connect to one of the sentinel and see what does it return?

$ redis-cli -h redis-1 -p 26379
redis-1:26379> sentinel get-master-addr-by-name redismastert

I guess you misspelled the master name which should be redismaster instead of redismastert

@luin
Copy link
Collaborator

luin commented Jun 10, 2015

I'm closing the issue. Feel free to reopen it if the problem still here :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants