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










share|improve this question



























    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










    share|improve this question

























      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










      share|improve this question















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 11 at 21:49

























      asked Nov 11 at 16:12









      srm

      183414




      183414



























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          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






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          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





















































          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







          這個網誌中的熱門文章

          How to read a connectionString WITH PROVIDER in .NET Core?

          Node.js Script on GitHub Pages or Amazon S3

          Museum of Modern and Contemporary Art of Trento and Rovereto