First check whether the virtual machine is turned on, and then check whether the es in the virtual machine is turned on
First, let me introduce my environment:
The CentOS7 installed in the virtual machine and my local machine can ping each other.
The firewall of CentOs7 was also closed by me
No error is reported when starting es, and the elasticsearch.yml configuration file is changed to network.host: 0.0.0.0
Type the command curl ip:9200 in the virtual machine, and the correct result is also displayed.
However, when visiting the local browser using ip:9200, the connection fails, as shown in the figure below
That is likely to be the CentOs system in the virtual machine, and there is a problem with the network configuration in the local windows.
The ip setting of VM8 in Windows is the same as the ip in the virtual machine, just change it to a different ip.
As shown in the figure below, change the ip, as long as it is different from the ip set in the centos configuration file
The figure below is the network configuration file ifcfg-ens33 of CentOs7,
Restart the network systemctl restart network.service, restart es, and use a browser to access es without reporting an error. The normal results are as follows:
Well, congratulations, success! Kaisen! ! !
Source: https://blog.csdn.net/yanzhenjingfan/article/details/86769980