# Leaked TPC file descriptors for Hadoop Gateway?

**URL:** <https://discuss.elastic.co/t/leaked-tpc-file-descriptors-for-hadoop-gateway/9181>\
**Category:** Elasticsearch\
**Created:** [September 27, 2012, 10:56pm UTC](https://discuss.elastic.co/t/leaked-tpc-file-descriptors-for-hadoop-gateway/9181 "2012-09-27T22:56:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carl\_C](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@Carl\_C](https://discuss.elastic.co/u/Carl_C)\
**Post date:** [September 27, 2012, 10:56pm UTC](https://discuss.elastic.co/t/leaked-tpc-file-descriptors-for-hadoop-gateway/9181/1 "2012-09-27T22:56:43Z")

</div>

Hi everyone,

We are using ElasticSearch to index documents that are stored in HBase, and  
so I have set up ElasticSearch to use the hadoop gateway pointing to our  
hdfs cluster:

gateway.type: hdfs  
gateway.hdfs.uri: hdfs://:8020  
gateway.hdfs.path: /elasticsearch

I've been running load tests on the system and find that after a day or  
two, ES will hit its open file limit (presently set to 64,000). I've looked  
at the output of 'sudo lsof -u elasticsearch' and there are many thousands  
of open TCP connections in the CLOSE\_WAIT state:

java 14109 elasticsearch 661u IPv6 9820568 0t0  
TCP :38257-\>:50010 (CLOSE\_WAIT)

I'm just starting to look into the problem more closely, but I found there  
was a previous mailing list discussion about essentially the same issue:  
[http://elasticsearch-users.115913.n3.nabble.com/CLOSE-WAIT-Sockets-td1884117.html](http://elasticsearch-users.115913.n3.nabble.com/CLOSE-WAIT-Sockets-td1884117.html).  
There wasn't any resolution, so I thought I'd ask here if anyone has seen  
or resolved this problem since.

Some more pertinent information:

- ElasticSearch version is 0.19.9
- We use the Cloudera hadoop distribution rather than the Apache  
distribution. As a result, we cannot use the hadoop-core jar included with  
the elasticsearch-hadoop plugin. I have worked around the problem by  
prepending the locations of the correct jar files to ES\_CLASSPATH in  
elasticsearch.in.sh. I have a feeling this may be related to the problem,  
but that's nothing more than a vague hunch.

Anyway, if anyone has seen similar problems or has suggestions for  
debugging strategies, let me know.

Thanks,  
Carl

--

---

<div class="post-metadata">

**Author:** ![Carl\_C](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@Carl\_C](https://discuss.elastic.co/u/Carl_C)\
**Post date:** [September 27, 2012, 10:58pm UTC](https://discuss.elastic.co/t/leaked-tpc-file-descriptors-for-hadoop-gateway/9181/2 "2012-09-27T22:58:02Z")

</div>

Whoops, clearly the title should be "Leaked TCP file descriptors" 🙂

On Thursday, September 27, 2012 3:56:44 PM UTC-7, Carl C wrote:

> Hi everyone,
> 
> We are using Elasticsearch to index documents that are stored in HBase,  
> and so I have set up Elasticsearch to use the hadoop gateway pointing to  
> our hdfs cluster:
> 
> gateway.type: hdfs  
> gateway.hdfs.uri: hdfs://:8020  
> gateway.hdfs.path: /elasticsearch
> 
> I've been running load tests on the system and find that after a day or  
> two, ES will hit its open file limit (presently set to 64,000). I've looked  
> at the output of 'sudo lsof -u elasticsearch' and there are many thousands  
> of open TCP connections in the CLOSE\_WAIT state:
> 
> java 14109 elasticsearch 661u IPv6 9820568 0t0  
> TCP :38257-\>:50010 (CLOSE\_WAIT)
> 
> I'm just starting to look into the problem more closely, but I found  
> there was a previous mailing list discussion about essentially the same  
> issue:  
> [http://elasticsearch-users.115913.n3.nabble.com/CLOSE-WAIT-Sockets-td1884117.html](http://elasticsearch-users.115913.n3.nabble.com/CLOSE-WAIT-Sockets-td1884117.html).  
> There wasn't any resolution, so I thought I'd ask here if anyone has seen  
> or resolved this problem since.
> 
> Some more pertinent information:
> 
> - Elasticsearch version is 0.19.9
> - We use the Cloudera hadoop distribution rather than the Apache  
> distribution. As a result, we cannot use the hadoop-core jar included with  
> the elasticsearch-hadoop plugin. I have worked around the problem by  
> prepending the locations of the correct jar files to ES\_CLASSPATH in  
> elasticsearch.in.sh. I have a feeling this may be related to the problem,  
> but that's nothing more than a vague hunch.
> 
> Anyway, if anyone has seen similar problems or has suggestions for  
> debugging strategies, let me know.
> 
> Thanks,  
> Carl

--

---

<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, 3:11am UTC](https://discuss.elastic.co/t/leaked-tpc-file-descriptors-for-hadoop-gateway/9181/3 "2017-07-06T03:11:03Z")

</div>


