-
Notifications
You must be signed in to change notification settings - Fork 462
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
Netty Dependency issues using keyvault in azure-spring-boot 2.2.4 #886
Comments
Thanks for reaching out and we'll look into it. |
@mocleiri, I guess this could be related to upgrading cosmos SDK version in the 2.2.4 release. Could you help provide your pom file so we could locate the dependency conflicts. |
I couldn't upload the xml file directly so I renamed it to a txt file. |
Fyi, I had the same issue, I solved it by specifying the version explicitly:
After that I got
|
Any update on this issue? |
I am also facing this issue. |
@mocleiri @aholler2 |
Closing this now... We've addressed this in the PR Azure/azure-sdk-for-java#14506. |
I am getting a similar error with project reactor
I see the fix in the PR was only for the netty issue. |
Specifying the reactor version in the pom.xml doesn't resolve the error.
|
Hi, @Sreini, could you please provide your pom.xml? |
Same issue happens on boot load when both secrets and keys dependency are used together, |
Hi, @kbking01, here is the dependency of Could you please check the reactor-core version in your classpath? Or please share your |
Hi @chenrujun - Was using 3.3.5 previously. Changed it to below, still same issue. KeyVaultPropertySource is kicking in from the boot starters though I manually remove the KV source from the environment defined |
Hi, @kbking01 , it's a dependency version problem. Could you please share you |
Hello, @kbking01 , I'm facing the same problem trying to resolve this dependency: java.lang.NoSuchMethodError: 'reactor.core.publisher.Mono reactor.core.publisher.Mono.contextWrite(reactor.util.context.ContextView)' Please, is there a solution? Thanks |
Hi, @andros0689 Thanks for reaching out. Could you please create a new issue, including all information to reproduce the problem. Like the version of spring-boot and spring-cloud-azure-starter-keyvault-secrets. It's better to create a simple project to reproduce the problem. |
Hello @chenrujun THANKS Actually, I just found out with my team the solution based on the BOM version (Fuse 11, java 11, Spring Boot based): <dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.redhat-fuse</groupId>
<artifactId>fuse-springboot-bom</artifactId>
<version>7.11.0.fuse-sb2-7_11_0-00028-redhat-00001</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>`
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>spring-cloud-azure-starter-keyvault-secrets</artifactId>
<version>${version.spring.cloud.azure}</version>
<exclusions>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
</exclusion>
</exclusions>
</dependency> Doesn't need the mac os jar from io.netty:netty-resolver-dns-native-macos and io.netty:netty-transport-native-kqueue We were using the Fuse version 7.10.0.fuse-sb2-7_10_1-00008-redhat-00001. Additional, exclude the class ServiceBusJmsAutoConfiguration.class in the Application.java: @SpringBootApplication(exclude = ServiceBusJmsAutoConfiguration.class)
@ImportResource
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
} |
Hi, @andros0689 |
Hello @chenrujun I updated the project with the property "fuse.bom.version.test" in the POM. The one is not commented reproduces the error:
The property "fuse.bom.version.test" commented (7.11.0.fuse-sb2-7_11_0-00028-redhat-00001) resolves it (Tries to resolve the DNS to the KeyVault Service). Hope it helps to resolve the bug (The jars that points to the mac OS build). Note: Just in case, run the project with "mvn spring-boot:run" Additional note: The exclusion of the class "com.azure.spring.cloud.autoconfigure.jms.ServiceBusJmsAutoConfiguration" in the Application.java is because of in our project don't need it. The project required it in order to finish the compilation, nevertheless, we don't need that implementation. Thanks a lot. |
@chenrujun Did you pull the correct version? I just reviewed and I commited the source with the correct property :/ |
I already pulled the latest code. It has error. See this: https://github.com/chenrujun/azure-spring-boot-issue-886/blob/master/pom.xml#L119 |
Hello, please, verify again |
To fix the problem of Adding the following fragment can set
But it will have new problem like this: Em... Let's change another way to investigate this problem: I found this: https://github.com/jboss-fuse/redhat-fuse/blob/release-work-7.10.0.fuse-sb2-7_10_1-00/pom.xml#L66 But spring-cloud-azure:4.3.0 is compatible with spring-boot 2.5/2.6/2.7 So, spring-cloud-azure:4.3.0 is not compatible spring-cloud-azure:4.3.0 is compatible Refs: https://github.com/jboss-fuse/redhat-fuse/blob/release-work-7.11.0.fuse-sb2-7_11_0-00/pom.xml#L65 |
Environment
Spring boot starter:
active directory spring boot starter
cosmosdb spring boot starter
key vault spring boot starter
service bus spring boot starter
application insights spring boot starter
sql server database driver
msal identity library
OS Type: Linux (Azure Web App)
Java version:
Summary
When starting a spring boot application using azure-spring-boot 2.2.4 it breaks with a dependency issue with netty when trying to look up the keyvault secret.
We only use the keyvault when running in Azure. Everything was fine until we deployed the application and on startup when it tried to resolve the database credentials from keyvault it broke with the below exception caused by incompatible versions of netty.
Switching back to azure-spring-boot 2.2.3 has solved the problem for now.
java.lang.NoSuchMethodError: 'boolean io.netty.handler.ssl.SslProvider.isAlpnSupported(io.netty.handler.ssl.SslProvider)'
at reactor.netty.http.client.HttpClientSecure.(HttpClientSecure.java:79) ~[reactor-netty-0.9.4.RELEASE.jar!/:0.9.4.RELEASE]
Full root cause stack trace:
Reproduce steps
Deploy application into Azure Web App Java 11 stack.
Expected Results
Application would startup properly and resolve keyvault properties like it does in the previous version, 2.2.3.
Actual Results
failed with method not found error on acquisition of the keyvault secret due to mixed netty versions.
The text was updated successfully, but these errors were encountered: