Redis: I have sentinel running locally but get No sentinels available. (Redis::CannotConnectError)
up vote
0
down vote
favorite
Locally I have a redis-sentinel running on with the following information
redis-cli -p 26379
127.0.0.1:26379> info
Server
redis_version:3.0.4
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:ee774adfcab9032f
redis_mode:sentinel
os:Darwin 16.7.0 x86_64
arch_bits:64
multiplexing_api:kqueue
gcc_version:4.2.1
process_id:53388
run_id:685daaf76ce1bf378011d851afa7742d6e2da10b
tcp_port:26379
uptime_in_seconds:10
uptime_in_days:0
hz:15
lru_clock:15224205
config_file:/usr/local/opt/redis/sentinel.conf
Sentinel
sentinel_masters:1
sentinel_tilt:0
sentinel_running_scripts:0
sentinel_scripts_queue_length:0
master0:name=mymaster,
status=odown,
address=127.0.0.1:6666,
slaves=2,
sentinels=1
This is my sentinel.conf file
I am using version 4.0.3 of the redis gem
in my rails app
When I open the gem for debugging and puts the sentinels
def sentinel_detect
puts "#@sentinels -- Sentinels"
@sentinels.each do |sentinel|
client = Client.new(@options.merge(
:host => sentinel[:host],
:port => sentinel[:port],
:reconnect_attempts => 0,
))
I get [:host=>"127.0.0.1", :port=>26379, :url=>"redis://mymaster", :role=>:master]
which I think is correct based on this documentation
When I start the Rails server I get No sentinels available. (Redis::CannotConnectError)
even though I have a sentinel running. What am I missing? I assume some configuration? Thanks in advance
ruby-on-rails redis redis-sentinel
add a comment |
up vote
0
down vote
favorite
Locally I have a redis-sentinel running on with the following information
redis-cli -p 26379
127.0.0.1:26379> info
Server
redis_version:3.0.4
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:ee774adfcab9032f
redis_mode:sentinel
os:Darwin 16.7.0 x86_64
arch_bits:64
multiplexing_api:kqueue
gcc_version:4.2.1
process_id:53388
run_id:685daaf76ce1bf378011d851afa7742d6e2da10b
tcp_port:26379
uptime_in_seconds:10
uptime_in_days:0
hz:15
lru_clock:15224205
config_file:/usr/local/opt/redis/sentinel.conf
Sentinel
sentinel_masters:1
sentinel_tilt:0
sentinel_running_scripts:0
sentinel_scripts_queue_length:0
master0:name=mymaster,
status=odown,
address=127.0.0.1:6666,
slaves=2,
sentinels=1
This is my sentinel.conf file
I am using version 4.0.3 of the redis gem
in my rails app
When I open the gem for debugging and puts the sentinels
def sentinel_detect
puts "#@sentinels -- Sentinels"
@sentinels.each do |sentinel|
client = Client.new(@options.merge(
:host => sentinel[:host],
:port => sentinel[:port],
:reconnect_attempts => 0,
))
I get [:host=>"127.0.0.1", :port=>26379, :url=>"redis://mymaster", :role=>:master]
which I think is correct based on this documentation
When I start the Rails server I get No sentinels available. (Redis::CannotConnectError)
even though I have a sentinel running. What am I missing? I assume some configuration? Thanks in advance
ruby-on-rails redis redis-sentinel
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Locally I have a redis-sentinel running on with the following information
redis-cli -p 26379
127.0.0.1:26379> info
Server
redis_version:3.0.4
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:ee774adfcab9032f
redis_mode:sentinel
os:Darwin 16.7.0 x86_64
arch_bits:64
multiplexing_api:kqueue
gcc_version:4.2.1
process_id:53388
run_id:685daaf76ce1bf378011d851afa7742d6e2da10b
tcp_port:26379
uptime_in_seconds:10
uptime_in_days:0
hz:15
lru_clock:15224205
config_file:/usr/local/opt/redis/sentinel.conf
Sentinel
sentinel_masters:1
sentinel_tilt:0
sentinel_running_scripts:0
sentinel_scripts_queue_length:0
master0:name=mymaster,
status=odown,
address=127.0.0.1:6666,
slaves=2,
sentinels=1
This is my sentinel.conf file
I am using version 4.0.3 of the redis gem
in my rails app
When I open the gem for debugging and puts the sentinels
def sentinel_detect
puts "#@sentinels -- Sentinels"
@sentinels.each do |sentinel|
client = Client.new(@options.merge(
:host => sentinel[:host],
:port => sentinel[:port],
:reconnect_attempts => 0,
))
I get [:host=>"127.0.0.1", :port=>26379, :url=>"redis://mymaster", :role=>:master]
which I think is correct based on this documentation
When I start the Rails server I get No sentinels available. (Redis::CannotConnectError)
even though I have a sentinel running. What am I missing? I assume some configuration? Thanks in advance
ruby-on-rails redis redis-sentinel
Locally I have a redis-sentinel running on with the following information
redis-cli -p 26379
127.0.0.1:26379> info
Server
redis_version:3.0.4
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:ee774adfcab9032f
redis_mode:sentinel
os:Darwin 16.7.0 x86_64
arch_bits:64
multiplexing_api:kqueue
gcc_version:4.2.1
process_id:53388
run_id:685daaf76ce1bf378011d851afa7742d6e2da10b
tcp_port:26379
uptime_in_seconds:10
uptime_in_days:0
hz:15
lru_clock:15224205
config_file:/usr/local/opt/redis/sentinel.conf
Sentinel
sentinel_masters:1
sentinel_tilt:0
sentinel_running_scripts:0
sentinel_scripts_queue_length:0
master0:name=mymaster,
status=odown,
address=127.0.0.1:6666,
slaves=2,
sentinels=1
This is my sentinel.conf file
I am using version 4.0.3 of the redis gem
in my rails app
When I open the gem for debugging and puts the sentinels
def sentinel_detect
puts "#@sentinels -- Sentinels"
@sentinels.each do |sentinel|
client = Client.new(@options.merge(
:host => sentinel[:host],
:port => sentinel[:port],
:reconnect_attempts => 0,
))
I get [:host=>"127.0.0.1", :port=>26379, :url=>"redis://mymaster", :role=>:master]
which I think is correct based on this documentation
When I start the Rails server I get No sentinels available. (Redis::CannotConnectError)
even though I have a sentinel running. What am I missing? I assume some configuration? Thanks in advance
ruby-on-rails redis redis-sentinel
ruby-on-rails redis redis-sentinel
edited Nov 11 at 21:49
asked Nov 11 at 16:12
srm
183414
183414
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53250622%2fredis-i-have-sentinel-running-locally-but-get-no-sentinels-available-redisc%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown