# Logstash tcp input/output

**URL:** <https://discuss.elastic.co/t/logstash-tcp-input-output/32901>\
**Category:** Logstash\
**Created:** [October 24, 2015, 5:42am UTC](https://discuss.elastic.co/t/logstash-tcp-input-output/32901 "2015-10-24T05:42:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![treehouse](https://avatars.discourse-cdn.com/v4/letter/t/e9a140/32.png) [@treehouse](https://discuss.elastic.co/u/treehouse)\
**Post date:** [October 24, 2015, 5:42am UTC](https://discuss.elastic.co/t/logstash-tcp-input-output/32901/1 "2015-10-24T05:42:10Z")

</div>

Hey guys

I know there are a couple other questions like this, but I haven't seen behavior like I am seeing surfaced before.

> [@Output from logstash A into input of logstash B over tcp](https://discuss.elastic.co/t/output-from-logstash-a-into-input-of-logstash-b-over-tcp/29161):
>
> Hello, I'm hoping someone can help me. I'm trying to output data over tcp from one logstash (logstash A) into the input of another (logstash B). These are my config files from logstash A:- output { tcp { host =\> "XX.X.XXX.XXX" #ip address for logstash B mode =\> "server" port =\> 3389 } } logstash B config: input { tcp { mode =\> "client" host =\> "XX.X.XX.XXXX" #ip address of logstash A port =\> 3389 } } When I run logstash on l…

I have two logstash instances, A and B. Here are my configs:  
A --

```
input {
	stdin {}
}

filter {}

output {
	stdout { codec => rubydebug }
	tcp {
		host => "10.12.21.229"
		port => 5000
	}
}

```

B --

```
input {
	tcp {
		port => 5000
	}
}

filter {}

output{
	stdout { codec => rubydebug }
}

```

So with this setup, I'm seeing some strange behavior. My inputs into A aren't immediately being sent across to B. I can send as many "logs" down A and still nothing will show up in the stdout output of B. However, when I quit logstash A (as in ctrl+c and ctrl+c) then it will send across only the very _first_ log from A, but nothing else no matter how many logs I have sent into A (through stdin input). So something seems strange.  
Here is my version:

```
$ /opt/logstash/bin/logstash --version
logstash 1.5.4

```

Any ideas?

Also so same thing happens when I am running both logstash instances on one machine (host on logstash A is "localhost").

---

<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, 5:25am UTC](https://discuss.elastic.co/t/logstash-tcp-input-output/32901/2 "2017-07-06T05:25:32Z")

</div>


