Reason analysis of Redis in virtual machine and virtual machine network configuration are not connected to host

Source: Internet
Author: User

1.

The best way to network is to bridge. I used "Network address translation (NAT)", resulting in the virtual machine with the command ifconfig to get the IP is 10.0.2.15, a strange feeling, and then on the real machine has not been connected. Some say with the real machine on the network Sharing center of the virtual machine IP, I found the 192.168.56.1, can ping the pass, but even dead. Oh, I've had a big day.

2.

The configuration of bind in redis.conf,

Change bind 127.0.0.1 to bind 0.0.0.0 that all addresses can be connected

3.

Some netizens said it might be a server firewall problem, he shut down the firewall to try

Systemctl Stop Firewalld.service Firewall off

The Netizen's virtual machine is centos7 default firewall, 7 The following default is Iptables, re-test, OK, connected.

Reason analysis of Redis in virtual machine and virtual machine network configuration are not connected to host

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.