# Fails to receive any log events，when two piplines using the same input port 5044

**URL:** <https://discuss.elastic.co/t/fails-to-receive-any-log-events-when-two-piplines-using-the-same-input-port-5044/345564>\
**Category:** Logstash\
**Created:** [October 23, 2023, 12:05pm UTC](https://discuss.elastic.co/t/fails-to-receive-any-log-events-when-two-piplines-using-the-same-input-port-5044/345564 "2023-10-23T12:05:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhsongbj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zhsongbj/32/126764_2.png) [@zhsongbj](https://discuss.elastic.co/u/zhsongbj)\
**Post date:** [October 23, 2023, 12:05pm UTC](https://discuss.elastic.co/t/fails-to-receive-any-log-events-when-two-piplines-using-the-same-input-port-5044/345564/1 "2023-10-23T12:05:09Z")

</div>

I encountered a troubling issue for which I'd like to express my gratitude to anyone who can help. One pipeline consistently failed to receive log events. The problem occurred when two pipelines used the same input port, e.g. 5044. Additionally, the Beats for these two pipelines were coming from different servers.

Here is the configuration for the pipelines:

```yaml

- pipeline.id: bi
  path.config: "{{logstash_pipeline_conf_dir}}/prod-bi-es.conf"

- pipeline.id: easy-bi
  path.config: "{{logstash_pipeline_conf_dir}}/prod-easy-bi-es.conf"

```

The configuration for `prod-bi-es.conf` is as follows:

```yaml
input {
  beats {
    id => "prod-bi-log-1c"
    port => 5044
    codec => "plain"
    client_inactivity_timeout => 36000
  }
}
. . .
output {
    if ([fields][sys-name] == "bi" and [fields][env] == 'prod') {
        elasticsearch {
. . .

```

The configuration for `prod-easy-bi-es.conf` is as follows:

```yaml
input {
  beats {
    id => "prod-easy-bi-log-1c"
    port => 5044
    codec => "plain"
    client_inactivity_timeout => 36000
  }
}
. . .
output {
    if ([fields][sys-name] == "easy-bi" and [fields][env] == 'prod') {
        elasticsearch {
. . .

```

After starting Logstash, one of the pipelines fails to receive any events, and the log data isn't being stored in Elasticsearch using the `output` plugin.

However, when I modified the input port for one of the profiles, for instance, changing it to `5045` ,and, I've also changed the corresponding Filebeat ports, I was able to successfully receive data from the Beats.

If you've ever encountered a similar problem, please help me navigate through it, thanks in advance!

Extended information (the version of the software I'm using)：

- Filebeat 7.10.0
- Logstash 7.10.0
- Elasticsearch 6.8

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [October 23, 2023, 1:05pm UTC](https://discuss.elastic.co/t/fails-to-receive-any-log-events-when-two-piplines-using-the-same-input-port-5044/345564/2 "2023-10-23T13:05:02Z")

</div>

> [@zhsongbj](#):
>
> he problem occurred when two pipelines used the same input port, e.g. 5044

This is not possible, you can't use the same port for different inputs.

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [October 23, 2023, 2:50pm UTC](https://discuss.elastic.co/t/fails-to-receive-any-log-events-when-two-piplines-using-the-same-input-port-5044/345564/3 "2023-10-23T14:50:04Z")

</div>

As Leandro said, 2 input beats on the same port, impossible.  
You can:

- set the single port, and based on a message content, fields from FB - [fields][sys-name] or make additional fields or tags
- receive on the single port, forward to different pipelines based on [fields][sys-name] from FB or the content

PS. Elasticsearch 6.8 is deprecated.

---

<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:** [November 20, 2023, 2:50pm UTC](https://discuss.elastic.co/t/fails-to-receive-any-log-events-when-two-piplines-using-the-same-input-port-5044/345564/4 "2023-11-20T14:50:58Z")

</div>

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