装了一个 elk
,来做日志系统 (自建的)
因为 kibana
需要公网开放,kibana
又不能设置账号密码,就只能给 Elasticsearch
设置账号密码了
设置账号密码后已经跑了一个多月了,但是最近几天突然不能用了。(部署在 k8s
中,现象是起不来,一直不停的 restart
)看了一下日志,关键日志如下:
ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
bootstrap check failure [1] of [1]: Transport SSL must be enabled if security is enabled on a [basic] license. Please set [xpack.security.transport.ssl.enabled] to [true] or disable security by setting [xpack.security.enabled] to [false]
ERROR: Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/logs/k8s-logs.log
完整日志
{"type": "server", "timestamp": "2022-09-13T06:21:57,000Z", "level": "INFO", "component": "o.e.x.s.a.s.FileRolesStore", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "parsed [0] roles from file [/usr/share/elasticsearch/config/roles.yml]" }
{"type": "server", "timestamp": "2022-09-13T06:21:59,520Z", "level": "INFO", "component": "o.e.i.g.ConfigDatabases", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "initialized default databases [[GeoLite2-Country.mmdb, GeoLite2-City.mmdb, GeoLite2-ASN.mmdb]], config databases [[]] and watching [/usr/share/elasticsearch/config/ingest-geoip] for changes" }
{"type": "server", "timestamp": "2022-09-13T06:21:59,524Z", "level": "INFO", "component": "o.e.i.g.DatabaseNodeService", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "initialized database registry, using geoip-databases directory [/tmp/elasticsearch-13072611735141131709/geoip-databases/Ot2R90xBSfqxqRIOMZw2OA]" }
{"type": "server", "timestamp": "2022-09-13T06:22:01,820Z", "level": "INFO", "component": "o.e.t.NettyAllocator", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=1mb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=true, g1gc_region_size=4mb, heap_size=512mb}]" }
{"type": "server", "timestamp": "2022-09-13T06:22:01,973Z", "level": "INFO", "component": "o.e.i.r.RecoverySettings", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]" }
{"type": "server", "timestamp": "2022-09-13T06:22:02,110Z", "level": "INFO", "component": "o.e.d.DiscoveryModule", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "using discovery type [zen] and seed hosts providers [settings]" }
{"type": "server", "timestamp": "2022-09-13T06:22:04,183Z", "level": "INFO", "component": "o.e.g.DanglingIndicesState", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually" }
{"type": "server", "timestamp": "2022-09-13T06:22:06,385Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "initialized" }
{"type": "server", "timestamp": "2022-09-13T06:22:06,387Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "starting ..." }
{"type": "server", "timestamp": "2022-09-13T06:22:06,435Z", "level": "INFO", "component": "o.e.x.s.c.f.PersistentCache", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "persistent cache index loaded" }
{"type": "server", "timestamp": "2022-09-13T06:22:06,436Z", "level": "INFO", "component": "o.e.x.d.l.DeprecationIndexingComponent", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "deprecation component started" }
{"type": "server", "timestamp": "2022-09-13T06:22:06,768Z", "level": "INFO", "component": "o.e.t.TransportService", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "publish_address {10.8.91.69:9300}, bound_addresses {0.0.0.0:9300}" }
{"type": "server", "timestamp": "2022-09-13T06:22:11,632Z", "level": "INFO", "component": "o.e.b.BootstrapChecks", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "bound or publishing to a non-loopback address, enforcing bootstrap checks" }
ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
bootstrap check failure [1] of [1]: Transport SSL must be enabled if security is enabled on a [basic] license. Please set [xpack.security.transport.ssl.enabled] to [true] or disable security by setting [xpack.security.enabled] to [false]
ERROR: Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/logs/k8s-logs.log
{"type": "server", "timestamp": "2022-09-13T06:22:11,711Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "stopping ..." }
{"type": "server", "timestamp": "2022-09-13T06:22:11,787Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "stopped" }
{"type": "server", "timestamp": "2022-09-13T06:22:11,788Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "closing ..." }
{"type": "server", "timestamp": "2022-09-13T06:22:11,826Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "closed" }
{"type": "server", "timestamp": "2022-09-13T06:22:11,829Z", "level": "INFO", "component": "o.e.x.m.p.NativeController", "cluster.name": "k8s-logs", "node.name": "es-cluster-0", "message": "Native controller process has stopped - no new native processes can be started" }
我希望是 Elasticsearch 有账号密码,并且不需要 ssl(不想要 https
,只要 http
)
不想 https 是因为还要去搞 ssl 证书啥的
我该怎么做?
使用的 es 版本是 7.17.5
出事之前只根据这个教程:记录一个 es license 过期的解决方案改过许可证。
一开始用的是 trial 许可证,现在是 basic
看起来 basic 许可必须用 ssl ,即用 https 。