Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0518 improve kafka connection error logs #13070

Merged

Conversation

zmstone
Copy link
Member

@zmstone zmstone commented May 18, 2024

Fixes EMQX-12403

Release version: v/e5.7.1

Summary

Example log when Kafka's advertised listener is unreachable.

2024-05-18T19:13:48.412913+02:00 [warning] msg: add_channel_failed, id: <<"connector:kafka_producer:k1">>, reason: #{cause => "no_connected_partition_leader",kafka_topic => "test-topic-2",kafka_client => <<"connector:kafka_producer:k1">>,first_error => {1,{down,#{reason => unresolvable_hostname,host => <<"localhostx:9092">>}}},total_errors => 2}, channel_id: <<"action:kafka_producer:k1:connector:kafka_producer:k1">>

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • Added tests for the changes
  • Added property-based tests for code which performs user input validation
  • Changed lines covered in coverage report
  • Change log has been added to changes/(ce|ee)/(feat|perf|fix|breaking)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • Created PR to emqx-docs if documentation update is required, or link to a follow-up jira ticket
  • Schema changes are backward compatible

Checklist for CI (.github/workflows) changes

  • If changed package build workflow, pass this action (manual trigger)
  • Change log has been added to changes/ dir for user-facing artifacts update

The Kafka producer lib wolff returns detailed error logs
about which host:port had issue, EMQX should log them to help
troubleshooting
@zmstone zmstone force-pushed the 0518-improve-kafka-connection-error-logs branch from 49b98f7 to 331d44a Compare May 18, 2024 17:12
@zmstone zmstone marked this pull request as ready for review May 20, 2024 08:40
@zmstone zmstone requested a review from a team as a code owner May 20, 2024 08:40
terry-xiaoyu
terry-xiaoyu previously approved these changes May 20, 2024
@zmstone zmstone force-pushed the 0518-improve-kafka-connection-error-logs branch from 9384229 to 7696f78 Compare May 21, 2024 07:30
@zmstone zmstone merged commit c54d25d into emqx:release-57 May 29, 2024
168 checks passed
@zmstone zmstone deleted the 0518-improve-kafka-connection-error-logs branch May 29, 2024 14:24
@emqxqa
Copy link

emqxqa commented Jun 3, 2024

TestExecution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants