elasticsearch v7.x开放外网访问

rpm方式安装elasticsearch,版本elasticsearch-7.7.0-x86_64.rpm

顺带记录个国内镜像(HW),官方的慢的不要不要的->> 戳我点开

安装完成后,正常启动本地访问正常,想着用外网看一下,结果碰到问题了,根本无法启动elasticsearch进程,报错elasticsearch.pid --quiet (code=exited, status=78)。

-bash-4.2$ service elasticsearch start

elasticsearch.service - Elasticsearch

  Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)

  Active: failed (Result: exit-code) since Wed 2020-03-18 11:45:40 CST; 1min 7s ago

    Docs: http://www.elastic.co

 Process: 7682 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=78)

Main PID: 7682 (code=exited, status=78)


解决方法:

配置文件:vi /etc/elasticsearch/elasticsearch.yml


network.host: 0.0.0.0

discovery.seed_hosts: ["0.0.0.0"]



再次重启服务后就成功了

-bash-4.2$ systemctl start elasticsearch.service


[[email protected] ~]# netstat -ntlp|grep 9200

记录的幺蛾子,以后可能还有很多。。。。难受


发表评论

表情(⊙o⊙)…
看不清楚?点图切换 Ctrl+Enter快速提交

网友评论(0)

sitemap