OS:CentOS 7.6

按照官网手册使用yum安装,使用root 账户 systemtctl start elasticsearch.service

关闭防火墙,启动成功,本地访问成功,远程访问失败。

localhost:9200

127.0.0.1:9200

原因:elasticsearch出于安全策略考虑,默认仅开启了本地访问。需要额外配置远程访问。

备注:生产环境请设置密码,且不要直接开放0.0.0.0.

配置文件:

In Elastic Search 7.0 update /etc/elasticsearch/elasticsearch.yml

network.host: 0.0.0.0
network.bind_host: 0.0.0.0
network.publish_host: 0.0.0.0

补充:

discovery.seed_hosts: ["0.0.0.0", "[::0]"]

配置后重启 systemctl restart  elasticsearch.service 

如果重启失败请执行检查:journalctl -xe

相关文章:

  • 2021-06-16
  • 2021-05-20
  • 2021-12-28
  • 2021-04-12
  • 2021-06-03
  • 2022-01-13
  • 2021-06-02
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-03
  • 2021-08-05
  • 2021-07-27
  • 2021-11-20
  • 2021-04-06
  • 2021-08-18
相关资源
相似解决方案