解决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文件

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

修改以下

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

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

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://www.net2asp.com/8fe2865555.html