# The first connection to logstash is always an error

**URL:** <https://discuss.elastic.co/t/the-first-connection-to-logstash-is-always-an-error/296253>\
**Category:** Beats\
**Tags:** functionbeat\
**Created:** [February 4, 2022, 5:56am UTC](https://discuss.elastic.co/t/the-first-connection-to-logstash-is-always-an-error/296253 "2022-02-04T05:56:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![driveirk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/driveirk/32/102253_2.png) [@driveirk](https://discuss.elastic.co/u/driveirk)\
**Post date:** [February 4, 2022, 5:56am UTC](https://discuss.elastic.co/t/the-first-connection-to-logstash-is-always-an-error/296253/1 "2022-02-04T05:56:25Z")

</div>

When running lambda, I always see "retry" first, and then immediately connect to backoff.  
How to make logs sent on first connection?  
Is there any way to enable more readable logs?

 ![Снимок экрана 2022-02-04 в 13.44.02](https://us1.discourse-cdn.com/elastic/original/3X/e/e/ee3f89725446da6c69ba2089f5693ddd52a67692.png)

config functionbeat

```auto
functionbeat:
  provider:
    aws:
      deploy_bucket: functionbeat
      endpoint: s3.amazonaws.com
      functions:
      - description: lambda function for cloudwatch logs
        enabled: true
        name: elk-shipper
        triggers:
        - log_group_name: /aws/lambda/
        type: cloudwatch_logs
keystore:
  path: /tmp/functionbeat.keystore
output:
  logstash:
    hosts:
    - logstash.net:1999
    timeout: 8
    pipelining: 0
path:
  config: /etc/functionbeat
  data: /tmp
  home: /etc/functionbeat
  logs: /tmp/logs
processors:
- add_fields:
    fields:
      log_signal: ASDFGH
    target: ""
logging.metrics.period: 1s

```

---

<div class="post-metadata">

**Author:** ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)\
**Post date:** [February 7, 2022, 1:36pm UTC](https://discuss.elastic.co/t/the-first-connection-to-logstash-is-always-an-error/296253/2 "2022-02-07T13:36:56Z")

</div>

This is not an error. `backoff` and `retryer` are internal elements of the publisher pipeline. All publishers contain a backoff and retry functionality and what you see in the logs are messages from the code files with those names. There is no error at that point.

The logs are just letting you know that Functionbeat is connecting to a URL and it has backoff enabled and it will retry if there is an error during connection.

---

<div class="post-metadata">

**Author:** ![driveirk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/driveirk/32/102253_2.png) [@driveirk](https://discuss.elastic.co/u/driveirk)\
**Post date:** [February 24, 2022, 6:47am UTC](https://discuss.elastic.co/t/the-first-connection-to-logstash-is-always-an-error/296253/3 "2022-02-24T06:47:41Z")

</div>

Can you tell me how can I find out why there was a delay? For me, this is important and I would like to make sure that everything is done the first time.

---

<div class="post-metadata">

**Author:** ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)\
**Post date:** [February 24, 2022, 4:47pm UTC](https://discuss.elastic.co/t/the-first-connection-to-logstash-is-always-an-error/296253/4 "2022-02-24T16:47:35Z")

</div>

There was no delay according to the logs you shared. Are the events not making it into ES or what is the problem you see?

---

<div class="post-metadata">

**Author:** ![driveirk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/driveirk/32/102253_2.png) [@driveirk](https://discuss.elastic.co/u/driveirk)\
**Post date:** [February 25, 2022, 7:46am UTC](https://discuss.elastic.co/t/the-first-connection-to-logstash-is-always-an-error/296253/5 "2022-02-25T07:46:52Z")

</div>

I would like to make sure that the log is sent as quickly as possible.  
Therefore, I want to make sure that the logs are sent the first time and there are no errors.  
Because the words "backoff" and "retryer" indicate that the logs are sent at least the second time.

Can you confirm that the logs are sent the first time, on the first connection, without errors?

---

<div class="post-metadata">

**Author:** ![driveirk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/driveirk/32/102253_2.png) [@driveirk](https://discuss.elastic.co/u/driveirk)\
**Post date:** [March 2, 2022, 1:05pm UTC](https://discuss.elastic.co/t/the-first-connection-to-logstash-is-always-an-error/296253/6 "2022-03-02T13:05:56Z")

</div>

@kvch I will be glad if you can confirm that there are no errors.

---

<div class="post-metadata">

**Author:** ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)\
**Post date:** [March 2, 2022, 1:18pm UTC](https://discuss.elastic.co/t/the-first-connection-to-logstash-is-always-an-error/296253/7 "2022-03-02T13:18:23Z")

</div>

There was no delay or error based on the log lines you shared.

---

<div class="post-metadata">

**Author:** ![driveirk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/driveirk/32/102253_2.png) [@driveirk](https://discuss.elastic.co/u/driveirk)\
**Post date:** [March 3, 2022, 8:18am UTC](https://discuss.elastic.co/t/the-first-connection-to-logstash-is-always-an-error/296253/8 "2022-03-03T08:18:51Z")

</div>

When creating a load, an error appears in the logs, see the picture

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/f/7ff2ab87b0c2a5950d430ccc2a015f7ec091b4a5.png)

At the same time, there are no errors on the logstash side.  
In this case, all the logs are delivered, where can this error come from?

---

<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:** [March 31, 2022, 10:19am UTC](https://discuss.elastic.co/t/the-first-connection-to-logstash-is-always-an-error/296253/9 "2022-03-31T10:19:50Z")

</div>

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