解决ElasticSearch本地只能通过localhost访问不能通过IP访问的问题。

安装完成后只能通过localhost访问,不能通过ip进行访问,解决以下三点

1、检查防火墙是否已经关闭

        sudo systemctl status firewalld  查看防火墙状态 如果是active就修改

        sudo systemctl stop firewalld   关闭防火墙

        sudo systemctl disable firewalld   这个方式可以永久关闭防火墙

2、如果上面方式不行,需要配置 elasticsearch.yml配置文件中的network.host

        2.1、找到elasticsearch目录下的config目录中的elasticsearch.yml文件

修改以下

修改后重启es,可以直接通过ip访问

猜你喜欢

转载自blog.csdn.net/m0_73900214/article/details/133385189