elasticsearch修改network.host无法正常启动

    科技2024-11-11  6

    elasticsearch修改network.host: 0.0.0.0后无法正常启动服务

    出现 Job for elasticsearch.service failed because the control process exited with error code. See “systemctl status elasticsearch.service” and “journalctl -xe” fo r details.

    1.用root用户登录

    # vim /etc/elasticsearch/elasticsearch.yml

    再修改discovery.seed_hosts: [“自己本地的ip”](如:192.168.1.1)

    2.重新启动服务

    # systemctl restart elasticsearch.service

    3.关闭防火墙

    # iptables -I INPUT -p tcp --dport 9200 -j ACCEPT

    4.外网访问

    就可以外网访问了

    Processed: 0.014, SQL: 8