# Retrying failed action with response code: 503

**URL:** <https://discuss.elastic.co/t/retrying-failed-action-with-response-code-503/24635>\
**Category:** Elasticsearch\
**Created:** [June 30, 2015, 3:26pm UTC](https://discuss.elastic.co/t/retrying-failed-action-with-response-code-503/24635 "2015-06-30T15:26:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![samding](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@samding](https://discuss.elastic.co/u/samding)\
**Post date:** [June 30, 2015, 3:26pm UTC](https://discuss.elastic.co/t/retrying-failed-action-with-response-code-503/24635/1 "2015-06-30T15:26:07Z")

</div>

I started both Elasticsearch(1.6.) and Logstash(1.5.1), but ES seems not working.  
Here is the conf of LS:

input {  
stdin { }  
}  
output {  
elasticsearch  
{ host =\> "zslesvm09:9300" } # it is the same if removing ":9300"  
stdout { }  
}

The output from LS:

INFO: [logstash-lozlnx23-53291-11306] started  
Logstash startup completed  
aaaaaaaaaaaa  
retrying failed action with response code: 503 {:level=\>:warn}  
2015-06-30T15:16:12.805Z lozlnx23 aaaaaaaaaaaa  
retrying failed action with response code: 503 {:level=\>:warn}  
retrying failed action with response code: 503 {:level=\>:warn}  
retrying failed action with response code: 503 {:level=\>:warn}  
too many attempts at sending event. dropping: 2015-06-30T15:16:12.805Z lozlnx23 aaaaaaaaaaaa {:level=\>:error}

ES uses the default configuration and output:  
....  
[2015-06-30 11:16:16,219][INFO][cluster.service] [Living Eraser] added {[logstash-lozlnx23-53291-11306][10jEd5FUTm2B7X8a4x-L2w][lozlnx23][inet[/9.26.176.232:9300]]{client=true, data=false},}, reason: zen-disco-receive(from master [[Ever][\_qEXm0RvRKaOqkEEGcAuvQ][[mako.torolab.ibm.com](http://mako.torolab.ibm.com)][inet[/9.26.54.179:9300]]])

....

Thanks,

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 2, 2015, 4:20am UTC](https://discuss.elastic.co/t/retrying-failed-action-with-response-code-503/24635/2 "2015-07-02T04:20:20Z")

</div>

What is the response if you `curl zslesvm09:9200`.

---

<div class="post-metadata">

**Author:** ![samding](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@samding](https://discuss.elastic.co/u/samding)\
**Post date:** [July 2, 2015, 2:50pm UTC](https://discuss.elastic.co/t/retrying-failed-action-with-response-code-503/24635/3 "2015-07-02T14:50:33Z")

</div>

Sorry, the ES version is 1.5.2 (1.6.0 seems working),

curl zslesvm09:9200  
{  
"status" : 200,  
"name" : "Citizen V",  
"cluster\_name" : "elasticsearch",  
"version" : {  
"number" : "1.5.2",  
"build\_hash" : "62ff9868b4c8a0c45860bebb259e21980778ab1c",  
"build\_timestamp" : "2015-04-27T09:21:06Z",  
"build\_snapshot" : false,  
"lucene\_version" : "4.10.4"  
},  
"tagline" : "You Know, for Search"  
}

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 2, 2015, 9:33pm UTC](https://discuss.elastic.co/t/retrying-failed-action-with-response-code-503/24635/4 "2015-07-02T21:33:39Z")

</div>

A 503 from ES would usually indicate it's not available.

Next time you get that response I'd check `_cat/health`.

---

<div class="post-metadata">

**Author:** ![samding](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@samding](https://discuss.elastic.co/u/samding)\
**Post date:** [July 3, 2015, 5:09pm UTC](https://discuss.elastic.co/t/retrying-failed-action-with-response-code-503/24635/5 "2015-07-03T17:09:30Z")

</div>

I found the problem, here is the solution:

1. on ES config, need to define the cluster name (default is "elasticsearch" )
2. on LS config file, add cluster definition as the above the example:  
output {  
elasticsearch  
{ host =\> "zslesvm09:9300"  
cluster =\> \<cluster\_name\>} # cluster\_name defined @ ES  
stdout { }  
}

"cluster" is introduced by the latest LS 1.5.2.

Before we use the default definition that makes the LS cannot find the correct ES.

Thanks.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 4, 2015, 12:34am UTC](https://discuss.elastic.co/t/retrying-failed-action-with-response-code-503/24635/6 "2015-07-04T00:34:10Z")

</div>

The cluster config option has been around for quite some time.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:03am UTC](https://discuss.elastic.co/t/retrying-failed-action-with-response-code-503/24635/7 "2017-07-06T00:03:37Z")

</div>


