# Input tcp does not close the connection

**URL:** <https://discuss.elastic.co/t/input-tcp-does-not-close-the-connection/100869>\
**Category:** Logstash\
**Created:** [September 18, 2017, 12:39pm UTC](https://discuss.elastic.co/t/input-tcp-does-not-close-the-connection/100869 "2017-09-18T12:39:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tonni\_Hult](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tonni_hult/32/11992_2.png) [@Tonni\_Hult](https://discuss.elastic.co/u/Tonni_Hult)\
**Post date:** [September 18, 2017, 12:39pm UTC](https://discuss.elastic.co/t/input-tcp-does-not-close-the-connection/100869/1 "2017-09-18T12:39:10Z")

</div>

Hi

My problem is that the tcp plugin seems to keep a connection open instead of closing it after each call. Is this normal behaviour? We have a loadbalancer that constantly make GET requests to see that each node in the cluster is responding and it expects a 200 response but right now it get's nothing, only an connection that never closes.

Our input configuration looks like this and we are running logstash version 2.4.1

```
	tcp {
	port => 443
	codec => json
	ssl_enable => true
	ssl_cert => "abc.pem" 
    ssl_key => "abc.key"
	ssl_extra_chain_certs => ["def.pem"]
	ssl_verify => false
	tags => "ssl_transfer"
}

```

Regards  
Tonni

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 18, 2017, 1:27pm UTC](https://discuss.elastic.co/t/input-tcp-does-not-close-the-connection/100869/2 "2017-09-18T13:27:35Z")

</div>

The tcp input doesn't speak HTTP so the load balancer will never get a 200 response (or anything else for that matter).

---

<div class="post-metadata">

**Author:** ![Tonni\_Hult](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tonni_hult/32/11992_2.png) [@Tonni\_Hult](https://discuss.elastic.co/u/Tonni_Hult)\
**Post date:** [September 18, 2017, 1:35pm UTC](https://discuss.elastic.co/t/input-tcp-does-not-close-the-connection/100869/3 "2017-09-18T13:35:19Z")

</div>

Ah. So then we should use the http input for the loadbalancer and keep the tcp input for nxlog

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 18, 2017, 1:51pm UTC](https://discuss.elastic.co/t/input-tcp-does-not-close-the-connection/100869/4 "2017-09-18T13:51:59Z")

</div>

Yes, that should work.

---

<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:** [October 16, 2017, 1:52pm UTC](https://discuss.elastic.co/t/input-tcp-does-not-close-the-connection/100869/5 "2017-10-16T13:52:05Z")

</div>

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