[2019-01-15T12:36:59,779][ERROR][o.e.b.Bootstrap ] Exception java.lang.IllegalStateException: failed to obtain node locks, tried [[/mnt/elasticsearch/data/my-application]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
解決方法:
elasticsearch.yml 配置文件最後添加: node.max_local_storage_nodes: 2
java
[2019-03-14T19:33:31,092][ERROR][logstash.outputs.elasticsearch] Attempted to send a bulk request to elasticsearch, but no there are no living connections in the connection pool. Perhaps Elasticsearch is unreachable or down? {:error_message=>"No Available connections", :class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::NoConnectionAvailableError", :will_retry_in_seconds=>64} [2019-03-14T19:33:34,819][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://logstash_system:xxxxxx@localhost:9200/, :path=>"/"}
解決方法:
一、調用 ES 服務 curl http://192.168.0.166:9200:node
{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication token for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"missing authentication token for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}
發現是出現了認證失敗。
二、修改 logstash.conf 在 output 段裏添加:vim
user => 'elastic' password => 'changeme'
三、修改 logstash.yml,添加:app
xpack.monitoring.elasticsearch.url: "http://192.168.0.166:9200" xpack.monitoring.elasticsearch.username: "logstash_system" xpack.monitoring.elasticsearch.password: "changeme"
重啓服務後OK。curl
Watcher:Error 400 Bad Request:Bad Request
解決方法:elasticsearch
# vim elasticsearch.yml xpack.watcher.enabled: true
重啓服務後OK。ide