# Java log forwarder gets connection refused intermittently

**URL:** <https://discuss.elastic.co/t/java-log-forwarder-gets-connection-refused-intermittently/142086>\
**Category:** Logstash\
**Created:** [July 30, 2018, 3:48am UTC](https://discuss.elastic.co/t/java-log-forwarder-gets-connection-refused-intermittently/142086 "2018-07-30T03:48:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhai](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@abhai](https://discuss.elastic.co/u/abhai)\
**Post date:** [July 30, 2018, 3:48am UTC](https://discuss.elastic.co/t/java-log-forwarder-gets-connection-refused-intermittently/142086/1 "2018-07-30T03:48:43Z")

</div>

Here is my configuration  
**strong text**  
input {  
tcp {  
port =\> 5000  
type =\> "logs"  
codec =\> "json\_lines"  
}  
}  
output {  
elasticsearch { hosts =\> "localhost" }  
stdout { codec =\> rubydebug }  
}

The input is still opened on port 5000 and after a few retries, the connection is accepted again.  
The java client has a connection pool to the logsash server.

---

<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:** [August 27, 2018, 3:48am UTC](https://discuss.elastic.co/t/java-log-forwarder-gets-connection-refused-intermittently/142086/2 "2018-08-27T03:48:51Z")

</div>

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