# Logstah tcp input plugin

**URL:** <https://discuss.elastic.co/t/logstah-tcp-input-plugin/262116>\
**Category:** Logstash\
**Created:** [January 25, 2021, 1:48pm UTC](https://discuss.elastic.co/t/logstah-tcp-input-plugin/262116 "2021-01-25T13:48:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gongon](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@gongon](https://discuss.elastic.co/u/gongon)\
**Post date:** [January 25, 2021, 1:48pm UTC](https://discuss.elastic.co/t/logstah-tcp-input-plugin/262116/1 "2021-01-25T13:48:51Z")

</div>

Hello,

When I use the tcp input plugin in mode server, it works. But it does not work in mode client.It can connect to the server,but does not receive data.It's about a webserver : I try to extract data from a database which is on that server.  
Here a very simple code 🙂

1. input {

2. tcp {

3. mode =\> "client"

4. host =\> "194.167.200.22"

5. port =\> 80

6. }

7. output {

8. 

```
stdout { codec => rubydebug }

```

9. }

Could you explain how it works in mode client.

Thank you very much for your help

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [January 25, 2021, 5:01pm UTC](https://discuss.elastic.co/t/logstah-tcp-input-plugin/262116/2 "2021-01-25T17:01:57Z")

</div>

If you are connecting to a web server then it will not send you data until you send it a request. A tcp input will not work. Try using an http\_poller input.

---

<div class="post-metadata">

**Author:** ![gongon](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@gongon](https://discuss.elastic.co/u/gongon)\
**Post date:** [January 25, 2021, 5:20pm UTC](https://discuss.elastic.co/t/logstah-tcp-input-plugin/262116/3 "2021-01-25T17:20:02Z")

</div>

ok I will try.

I gave you another information : the webserver does not have a rest architecture: it is an old server. It is why I use this input-tcp.

Yes I send request with curl to the server while i connect the input-tcp on the server.The connection works.

---

<div class="post-metadata">

**Author:** ![gongon](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@gongon](https://discuss.elastic.co/u/gongon)\
**Post date:** [January 26, 2021, 1:18pm UTC](https://discuss.elastic.co/t/logstah-tcp-input-plugin/262116/4 "2021-01-26T13:18:20Z")

</div>

It works with http\_poller.Thank you so much.

---

<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:** [February 23, 2021, 1:18pm UTC](https://discuss.elastic.co/t/logstah-tcp-input-plugin/262116/5 "2021-02-23T13:18:22Z")

</div>

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