Kafka output gets permanently stuck after temporary wrong port — pipeline-to-pipeline address unavailable & retrying_send stall
Hi,
I am facing an issue with Logstash Kafka output when the Kafka broker becomes temporarily unreachable.
Error :
[2025-12-05T12:41:32,869][WARN ][org.logstash.plugins.pipeline.AbstractPipelineBus][6c439cc070c5500b3acef737847adbb5978f7d66189e9c4591ef93fa3f24f09f] Attempted to send event to 'forward_kafka but that address was unavailable. Maybe the destination pipeline is down or stopping? Will Retry.
Problem Scenario
- I intentionally changed the Kafka port to a wrong port (ex: 7879).
- Logstash started showing Kafka connection errors (expected).
- After a few seconds, I restored the correct port 7878 again.
- Even after restoring the correct port, Logstash never recovers and it stops forwarding logs permanently.
- Restarting Logstash fixes it, but I want Logstash to automatically recover without restart.
My Logstash pipeline forwards logs to Kafka using this output configuration:
output {
kafka {
codec => json
topic_id => "temp-logs"
bootstrap_servers => "dev.custom.com:7878"
client_id => "DEV-00135"
security_protocol => "SASL_PLAINTEXT"
sasl_mechanism => "PLAIN"
sasl_jaas_config => "org.apache.kafka.common.security.plain.PlainLoginModule required username='admin' password='admin-secret';"
}
}
How to resolve this issue
