Elasticsearch 安装踩坑小指南

Elasticsearch 安装踩坑小指南

请求9200 端口,没有返回值

  1. 查看控制台,控制台有告警信息
received plaintext http traffic on an https channel, closing connection  Netty4HttpChannel{localAddress=/127.0.0.1:9200, remoteAddress=/127.0.0.1:64389}
  1. 解决办法,修改elasticsearch.yml
xpack.security.enabled: false
xpack.security.enrollment.enabled: false

elasticHead 无法连接到es 集群上

es 的启动配置上没有添加跨域配置

	http.cors.enabled: true   
	http.cors.allow-origin: "*"

Kibna

Kibana server is not ready yet

  1. 查看kibna 控制台报错
Action failed with '[index_not_green_timeout] Timeout waiting for the status of the [.kibana_8.5.3_001] index to become 'green' Refer to https://www.elastic.co/guide/en/kibana/8.5/resolve-migrations-failures.html#_repeated_time_out_requests_that_eventually_fail for information on how to resolve the issue.'. Retrying attempt 6 in 64 seconds.
  1. 删除.kibana_task_manager_8.5.3_001 ,并重启,还是没有正常工作,
  2. 回头去解决elasticsearch head 上的集群健康值RED 的问题,可能是因为集群的问题导致kibna 一直报错

集群不能正常工作,健康值为RED

  1. 查看es控制台,发现控制台上有报错信息
 [2023-02-19T10:58:47,350][WARN ][o.e.c.r.a.DiskThresholdMonitor] [192.168.0.11] high disk watermark [90%] exceeded on [R2lGrq3hTiWJcRaAbBmc3w][192.168.0.11][/Users/xianbinggong/myDoc/workspace/elasticsearch-8.5.3/data] free: 32.6gb[7%], shards will be relocated away from this node; currently relocating away shards totalling [0] bytes; the node is expected to continue to exceed the high disk watermark when these relocations are complete

提示信息显示磁盘空间剩余7%,导致es 不能正常工作。
2. 解决办法,修改es 磁盘阈值

curl --location --request PUT '127.0.0.1:9200/_cluster/settings' \
--header 'Content-Type: application/json' \
--data-raw '{
   "transient":{
       "cluster.routing.allocation.disk.watermark.low":"90%",
       "cluster.routing.allocation.disk.watermark.high":"95%",
       "cluster.info.update.interval":"1m"
   }
}'

顺带也解决了之前kibna 链接不上的问题。

你可能感兴趣的:(elasticsearch)