Skip to content

fix(outputs.amqp): Recreate client configuration to successfully reconnect - #19734

Merged
srebhan merged 1 commit into
influxdata:masterfrom
skartikey:fix/outputs-amqp-reconnect-credentials
Sep 16, 2026
Merged

srebhan merged 1 commit into
influxdata:masterfrom
skartikey:fix/outputs-amqp-reconnect-credentials

Conversation

@skartikey

@skartikey skartikey commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Since amqp091-go v1.13 the library wipes the PLAIN credentials in the passed configuration after the first successful connection. The AMQP output created that configuration once in Init() and reused it for every connection, so any reconnect after a network hiccup sent an empty password and was rejected by the broker with a 403 until Telegraf was restarted.

This PR recreates the client configuration on every connection attempt, the same fix #19575 applied to the AMQP consumer, and adds an integration test that forces reconnects via max_messages.

Checklist

Related issues

resolves #19676

@telegraf-tiger telegraf-tiger Bot added fix pr to fix corresponding bug plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins labels Sep 16, 2026
@telegraf-tiger

Copy link
Copy Markdown
Contributor

Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip.
Downloads for additional architectures and packages are available below.

⚠️ This pull request increases the Telegraf binary size by 6.28 % for linux amd64 (new size: 327.6 MB, nightly size 308.2 MB)

📦 Click here to get additional PR build artifacts

Artifact URLs

. DEB . RPM . TAR . GZ . ZIP
amd64.deb aarch64.rpm darwin_amd64.tar.gz windows_amd64.zip
arm64.deb armel.rpm darwin_arm64.tar.gz windows_arm64.zip
armel.deb armv6hl.rpm freebsd_amd64.tar.gz windows_i386.zip
armhf.deb i386.rpm freebsd_armv7.tar.gz
i386.deb ppc64le.rpm freebsd_i386.tar.gz
mips.deb riscv64.rpm linux_amd64.tar.gz
mipsel.deb s390x.rpm linux_arm64.tar.gz
ppc64el.deb x86_64.rpm linux_armel.tar.gz
riscv64.deb linux_armhf.tar.gz
s390x.deb linux_i386.tar.gz
linux_mips.tar.gz
linux_mipsel.tar.gz
linux_ppc64le.tar.gz
linux_riscv64.tar.gz
linux_s390x.tar.gz

@skartikey skartikey added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Sep 16, 2026

@srebhan srebhan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. Thanks @skartikey!

@srebhan
srebhan merged commit 0df3fb5 into influxdata:master Sep 16, 2026
29 checks passed
@github-actions github-actions Bot added this to the v1.40.1 milestone Sep 16, 2026
skartikey added a commit that referenced this pull request Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix pr to fix corresponding bug plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error writing to outputs.amqp after reconnect, started around 1.38

2 participants