# Curator: Error with forcemerge

**URL:** <https://discuss.elastic.co/t/curator-error-with-forcemerge/136476>\
**Category:** Elasticsearch\
**Created:** [June 19, 2018, 11:06am UTC](https://discuss.elastic.co/t/curator-error-with-forcemerge/136476 "2018-06-19T11:06:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dawiro](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@dawiro](https://discuss.elastic.co/u/dawiro)\
**Post date:** [June 19, 2018, 11:06am UTC](https://discuss.elastic.co/t/curator-error-with-forcemerge/136476/1 "2018-06-19T11:06:27Z")

</div>

Hi,  
I'm seeing the following error with running forcemerge from curator:

```
{
	"@timestamp": "2018-06-19T07:14:14.643Z",
	"function": "run",
	"linenum": 184,
	"loglevel": "ERROR",
	"message": "Failed to complete action: forcemerge. <class 'curator.exceptions.FailedExecution'>: Exception encountered. Rerun with loglevel DEBUG and/or check Elasticsearch logs for more information. Exception: TransportError(504, u\"<html><body><h1>504 Gateway Time-out</h1>\\nThe server didn't respond in time.\\n</body></html>\\n\")",
	"name": "curator.cli"
}

```

## Action config looks like this:

actions:  
1:  
action: forcemerge  
description: "Index forcemerge test"  
options:  
max\_num\_segments: 1  
timeout\_override: 43200  
ignore\_empty\_list: true  
delay: 300  
continue\_if\_exception: false  
disable\_action: false  
filters:  
- filtertype: age  
source: name  
direction: older  
timestring: '%Y.%m.%d'  
unit: days  
unit\_count: 1  
- filtertype: forcemerged  
max\_num\_segments: 1  
exclude: true

I don't see anything suspicious in the elasticsearch logs but do see tasks queueing up so it looks like it's working. However, I've not yet seen an index get completely merged down to a single segment per shard.

Note: Curator is running from a docker container in kubernetes.

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [June 19, 2018, 12:28pm UTC](https://discuss.elastic.co/t/curator-error-with-forcemerge/136476/2 "2018-06-19T12:28:54Z")

</div>

5XX errors are server side, while Curator is a client side process. A 4XX error would indicate Curator made a bad call. A 504 error indicates that there is a proxy, load balancer, or other gateway between Curator and your Elasticsearch node. No matter what you set your `timeout_override` to, it's longer than the timeout the gateway (whatever type it may be) allows. More complete debug logging would show how long the client was connected, so you would be able to see this. It will be a nearly perfect amount of seconds, like 60, 120, or 300, usually.

This isn't something Curator can compensate for, unfortunately. Forcemerge doesn't record a \_task in the Tasks API, or set a lock in the cluster state or anything like that. A forcemerge sets an invisible block in the cluster state that prevents any other forcemerges from running while another is in progress. This is an opaque process, unfortunately, so Curator simply cannot see what's going on enough to reconnect and resume after a 504 disconnect.

---

<div class="post-metadata">

**Author:** ![dawiro](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@dawiro](https://discuss.elastic.co/u/dawiro)\
**Post date:** [June 19, 2018, 12:30pm UTC](https://discuss.elastic.co/t/curator-error-with-forcemerge/136476/3 "2018-06-19T12:30:33Z")

</div>

Thanks, I'll have a look into how out load-balancers are set up

---

<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 17, 2018, 12:30pm UTC](https://discuss.elastic.co/t/curator-error-with-forcemerge/136476/4 "2018-07-17T12:30:39Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
