博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Elasticsearch 错误小结
阅读量:5871 次
发布时间:2019-06-19

本文共 1843 字,大约阅读时间需要 6 分钟。

报错1

[2019-01-15T12:36:59,779][ERROR][o.e.b.Bootstrap          ] Exceptionjava.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

报错2

[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=>"/"}

解决方法:

1、调用 ES 服务 curl :

{"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}

发现是出现了认证失败。

2、修改 logstash.conf 在 output 段里添加:

user => 'elastic'password => 'changeme'

3、修改 logstash.yml,添加:

xpack.monitoring.elasticsearch.url: "http://192.168.0.166:9200" xpack.monitoring.elasticsearch.username: "logstash_system" xpack.monitoring.elasticsearch.password: "changeme"

重启服务后OK。

报错3

Watcher:Error 400 Bad Request:Bad Request

Elasticsearch 错误小结

解决方法:

# vim elasticsearch.ymlxpack.watcher.enabled: true

重启服务后OK。

转载于:https://blog.51cto.com/qiangsh/2342821

你可能感兴趣的文章
解决eclipse中出现Resource is out of sync with the file system问题
查看>>
Java学习——对象和类
查看>>
Atitit.php nginx页面空白 并返回500的解决
查看>>
struts2 OGNL表达式
查看>>
Andriod使用webview控件往APP里内嵌网页
查看>>
二级菜单不同方法的实现
查看>>
第五章 mybatis批量更新update
查看>>
pacific-atlantic-water-flow(不错)
查看>>
[LeetCode] Add Strings 字符串相加
查看>>
项目总结
查看>>
GUI(图形用户界面)
查看>>
PAC自动代理文件格式,教你如何写PAC文件
查看>>
ElasticSearch 组合过滤器
查看>>
ZooKeeper 了解
查看>>
Java里的并发容器与安全共享策略总结
查看>>
linux命令stat,查看文件详细信息
查看>>
win10 windows按钮右键没有命令提示符
查看>>
c#利用SWIG调用c++dll学习总结【转】
查看>>
英文名为什么最好不用joe?JOE英文名的寓意是什么?
查看>>
数据表设计的原则
查看>>