Java connect Redis cluster times error: Could not get a resource from the pool

Source: Internet
Author: User
Tags redis cluster

Because this time wasted too much time, so just record this mistake, for everyone to reference

Check it out, the configuration is no problem, but on the Redis cluster machine can be, the error is as follows:

Exception in thread ' main ' redis.clients.jedis.exceptions.JedisConnectionException:Could not get a resource from the pool

Reason:

Because I was in the creation of the cluster when the IP address is: 127.0.0.1, not the computer access to the machine is not accessible, so re-create a cluster, the following command 127.0.0.1 change the cost machine IP

The wrong:

./redis-trib.rb  Create  --replicas  1   127.0.0.1:7001  127.0.0.1:7002 127.0.0.1:7003  127.0.0.1:7004  127.0.0.1:7005  127.0.0.1:7006

Correct:

./redis-trib.rb  Create  --replicas  1   native IP:7001  native IP:7002 Native IP: 7003  Native:7004  native IP:7005  native IP:7006

Java connect Redis cluster times error: Could not get a resource from the pool

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.