物理机无法访问虚拟机中的ES和Kibana

ES

1.修改ES的config目录中的配置文件elasticsearch.yml

network.host: 0.0.0.0

打开注释

cluster.initial_master_nodes: ["node-1", "node-2"]

在这里插入图片描述
2.启动ES服务出现如下报错信息:

ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

3.在/etc/security/limits.conf文件中添加如下内容:

* soft nofile 65536
* hard nofile 65536

4.在/etc/sysctl.conf文件中添加如下内容:

vm.max_map_count=262144

5.运行命令:

sysctl -p

6.重新运行ES,通过物理机即可访问ES服务。

Kibana

1.修改kibana的config目录中的配置文件kibana.yml

server.host: "0.0.0.0"

在这里插入图片描述
2.重启kibana服务,即可通过物理机访问。

如果还是不能访问,尝试关闭防火墙

systemctl stop firewalld

猜你喜欢

转载自blog.csdn.net/weixin_43074760/article/details/130867522