when one of redis master is down in docker spring boot redis lettuce client always try to reconnect which...





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I have a redis cluster with 3 Master 3 Slaves deployed in Docker. I'm using spring-boot 2.0.1. Final and following is the configuration




spring.cache.type=redis



spring.redis.cluster.nodes[0]=master.${REDIS_SERVICE_NAME}.service:6379



spring.redis.cluster.max-redirects=10



spring.redis.lettuce.pool.max-idle=10



spring.redis.lettuce.pool.max-wait=1s



spring.redis.lettuce.pool.min-idle=5



spring.redis.lettuce.pool.max-active=10



spring.cache.redis.time-to-live=10800s



spring.cache.redis.key-prefix=mds



spring.cache.redis.cache-null-values=false




master.redis.service:6379 is my redis service registered in consul ui. (Hashi corp service for service discovery). It is a load balancing url.



when one of my master container dies and is re-deployed in another container, spring boot redis client tries to establish a connection with an OLD ip(the ip of the container which is dead). Until this connection is established the app is blocked.



I tried create a custom CacheErrorHandler and it only handles RuntimeException and not this connection issue.



I want my app to ignore this and go to the DB if there is cache connection issue?



how to solve this issue?



2019-01-03 21:30:38.463 WARN 76 --- [ioEventLoop-4-7] i.l.core.protocol.ConnectionWatchdog : Cannot reconnect: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: /ipaddress:6379










share|improve this question































    0















    I have a redis cluster with 3 Master 3 Slaves deployed in Docker. I'm using spring-boot 2.0.1. Final and following is the configuration




    spring.cache.type=redis



    spring.redis.cluster.nodes[0]=master.${REDIS_SERVICE_NAME}.service:6379



    spring.redis.cluster.max-redirects=10



    spring.redis.lettuce.pool.max-idle=10



    spring.redis.lettuce.pool.max-wait=1s



    spring.redis.lettuce.pool.min-idle=5



    spring.redis.lettuce.pool.max-active=10



    spring.cache.redis.time-to-live=10800s



    spring.cache.redis.key-prefix=mds



    spring.cache.redis.cache-null-values=false




    master.redis.service:6379 is my redis service registered in consul ui. (Hashi corp service for service discovery). It is a load balancing url.



    when one of my master container dies and is re-deployed in another container, spring boot redis client tries to establish a connection with an OLD ip(the ip of the container which is dead). Until this connection is established the app is blocked.



    I tried create a custom CacheErrorHandler and it only handles RuntimeException and not this connection issue.



    I want my app to ignore this and go to the DB if there is cache connection issue?



    how to solve this issue?



    2019-01-03 21:30:38.463 WARN 76 --- [ioEventLoop-4-7] i.l.core.protocol.ConnectionWatchdog : Cannot reconnect: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: /ipaddress:6379










    share|improve this question



























      0












      0








      0








      I have a redis cluster with 3 Master 3 Slaves deployed in Docker. I'm using spring-boot 2.0.1. Final and following is the configuration




      spring.cache.type=redis



      spring.redis.cluster.nodes[0]=master.${REDIS_SERVICE_NAME}.service:6379



      spring.redis.cluster.max-redirects=10



      spring.redis.lettuce.pool.max-idle=10



      spring.redis.lettuce.pool.max-wait=1s



      spring.redis.lettuce.pool.min-idle=5



      spring.redis.lettuce.pool.max-active=10



      spring.cache.redis.time-to-live=10800s



      spring.cache.redis.key-prefix=mds



      spring.cache.redis.cache-null-values=false




      master.redis.service:6379 is my redis service registered in consul ui. (Hashi corp service for service discovery). It is a load balancing url.



      when one of my master container dies and is re-deployed in another container, spring boot redis client tries to establish a connection with an OLD ip(the ip of the container which is dead). Until this connection is established the app is blocked.



      I tried create a custom CacheErrorHandler and it only handles RuntimeException and not this connection issue.



      I want my app to ignore this and go to the DB if there is cache connection issue?



      how to solve this issue?



      2019-01-03 21:30:38.463 WARN 76 --- [ioEventLoop-4-7] i.l.core.protocol.ConnectionWatchdog : Cannot reconnect: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: /ipaddress:6379










      share|improve this question
















      I have a redis cluster with 3 Master 3 Slaves deployed in Docker. I'm using spring-boot 2.0.1. Final and following is the configuration




      spring.cache.type=redis



      spring.redis.cluster.nodes[0]=master.${REDIS_SERVICE_NAME}.service:6379



      spring.redis.cluster.max-redirects=10



      spring.redis.lettuce.pool.max-idle=10



      spring.redis.lettuce.pool.max-wait=1s



      spring.redis.lettuce.pool.min-idle=5



      spring.redis.lettuce.pool.max-active=10



      spring.cache.redis.time-to-live=10800s



      spring.cache.redis.key-prefix=mds



      spring.cache.redis.cache-null-values=false




      master.redis.service:6379 is my redis service registered in consul ui. (Hashi corp service for service discovery). It is a load balancing url.



      when one of my master container dies and is re-deployed in another container, spring boot redis client tries to establish a connection with an OLD ip(the ip of the container which is dead). Until this connection is established the app is blocked.



      I tried create a custom CacheErrorHandler and it only handles RuntimeException and not this connection issue.



      I want my app to ignore this and go to the DB if there is cache connection issue?



      how to solve this issue?



      2019-01-03 21:30:38.463 WARN 76 --- [ioEventLoop-4-7] i.l.core.protocol.ConnectionWatchdog : Cannot reconnect: io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to host: /ipaddress:6379







      spring spring-boot redis-cluster






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 4 at 3:02







      user1364861

















      asked Jan 4 at 2:56









      user1364861user1364861

      831113




      831113
























          0






          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',
          autoActivateHeartbeat: false,
          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%2f54032579%2fwhen-one-of-redis-master-is-down-in-docker-spring-boot-redis-lettuce-client-alwa%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54032579%2fwhen-one-of-redis-master-is-down-in-docker-spring-boot-redis-lettuce-client-alwa%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







          Popular posts from this blog

          Monofisismo

          Angular Downloading a file using contenturl with Basic Authentication

          Olmecas