question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Connection to EventHubs via Kafka and Passwordless Authentication does not work

See original GitHub issue

Describe the bug When connection to EventHub via Kafka using SpringBoot and passwordless authentication, the connection cannot be established correctly using spring-cloud-azure-starter >= 4.4.0. It works when we downgrade to 4.3.0.

Exception or Stack Trace

2022-11-09 15:03:08.838  INFO 19315 --- [***@***.com] .o.i.e.ExpiringCredentialRefreshingLogin : [Principal=:***@***.com]: Expiring credential re-login sleeping until: Wed Nov 09 16:15:26 CET 2022
2022-11-09 15:03:08.929  INFO 19315 --- [           main] o.a.kafka.common.utils.AppInfoParser     : Kafka version: 3.1.2
2022-11-09 15:03:08.929  INFO 19315 --- [           main] o.a.kafka.common.utils.AppInfoParser     : Kafka commitId: f8c67dc3ae0a3265
2022-11-09 15:03:08.929  INFO 19315 --- [           main] o.a.kafka.common.utils.AppInfoParser     : Kafka startTimeMs: 1668002588929
2022-11-09 15:03:09.542  INFO 19315 --- [| adminclient-1] org.apache.kafka.clients.NetworkClient   : [AdminClient clientId=adminclient-1] Node -1 disconnected.
2022-11-09 15:03:09.544  INFO 19315 --- [| adminclient-1] org.apache.kafka.clients.NetworkClient   : [AdminClient clientId=adminclient-1] Cancelled in-flight METADATA request with correlation id 1 due to node -1 being disconnected (elapsed time since creation: 192ms, elapsed time since send: 192ms, request timeout: 29581ms)
2022-11-09 15:03:10.024  INFO 19315 --- [| adminclient-1] org.apache.kafka.clients.NetworkClient   : [AdminClient clientId=adminclient-1] Node -1 disconnected.
2022-11-09 15:03:10.024  INFO 19315 --- [| adminclient-1] org.apache.kafka.clients.NetworkClient   : [AdminClient clientId=adminclient-1] Cancelled in-flight METADATA request with correlation id 3 due to node -1 being disconnected (elapsed time since creation: 114ms, elapsed time since send:

To Reproduce Creating a SpringBoot project with spring-cloud-azure-starter in version >= 4.4.0 and try to connect to an EventHub using spring-cloud-stream-binder-kafka and passwordless authentication. If necessary, i can provide a repository holding the code we’re using.

Expected behavior The connection should just work.

Setup (please complete the following information):

  • OS: Linux, Windows
  • Library/Libraries:
  • Java version: 17
  • App Server/Environment: -
  • Frameworks: Spring Boot

Additional context It works if we switch the version back to 4.3.0.

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
backwind1233commented, Nov 10, 2022

@yiliuTo could you help look into this issue?

0reactions
msftbot[bot]commented, Dec 1, 2022

Hi, we’re sending this friendly reminder because we haven’t heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don’t hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrate an application to use passwordless connections with ...
Learn how to migrate existing applications using Azure Event Hubs for Kafka away from authentication patterns such as connection strings to ...
Read more >
Issues · Azure/azure-sdk-for-java - GitHub
[BUG] Connection to EventHubs via Kafka and Passwordless Authentication does not work azure-spring All azure-spring related issues bug This issue requires a ...
Read more >
Not able connect to EventHub via KAFKA api - Stack Overflow
This error occurs when publishing to a basic plan Event Hub, as the basic plan does not support interaction via Kafka protocol.
Read more >
Delete Passwords: Passwordless Connections for Spring Boot ...
Using username/password credentials to access one application from another presents a huge security risk for many reasons. Today, we are ...
Read more >
How to Use Kafka Client with Azure Event Hubs - Niels Berglund
This is the part that caused me issues. Reading documentation and blog posts when trying to connect to Event Hubs, I concluded that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found