# \[Solved\]Tcp input/output

**URL:** <https://discuss.elastic.co/t/solved-tcp-input-output/27411>\
**Category:** Logstash\
**Created:** [August 14, 2015, 3:37pm UTC](https://discuss.elastic.co/t/solved-tcp-input-output/27411 "2015-08-14T15:37:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidL](https://avatars.discourse-cdn.com/v4/letter/d/ecc23a/32.png) [@DavidL](https://discuss.elastic.co/u/DavidL)\
**Post date:** [August 14, 2015, 3:37pm UTC](https://discuss.elastic.co/t/solved-tcp-input-output/27411/1 "2015-08-14T15:37:34Z")

</div>

I have two logstash instances on two machines, trying to receive json from to the other,  
In the receiver I have:

input {  
tcp {  
port =\> 9302  
codec =\> "json"  
}  
}

And in the sender I have

output{  
tcp{  
mode =\> "client"  
host =\> "(Host\_IP)"  
port =\> 9302  
codec =\> "json"  
}  
}

I think there is traffic sometimes, but not as I expected, am I doing something wrong? Thanks!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 14, 2015, 10:08pm UTC](https://discuss.elastic.co/t/solved-tcp-input-output/27411/2 "2015-08-14T22:08:42Z")

</div>

How did you solve this?  
Providing the answer might help someone else in the future 🙂

---

<div class="post-metadata">

**Author:** ![DavidL](https://avatars.discourse-cdn.com/v4/letter/d/ecc23a/32.png) [@DavidL](https://discuss.elastic.co/u/DavidL)\
**Post date:** [August 17, 2015, 3:37pm UTC](https://discuss.elastic.co/t/solved-tcp-input-output/27411/3 "2015-08-17T15:37:22Z")

</div>

Absolutely

I changed it too the following config, don't know if the change solved the problem but it works for me now

output{  
tcp{  
mode =\> "client"  
host =\> "\<host\_ip\>"  
port =\> 5000  
codec =\> "json\_lines"  
}  
}  
input {  
tcp {  
port =\> 5000  
codec =\> "json\_lines"  
}  
}

---

<div class="post-metadata">

**Author:** ![Kryten](https://avatars.discourse-cdn.com/v4/letter/k/58956e/32.png) [@Kryten](https://discuss.elastic.co/u/Kryten)\
**Post date:** [August 26, 2016, 3:01pm UTC](https://discuss.elastic.co/t/solved-tcp-input-output/27411/4 "2016-08-26T15:01:04Z")

</div>

Thank you for posting the answer - this was a big help for me today.

---

<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, 4:41am UTC](https://discuss.elastic.co/t/solved-tcp-input-output/27411/5 "2017-07-06T04:41:23Z")

</div>


