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

Using lib azure-eventhubs-3.2.2 with MSI in a Java App Service. #19852

Closed
TeplrGuy opened this issue Mar 15, 2021 · 4 comments
Closed

Using lib azure-eventhubs-3.2.2 with MSI in a Java App Service. #19852

TeplrGuy opened this issue Mar 15, 2021 · 4 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Event Hubs question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Track 1
Milestone

Comments

@TeplrGuy
Copy link

Using azure-eventhubs-3.2.2 and customer is getting the below errors:

The call is trying to connect to this endpoint "http://169.254.169.254/metadata/instance?api-version=2020-09-01" and get connection refused.
Error during managedIdentityScenario. Exception: [Ljava.lang.StackTraceElement;@35fc6dc4
java.lang.RuntimeException: java.net.ConnectException: Connection refused (Connection refused)
The above setup works on a VM but not on a web app hosted on Azure App Service.

Issue is fixed when using azure-messaging-eventhubs 5.0.2.

Question is, we don't like to use the new library, is there a way to use azure-eventhubs-3.2.2 with MSI on an App Service?

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Mar 15, 2021
@TeplrGuy TeplrGuy changed the title [QUERY] Using lib azure-eventhubs-3.2.2 with MSI in a Java App Service. Mar 15, 2021
@joshfree joshfree added Client This issue points to a problem in the data-plane of the library. Track 1 labels Mar 15, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Mar 15, 2021
@joshfree joshfree added this to the [2021] April milestone Mar 15, 2021
@joshfree
Copy link
Member

@conniey could you please follow up with @TeplrGuy

@TeplrGuy
Copy link
Author

@joshfree looks like the solution is to use AppServiceMSICredentials class instead of MSICredentials

https://github.com/Azure/azure-libraries-for-java/blob/master/AUTH.md#using-msicredentials--appservicemsicredentials

Follow up question is: what is the main difference between using azure-eventhubs-3.2.2 vs using azure-messaging-eventhubs 5.0.2

@conniey
Copy link
Member

conniey commented Mar 22, 2021

@TeplrGuy

Follow up question is: what is the main difference between using azure-eventhubs-3.2.2 vs using azure-messaging-eventhubs 5.0.2

azure-messaging-eventhubs is an entirely rewritten library for Azure Event Hubs. We rewrote many of the Java libraries to follow the same set of Azure SDK principles so consumers would get a unified feel for development. Here is a quick video on motivation (https://www.youtube.com/watch?v=38RYIx7a2M4) and our guidelines https://azure.github.io/azure-sdk/java_introduction.html

@conniey conniey assigned JamesBirdsall and unassigned conniey Apr 28, 2021
@ramya-rao-a
Copy link
Contributor

@TeplrGuy Looks like you found the solution to the auth problem and @conniey has addressed your follow up question.
We will go ahead and close this issue.

Do try out the newer azure-messaging-eventhubs package and share any feedback you have.

azure-sdk pushed a commit to azure-sdk/azure-sdk-for-java that referenced this issue Jul 21, 2022
[Hub Generated] Publish private branch 'main' (Azure#19852)

* Add StorageMover specification for PubliC Preview

* SpellCheck fix

* Update custom-words

* Update specification/storagemover/resource-manager/readme.md

Co-authored-by: Abhishek Krishna <abkrish@microsoft.com>
Co-authored-by: Dapeng Zhang <dapzhang@microsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Event Hubs question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Track 1
Projects
None yet
Development

No branches or pull requests

5 participants