1. Cannot open file logs/gc.log due to Permission denied
不能用root账户启动es,需要用es账户启动。 su essearch ./bin/elasticsearch
如果出现以上问题,则是因为用root启动过导致。到elasticsearch中的log中删除gc.log文件即可。
2. elasticsearch 启动不起来
当logstash正大量拥堵要写入的数据时,es是无法启动的负载太高,需要临时停止logstash作业。
3. 健康状态一直处于警告,es坏节点较多,无法分片
#重新分配
POST /_cluster/reroute?retry_failed=true
#查看集群状态
GET _cluster/health?pretty
4. logstash启动 nohup bin/logstash -f config/kafka2es.conf &>/dev/null &
5.Validation Failed: 1: this action would add [1] total shards, but this cluster currently has [1000]
es报错无法创建多余的分片,可调整分片数
PUT /_cluster/settings { "transient": { "cluster": { "max_shards_per_node":10000 } }