Elasticsearch 服务器不接受连接

问题描述 投票:0回答:2

我尝试在 ubuntu 服务器上访问 Elastic Search,但在浏览器中收到 502 错误。

/var/log/elasticsearch/elasticsearch.log
中的内容看起来没什么用处。在
xpack.security.enabled: true
中设置
/etc/elasticsearch/elasticsearch.yml
后开始出现错误。删除该行后,它仍然不接受连接。

日志

[2021-08-16T18:25:17,658][INFO ][o.e.i.g.GeoIpDownloader  ] [primary-node] geoip database [GeoLite2-ASN.mmdb] is up to date, updated timestamp
[2021-08-16T18:25:17,804][INFO ][o.e.i.g.DatabaseRegistry ] [primary-node] downloading geoip database [GeoLite2-Country.mmdb] to [/tmp/elasticsearch-4936579661564518666/geoip-databases/_fum6PFWR8GpNoVibLiJrg/GeoLite2-Country.mmdb.tmp.gz]
[2021-08-16T18:25:17,807][INFO ][o.e.i.g.DatabaseRegistry ] [primary-node] downloading geoip database [GeoLite2-ASN.mmdb] to [/tmp/elasticsearch-4936579661564518666/geoip-databases/_fum6PFWR8GpNoVibLiJrg/GeoLite2-ASN.mmdb.tmp.gz]
[2021-08-16T18:25:17,812][INFO ][o.e.i.g.DatabaseRegistry ] [primary-node] downloading geoip database [GeoLite2-City.mmdb] to [/tmp/elasticsearch-4936579661564518666/geoip-databases/_fum6PFWR8GpNoVibLiJrg/GeoLite2-City.mmdb.tmp.gz]
[2021-08-16T18:25:18,156][INFO ][o.e.i.g.GeoIpDownloader  ] [primary-node] geoip database [GeoLite2-City.mmdb] is up to date, updated timestamp
[2021-08-16T18:25:18,254][INFO ][o.e.i.g.DatabaseRegistry ] [primary-node] database file changed [/tmp/elasticsearch-4936579661564518666/geoip-databases/_fum6PFWR8GpNoVibLiJrg/GeoLite2-ASN.mmdb], reload database...
[2021-08-16T18:25:18,257][INFO ][o.e.i.g.DatabaseRegistry ] [primary-node] database file changed [/tmp/elasticsearch-4936579661564518666/geoip-databases/_fum6PFWR8GpNoVibLiJrg/GeoLite2-Country.mmdb], reload database...
[2021-08-16T18:25:18,709][INFO ][o.e.c.r.a.AllocationService] [primary-node] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[legiscan_model_bills_production_20210816163135035][0]]]).
[2021-08-16T18:25:19,030][INFO ][o.e.i.g.GeoIpDownloader  ] [primary-node] geoip database [GeoLite2-Country.mmdb] is up to date, updated timestamp
[2021-08-16T18:25:19,816][INFO ][o.e.i.g.DatabaseRegistry ] [primary-node] database file changed [/tmp/elasticsearch-4936579661564518666/geoip-databases/_fum6PFWR8GpNoVibLiJrg/GeoLite2-City.mmdb], reload database...
elasticsearch ubuntu-21.04
2个回答
0
投票

来自Elasticsearch官方指南

启用 Elasticsearch 安全功能可启用基本身份验证,以便您可以通过用户名和密码身份验证运行本地集群。

自从您启用了 xpack.security 以来,您必须创建一个 elasticsearch 密码并使用此通行证连接到它:https://www.elastic.co/guide/en/elasticsearch/reference/current/security-minimal- setup.html#security-create-builtin-users

按照上面链接中的步骤创建密码,然后尝试使用用户名“elastic”和创建的密码再次连接


0
投票

检查启动日志文件的上部。可能还打印了其他错误。就我而言,最后一行也是关于尝试加载 geoip 数据库。实际根本原因是托管数据目录的路径上的磁盘空间不足。ElasticSearch 版本:

7.14.0

© www.soinside.com 2019 - 2024. All rights reserved.