# Can logstash configuration have two different inputs with the same port?

**URL:** <https://discuss.elastic.co/t/can-logstash-configuration-have-two-different-inputs-with-the-same-port/27406>\
**Category:** Logstash\
**Created:** [August 14, 2015, 2:54pm UTC](https://discuss.elastic.co/t/can-logstash-configuration-have-two-different-inputs-with-the-same-port/27406 "2015-08-14T14:54:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diman\_Ghazi](https://avatars.discourse-cdn.com/v4/letter/d/a698b9/32.png) [@Diman\_Ghazi](https://discuss.elastic.co/u/Diman_Ghazi)\
**Post date:** [August 14, 2015, 2:54pm UTC](https://discuss.elastic.co/t/can-logstash-configuration-have-two-different-inputs-with-the-same-port/27406/1 "2015-08-14T14:54:17Z")

</div>

Hi,

I am fairly new in Logstash. I am trying to have two inputs with the same port but different type and tag. e.g:

input {  
tcp {  
port =\> 5000  
type =\> "x"  
tags =\> ["x"]  
}  
log4j {  
port =\> 5000  
type =\> "y"  
tags =\> ["y"]  
}  
}  
But logstash doesn't like it and throws this error: " Address already in use - bind - Address already in use: bind"  
I am wondering if there is anyway that this can be done.

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 15, 2015, 7:00am UTC](https://discuss.elastic.co/t/can-logstash-configuration-have-two-different-inputs-with-the-same-port/27406/2 "2015-08-15T07:00:08Z")

</div>

Nope, you can only use the one port once.

---

<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:31am UTC](https://discuss.elastic.co/t/can-logstash-configuration-have-two-different-inputs-with-the-same-port/27406/3 "2017-07-06T05:31:54Z")

</div>


