高峰只对攀登它而不是仰望它的人来说才有真正意义。

logstash 发请求到elasticsearch 报503错误

Logstash | 作者 yuntun | 发布于2017年11月01日 | 阅读数:12948

第一次搭建logstash 和elastseartch

执行命令
../bin/logstash -e 'input { stdin { } } output { elasticsearch { hosts => ["10.1.27.232:9200"] } }'  


报错
[2017-11-01T20:11:23,829][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://10.1.27.232:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError, :error=>"Got response code '503' contacting Elasticsearch at URL '[url=http://10.1.27.232:9200]http://10.1.27.232:9200/'"}
[/url]




通过浏览器访问  http://10.1.27.232:9200/
{

"name": "89LNlJb",
"cluster_name": "elasticsearch",
"cluster_uuid": "_na_",
"version": {
"number": "5.6.3",
"build_hash": "1a2f265",
"build_date": "2017-10-06T20:33:39.012Z",
"build_snapshot": false,
"lucene_version": "6.6.1"
},
"tagline": "You Know, for Search"

}
[url=http://10.1.27.232:9200/_cat/indices?v&s=index&health=red]http://10.1.27.232:9200/_cat/i ... 3Dred[/url]
{

"error": {
"root_cause": [
{
"type": "cluster_block_exception",
"reason": "blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];"
}
],
"type": "cluster_block_exception",
"reason": "blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];"
},
"status": 503

}

求助。有哪位同学遇到过类似的问题么。
问题已解决。我是只在一台机器上搭建。 gateway.recover_after_nodes: 这个变量错配成了3,改成1后,好了
已邀请:

laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net

赞同来自:

503是网络问题 一般服务端不能访问异常报的错
排查下网络 防火墙 端口等

要回复问题请先登录注册