# Hpw to fix "failed to merge org.apache.lucene.store.AlreadyClosedException: this Directory is closed"

**URL:** <https://discuss.elastic.co/t/hpw-to-fix-failed-to-merge-org-apache-lucene-store-alreadyclosedexception-this-directory-is-closed/18896>\
**Category:** Elasticsearch\
**Created:** [July 25, 2014, 8:36am UTC](https://discuss.elastic.co/t/hpw-to-fix-failed-to-merge-org-apache-lucene-store-alreadyclosedexception-this-directory-is-closed/18896 "2014-07-25T08:36:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Warat\_Wongmaneekit](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@Warat\_Wongmaneekit](https://discuss.elastic.co/u/Warat_Wongmaneekit)\
**Post date:** [July 25, 2014, 8:36am UTC](https://discuss.elastic.co/t/hpw-to-fix-failed-to-merge-org-apache-lucene-store-alreadyclosedexception-this-directory-is-closed/18896/1 "2014-07-25T08:36:26Z")

</div>

_My log is something like this How I can solve this problem_

[2014-07-25 04:33:36,795][WARN][index.merge.scheduler] [Host88]  
[instagram][26] failed to merge

org.apache.lucene.store.AlreadyClosedException: this Directory is closed

at org.apache.lucene.store.BaseDirectory.ensureOpen(BaseDirectory.java:66)

at  
org.elasticsearch.index.store.Store$StoreDirectory.listAll(Store.java:353)

at  
org.apache.lucene.index.IndexFileDeleter.refresh(IndexFileDeleter.java:333)

at org.apache.lucene.index.IndexWriter.merge(IndexWriter.java:3758)

at  
org.apache.lucene.index.ConcurrentMergeScheduler.doMerge(ConcurrentMergeScheduler.java:405)

at  
org.apache.lucene.index.TrackingConcurrentMergeScheduler.doMerge(TrackingConcurrentMergeScheduler.java:107)

at  
org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:482)

_My cluster setting_  
{ "cluster\_name" : "zocialinc", "nodes" : { "WEbhsuSQQeCvYI\_s3I\_E0A" : {  
"name" : "Host98", "transport\_address" : "inet[/192.99.5.98:9300]",  
"host" : "[ns5000258.ip-192-99-5.net](http://ns5000258.ip-192-99-5.net)", "ip" : "192.99.5.98",  
"version" : "1.2.2", "build" : "9902f08", "http\_address" : "inet[/  
192.99.5.98:9299]", "attributes" : { "master" : "true" },  
"settings" : { "threadpool" : { "index" : { "type" :  
"fixed", "queue\_size" : "1000", "size" : "50" }  
}, "node" : { "data" : "true", "master" : "true",  
"name" : "Host98" }, "index" : {  
"number\_of\_replicas" : "1", "number\_of\_shards" : "50" },  
"http" : { "port" : "9299" }, "name" : "Host98",  
"path" : { "logs" : "/home/elasticsearch/logs", "home" :  
"/home/elasticsearch", "conf" : "/home/elasticsearch/config"  
}, "indices" : { "recovery" : { "max\_bytes\_per\_sec"  
: "200mb" } }, "cluster" : { "name" :  
"zocialinc" }, "script" : { "disable\_dynamic" : "false"  
}, "discovery" : { "zen" : {  
"minimum\_master\_nodes" : "3", "ping" : { "unicast" : {  
"hosts" : ["192.99.9.80", "198.27.70.88"] },  
"multicast" : { "enabled" : "false" },  
"timeout" : "30s" } } },  
"foreground" : "yes" }, "os" : { "refresh\_interval\_in\_millis"  
: 1000, "available\_processors" : 8, "cpu" : { "vendor" :  
"Intel", "model" : "Xeon", "mhz" : 3800,  
"total\_cores" : 8, "total\_sockets" : 8, "cores\_per\_socket" :  
16, "cache\_size\_in\_bytes" : 8192 }, "mem" : {  
"total\_in\_bytes" : 33705795584 }, "swap" : {  
"total\_in\_bytes" : 1071636480 } }, "process" : {  
"refresh\_interval\_in\_millis" : 1000, "id" : 27487,  
"max\_file\_descriptors" : 4096, "mlockall" : false }, "jvm" : {  
"pid" : 27487, "version" : "1.7.0\_65", "vm\_name" : "OpenJDK  
64-Bit Server VM", "vm\_version" : "24.65-b04", "vm\_vendor" : "Oracle  
Corporation", "start\_time\_in\_millis" : 1406002559510, "mem" : {  
"heap\_init\_in\_bytes" : 19327352832, "heap\_max\_in\_bytes" :  
19257622528, "non\_heap\_init\_in\_bytes" : 24313856,  
"non\_heap\_max\_in\_bytes" : 224395264, "direct\_max\_in\_bytes" :  
19257622528 }, "gc\_collectors" : [ "ParNew",  
"ConcurrentMarkSweep" ], "memory\_pools" : [ "Code Cache", "Par Eden  
Space", "Par Survivor Space", "CMS Old Gen", "CMS Perm Gen" ] },  
"thread\_pool" : { "generic" : { "type" : "cached",  
"keep\_alive" : "30s" }, "index" : { "type" : "fixed",  
"min" : 50, "max" : 50, "queue\_size" : "1k" },  
"snapshot\_data" : { "type" : "scaling", "min" : 1,  
"max" : 5, "keep\_alive" : "5m" }, "bench" : {  
"type" : "scaling", "min" : 1, "max" : 4,  
"keep\_alive" : "5m" }, "get" : { "type" : "fixed",  
"min" : 8, "max" : 8, "queue\_size" : "1k" },  
"snapshot" : { "type" : "scaling", "min" : 1, "max"  
: 4, "keep\_alive" : "5m" }, "merge" : { "type" :  
"scaling", "min" : 1, "max" : 4, "keep\_alive" :  
"5m" }, "suggest" : { "type" : "fixed", "min" :  
8, "max" : 8, "queue\_size" : "1k" }, "bulk" : {  
"type" : "fixed", "min" : 8, "max" : 8,  
"queue\_size" : "50" }, "optimize" : { "type" : "fixed",  
"min" : 1, "max" : 1 }, "warmer" : {  
"type" : "scaling", "min" : 1, "max" : 4,  
"keep\_alive" : "5m" }, "flush" : { "type" : "scaling",  
"min" : 1, "max" : 4, "keep\_alive" : "5m" },  
"search" : { "type" : "fixed", "min" : 24,  
"max" : 24, "queue\_size" : "1k" }, "percolate" : {  
"type" : "fixed", "min" : 8, "max" : 8,  
"queue\_size" : "1k" }, "management" : { "type" :  
"scaling", "min" : 1, "max" : 5, "keep\_alive" : "5m"  
}, "refresh" : { "type" : "scaling", "min" : 1,  
"max" : 4, "keep\_alive" : "5m" } }, "network" :  
{ "refresh\_interval\_in\_millis" : 5000, "primary\_interface" : {  
"address" : "192.99.5.98", "name" : "eth0",  
"mac\_address" : "08:60:6E:E5:C1:CE" } }, "transport" : {  
"bound\_address" : "inet[/0:0:0:0:0:0:0:0:9300]", "publish\_address" :  
"inet[/192.99.5.98:9300]" }, "http" : { "bound\_address" :  
"inet[/0:0:0:0:0:0:0:0:9299]", "publish\_address" : "inet[/  
192.99.5.98:9299]", "max\_content\_length\_in\_bytes" : 104857600 },  
"plugins" : [ { "name" : "marvel", "version" : "NA",  
"description" : "No description found.", "url" : "/\_plugin/marvel/",  
"jvm" : false, "site" : true }, { "name" : "paramedic",  
"version" : "NA", "description" : "No description found.",  
"url" : "/\_plugin/paramedic/", "jvm" : false, "site" : true  
} ] }, "gzaTyhMMSZyuQEJZhlhR-Q" : { "name" : "Host80",  
"transport\_address" : "inet[/192.99.9.80:9300]", "host" : "  
[ns501551.ip-192-99-9.net](http://ns501551.ip-192-99-9.net)", "ip" : "192.99.9.80", "version" : "1.2.2"  
, "build" : "9902f08", "http\_address" : "inet[/192.99.9.80:9299]",  
"attributes" : { "master" : "true" }, "settings" : {  
"threadpool" : { "index" : { "type" : "fixed",  
"queue\_size" : "1000", "size" : "50" } },  
"node" : { "data" : "true", "master" : "true",  
"name" : "Host80" }, "index" : { "number\_of\_replicas" :  
"1", "number\_of\_shards" : "50" }, "http" : {  
"port" : "9299" }, "name" : "Host80", "path" : {  
"logs" : "/home/elasticsearch/logs", "home" : "/home/elasticsearch"  
}, "indices" : { "recovery" : {  
"max\_bytes\_per\_sec" : "200mb" } }, "cluster" : {  
"name" : "zocialinc" }, "script" : { "disable\_dynamic"  
: "false" }, "discovery" : { "zen" : {  
"minimum\_master\_nodes" : "3", "ping" : { "unicast" : {  
"hosts" : ["192.99.5.98", "198.27.70.88"] },  
"multicast" : { "enabled" : "false" },  
"timeout" : "30s" } } },  
"foreground" : "yes" }, "os" : { "refresh\_interval\_in\_millis"  
: 1000, "available\_processors" : 8, "cpu" : { "vendor" :  
"Intel", "model" : "Xeon", "mhz" : 3800,  
"total\_cores" : 8, "total\_sockets" : 8, "cores\_per\_socket" :  
16, "cache\_size\_in\_bytes" : 8192 }, "mem" : {  
"total\_in\_bytes" : 33628487680 }, "swap" : {  
"total\_in\_bytes" : 1071636480 } }, "process" : {  
"refresh\_interval\_in\_millis" : 1000, "id" : 29729,  
"max\_file\_descriptors" : 4096, "mlockall" : false }, "jvm" : {  
"pid" : 29729, "version" : "1.7.0\_55", "vm\_name" : "OpenJDK  
64-Bit Server VM", "vm\_version" : "24.51-b03", "vm\_vendor" : "Oracle  
Corporation", "start\_time\_in\_millis" : 1405999092155, "mem" : {  
"heap\_init\_in\_bytes" : 19327352832, "heap\_max\_in\_bytes" :  
19257622528, "non\_heap\_init\_in\_bytes" : 24313856,  
"non\_heap\_max\_in\_bytes" : 224395264, "direct\_max\_in\_bytes" :  
19257622528 }, "gc\_collectors" : [ "ParNew",  
"ConcurrentMarkSweep" ], "memory\_pools" : [ "Code Cache", "Par Eden  
Space", "Par Survivor Space", "CMS Old Gen", "CMS Perm Gen" ] },  
"thread\_pool" : { "generic" : { "type" : "cached",  
"keep\_alive" : "30s" }, "index" : { "type" : "fixed",  
"min" : 50, "max" : 50, "queue\_size" : "1k" },  
"snapshot\_data" : { "type" : "scaling", "min" : 1,  
"max" : 5, "keep\_alive" : "5m" }, "bench" : {  
"type" : "scaling", "min" : 1, "max" : 4,  
"keep\_alive" : "5m" }, "get" : { "type" : "fixed",  
"min" : 8, "max" : 8, "queue\_size" : "1k" },  
"snapshot" : { "type" : "scaling", "min" : 1, "max"  
: 4, "keep\_alive" : "5m" }, "merge" : { "type" :  
"scaling", "min" : 1, "max" : 4, "keep\_alive" :  
"5m" }, "suggest" : { "type" : "fixed", "min" :  
8, "max" : 8, "queue\_size" : "1k" }, "bulk" : {  
"type" : "fixed", "min" : 8, "max" : 8,  
"queue\_size" : "50" }, "optimize" : { "type" : "fixed",  
"min" : 1, "max" : 1 }, "warmer" : {  
"type" : "scaling", "min" : 1, "max" : 4,  
"keep\_alive" : "5m" }, "flush" : { "type" : "scaling",  
"min" : 1, "max" : 4, "keep\_alive" : "5m" },  
"search" : { "type" : "fixed", "min" : 24,  
"max" : 24, "queue\_size" : "1k" }, "percolate" : {  
"type" : "fixed", "min" : 8, "max" : 8,  
"queue\_size" : "1k" }, "management" : { "type" :  
"scaling", "min" : 1, "max" : 5, "keep\_alive" : "5m"  
}, "refresh" : { "type" : "scaling", "min" : 1,  
"max" : 4, "keep\_alive" : "5m" } }, "network" :  
{ "refresh\_interval\_in\_millis" : 5000, "primary\_interface" : {  
"address" : "192.99.9.80", "name" : "eth0",  
"mac\_address" : "70:54:D2:19:BA:B7" } }, "transport" : {  
"bound\_address" : "inet[/0:0:0:0:0:0:0:0%0:9300]", "publish\_address"  
: "inet[/192.99.9.80:9300]" }, "http" : { "bound\_address" :  
"inet[/0:0:0:0:0:0:0:0%0:9299]", "publish\_address" : "inet[/  
192.99.9.80:9299]", "max\_content\_length\_in\_bytes" : 104857600 },  
"plugins" : [ { "name" : "marvel", "version" : "NA",  
"description" : "No description found.", "url" : "/\_plugin/marvel/",  
"jvm" : false, "site" : true } ] },  
"sQEMBQGMT1eyDrPwF-xGeA" : { "name" : "Host88", "transport\_address"  
: "inet[/198.27.70.88:9300]", "host" : "[ns4008677.ip-198-27-70.net](http://ns4008677.ip-198-27-70.net)",  
"ip" : "198.27.70.88", "version" : "1.1.1", "build" : "f1585f0",  
"http\_address" : "inet[/198.27.70.88:9200]", "attributes" : {  
"master" : "true" }, "settings" : { "threadpool" : {  
"index" : { "type" : "fixed", "queue\_size" : "1000",  
"size" : "50" } }, "node" : { "data" :  
"true", "master" : "true", "name" : "Host88" },  
"index" : { "number\_of\_replicas" : "1", "number\_of\_shards" :  
"50" }, "name" : "Host88", "pidfile" :  
"/var/run/elasticsearch/elasticsearch.pid", "path" : { "data"  
: "/var/lib/elasticsearch", "work" : "/tmp/elasticsearch",  
"home" : "/usr/share/elasticsearch", "conf" : "/etc/elasticsearch",  
"logs" : "/var/log/elasticsearch" }, "indices" : {  
"recovery" : { "max\_bytes\_per\_sec" : "200mb" } },  
"cluster" : { "name" : "zocialinc" }, "script" : {  
"disable\_dynamic" : "false" }, "discovery" : {  
"zen" : { "minimum\_master\_nodes" : "2", "ping" : {  
"unicast" : { "hosts" : [ "192.99.5.98", "192.99.9.80"  
] }, "multicast" : { "enabled" :  
"false" }, "timeout" : "30s" } }  
}, "foreground" : "yes" }, "os" : {  
"refresh\_interval\_in\_millis" : 1000, "available\_processors" : 8,  
"cpu" : { "vendor" : "Intel", "model" : "Xeon",  
"mhz" : 3392, "total\_cores" : 8, "total\_sockets" : 8,  
"cores\_per\_socket" : 16, "cache\_size\_in\_bytes" : 8192 },  
"mem" : { "total\_in\_bytes" : 33700106240 }, "swap"  
: { "total\_in\_bytes" : 17177755648 } }, "process" : {  
"refresh\_interval\_in\_millis" : 1000, "id" : 2142,  
"max\_file\_descriptors" : 65535, "mlockall" : false }, "jvm" :  
{ "pid" : 2142, "version" : "1.7.0\_25", "vm\_name" : "Java  
HotSpot(TM) 64-Bit Server VM", "vm\_version" : "23.25-b01",  
"vm\_vendor" : "Oracle Corporation", "start\_time\_in\_millis" :  
1406231783559, "mem" : { "heap\_init\_in\_bytes" : 19327352832,  
"heap\_max\_in\_bytes" : 19257622528, "non\_heap\_init\_in\_bytes" :  
24313856, "non\_heap\_max\_in\_bytes" : 136314880,  
"direct\_max\_in\_bytes" : 19257622528 }, "gc\_collectors" : [  
"ParNew", "ConcurrentMarkSweep" ], "memory\_pools" : [ "Code Cache", "Par  
Eden Space", "Par Survivor Space", "CMS Old Gen", "CMS Perm Gen" ] },  
"thread\_pool" : { "generic" : { "type" : "cached",  
"keep\_alive" : "30s" }, "index" : { "type" : "fixed",  
"min" : 50, "max" : 50, "queue\_size" : "1k" },  
"get" : { "type" : "fixed", "min" : 8, "max" :  
8, "queue\_size" : "1k" }, "snapshot" : { "type"  
: "scaling", "min" : 1, "max" : 4, "keep\_alive" :  
"5m" }, "merge" : { "type" : "scaling", "min" :  
1, "max" : 4, "keep\_alive" : "5m" }, "suggest" :  
{ "type" : "fixed", "min" : 8, "max" : 8,  
"queue\_size" : "1k" }, "bulk" : { "type" : "fixed",  
"min" : 8, "max" : 8, "queue\_size" : "50" },  
"optimize" : { "type" : "fixed", "min" : 1, "max"  
: 1 }, "warmer" : { "type" : "scaling", "min" :  
1, "max" : 4, "keep\_alive" : "5m" }, "flush" :  
{ "type" : "scaling", "min" : 1, "max" : 4,  
"keep\_alive" : "5m" }, "search" : { "type" : "fixed",  
"min" : 24, "max" : 24, "queue\_size" : "1k" },  
"percolate" : { "type" : "fixed", "min" : 8,  
"max" : 8, "queue\_size" : "1k" }, "management" : {  
"type" : "scaling", "min" : 1, "max" : 5,  
"keep\_alive" : "5m" }, "refresh" : { "type" : "scaling",  
"min" : 1, "max" : 4, "keep\_alive" : "5m" }  
}, "network" : { "refresh\_interval\_in\_millis" : 5000,  
"primary\_interface" : { "address" : "198.27.70.88", "name" :  
"eth0", "mac\_address" : "70:54:D2:1A:9F:5B" } },  
"transport" : { "bound\_address" : "inet[/0:0:0:0:0:0:0:0%0:9300]",  
"publish\_address" : "inet[/198.27.70.88:9300]" }, "http" : {  
"bound\_address" : "inet[/0:0:0:0:0:0:0:0%0:9200]",  
"publish\_address" : "inet[/198.27.70.88:9200]",  
"max\_content\_length\_in\_bytes" : 104857600 }, "plugins" : [ {  
"name" : "HQ", "version" : "NA", "description" : "No  
description found.", "url" : "/\_plugin/HQ/", "jvm" : false,  
"site" : true }, { "name" : "head", "version" : "NA",  
"description" : "No description found.", "url" : "/\_plugin/head/",  
"jvm" : false, "site" : true } ] } }}

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/77a5dcfc-99e5-4f2a-8dc0-e50f200bd0c8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/77a5dcfc-99e5-4f2a-8dc0-e50f200bd0c8%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:13am UTC](https://discuss.elastic.co/t/hpw-to-fix-failed-to-merge-org-apache-lucene-store-alreadyclosedexception-this-directory-is-closed/18896/2 "2017-07-06T01:13:09Z")

</div>


