Virtual machines Build Redis standalone and redis-cluster, and use Redis Desktop Manager and Java (Eclipse) to connect to the Redis process and encounter a problem summary

Source: Internet
Author: User
Tags redis desktop manager

If you see this, I default you have Redis installed and have successfully ping through the Linux system of the virtual machine.

Introduce my environment: VMware virtual Machine installs the CentOS 6.5 Linux system, Redis is 3.0.0. Host is WIN10, the use of Redis desktop Manager is a very old version of 0.7.9.809, indeed very old. But bloggers are just trying to test if they can connect, so don't dwell on the problem. The JAVA IDE is the eclipse Mars.

Well, in the virtual machine you can already successfully ping the pass, as

Now go to the chase!!!!!

I really was too angry!!! Although there are indeed a lot of people on the Internet to help you solve the problem in the learning process. But!!! Can not be copied and pasted!! Be responsible for what you write, okay?!!

From beginning to end, I read the Belais technical blog, the document, All is said bind 127.0.0.1 commented out (does need), protected mode changed to no set password host and virtual machine IP to be on the same network segment, etc. (no need at all) ... Or just stick a bunch of failure trace codes!! Even the kind of code that is not used to ask questions to stick up, who has that mood to see Ah!!!

Please be sure to promise me that the error code put the essence part will be OK!!!

Well, it's a complaint, and the next thing is the point!!

If you have run out of all of the above methods, or if Redis Desktop Manager cannot connect to Redis in a virtual machine, the culprit must be your virtual machine firewall.

The best test is not the firewall of the Linux system in the virtual machine in the way of the following tricks:

Open your WinDOS system cmd and knock telnet to the Linux system IP port number, such as: Telnet 192.168.18.133 6379

(The Linux system IP should know how to see, Knock Ifconfig take the first IP address to appear on the line)

If you are prompted that Telnet is not an internal or external instruction, open the Control Panel, and then click Something in the Rectangle box.

Please do not hesitate to restart the system when prompted to reboot!!!! Please do not hesitate to restart the system when prompted to reboot!!!! Please do not hesitate to restart the system when prompted to reboot!!!!

Online said to open Telnet client does not restart is Win7 system, win10 than Win7 arrogant Ah!! Do not restart will not allow your choice to take effect! The landlord here also took a detour, a bitter tears.

Setup is over, all your programs are closed after rebooting. This time you have to take the trouble, open your VMware, and then open your CentOS, then start your redis, and then test the ability to ping in CentOS. That is ..... Back to the original look.

After you finish, go to the CMD interface of Windows, knock telnet Linux system IP port number, if it appears dark quickly, then you can turn off the webpage .... Because this blog can not help you.

If it appears (of course I lose 6380 for the result of failure, you should lose the estimate is 6379)

That means your CentOS firewall is in the whole moth! Not obedient! Turn it off in the dark room for a little while! Let it willingly open the port you need, and then open it.

Tap the following code:

/etc/init.d/iptables stop

/sbin/iptables-i input-p TCP--dport 6379-j ACCEPT

/etc/init.d/iptables Save

Service Iptables Restart

Once you're done, you can check the code for the status of the open success:/etc/init.d/iptables status

If open success should be the case:

You pay attention to 6379, the other ports are my redis-cluster, the way to open the same, in the eclipse even when the cluster fails because the port is not open, the error code is:

(Error code for standalone version) Redis.clients.jedis.exceptions.JedisConnectionException:java.net.ConnectException:Connection refused: Connect

(Error code for cluster version) redis.clients.jedis.exceptions.JedisConnectionException:no reachable node in cluster

After opening the port, use the Telnet command to check if you can connect. If you are still unable to connect, shut down the firewall, and then open the firewall. Anyway, that's how I solved it .... If you have not solved the problem, please try the various reboots ... Anyway, you can not find another solution, it is better to use the universal Law of Network management-restart.

If you're lucky, you'll be in the dark, and then test with the Redis desktop Manager to see if you can connect successfully.

If it succeeds, the reaction is quick, and if you don't respond to it for a long time, the estimate fails, testconnection. I'm sorry, but I'm afraid I can't help you at the next Caishuxueqian. Good luck!

Virtual machines Build Redis standalone and redis-cluster, and use Redis Desktop Manager and Java (Eclipse) to connect to the Redis process and encounter a problem summary

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.