Type to search.

Publishing to Logstash fails with "connection reset by peer" message

Serverless

Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

Serverless interfaces and procedures might differ from classic Elastic Stack deployments.

Stack

The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

Heartbeat requires a persistent TCP connection to Logstash. If a firewall interferes with the connection, you might see errors like this:

Shell
Failed to publish events caused by: write tcp ... write: connection reset by peer

To solve the problem:

  • make sure the firewall is not closing connections between Heartbeat and Logstash, or
  • set the ttl value in the Logstash output to a value that’s lower than the maximum time allowed by the firewall, and set pipelining to 0 (pipelining cannot be enabled when ttl is used).