[JIRA] (JENKINS-53743) Azure-VM-Agents: LinkageError: loader constraint violation: when resolving method "com.nimbusds.openid.connect.sdk.OIDCAccessTokenResponse.

14 views
Skip to first unread message

engin.diri@lidl.com (JIRA)

unread,
Sep 24, 2018, 7:27:08 AM9/24/18
to jenkinsc...@googlegroups.com
E D created an issue
 
Jenkins / Bug JENKINS-53743
Azure-VM-Agents: LinkageError: loader constraint violation: when resolving method "com.nimbusds.openid.connect.sdk.OIDCAccessTokenResponse.
Issue Type: Bug Bug
Assignee: Azure DevOps
Components: azure-vm-agents-plugin
Created: 2018-09-24 11:26
Environment: docker image: jenkins/jenkins:2.138.1-alpine
Priority: Blocker Blocker
Reporter: E D

 

Hi everybody,

getting quite crazy about this issue. I hope someone can help me with this.

What:

When i try to use the Azure VM Agent Plugin in Jenkins i get following error (scroll down)

 

What i tried, so far:

I tried a fresh Docker container, without any other plugin to avoid maybe interference from another plugin but still same issue:

Configuration:

I provide the Azure Credentials via Microsoft Azure Service Principal.

The rest ist out-of-the-box vanilla Jenkins

 

Hint:

We use a Corporate Proxy, but it is provided via -Dhttp. parameters.

 

Sep 24, 2018 11:16:16 AM com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate verifyConfiguration
SEVERE: Error validating configuration
com.microsoft.azure.vmagent.exceptions.AzureCloudException
	at com.microsoft.azure.vmagent.exceptions.AzureCloudException.create(AzureCloudException.java:54)
	at com.microsoft.azure.vmagent.exceptions.AzureCloudException.create(AzureCloudException.java:33)
	at com.microsoft.azure.vmagent.util.ExecutionEngine.executeWithRetry(ExecutionEngine.java:48)
	at com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate.verifyConfiguration(AzureVMManagementServiceDelegate.java:1350)
	at com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate.verifyConfiguration(AzureVMManagementServiceDelegate.java:1324)
	at com.microsoft.azure.vmagent.AzureVMCloud$DescriptorImpl.doVerifyConfiguration(AzureVMCloud.java:1089)
	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:734)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:864)
	at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:734)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:864)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:668)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:99)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:531)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
	at winstone.BoundedExecutorService.lambda$scheduleNext$0(BoundedExecutorService.java:80)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.ExecutionException: com.microsoft.azure.vmagent.exceptions.AzureCloudException: Exceeded maximum retry count 3
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at com.microsoft.azure.vmagent.util.ExecutionEngine.executeWithRetry(ExecutionEngine.java:41)
	... 80 more
Caused by: com.microsoft.azure.vmagent.exceptions.AzureCloudException: Exceeded maximum retry count 3
	at com.microsoft.azure.vmagent.exceptions.AzureCloudException.create(AzureCloudException.java:54)
	at com.microsoft.azure.vmagent.retry.ExponentialRetryStrategy.canRetry(ExponentialRetryStrategy.java:60)
	at com.microsoft.azure.vmagent.retry.ExponentialRetryStrategy.handleRetry(ExponentialRetryStrategy.java:48)
	at com.microsoft.azure.vmagent.retry.RetryTask.call(RetryTask.java:52)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	... 3 more
Caused by: java.lang.RuntimeException: java.io.IOException: java.lang.LinkageError: loader constraint violation: when resolving method "com.nimbusds.openid.connect.sdk.OIDCAccessTokenResponse.<init>(Lcom/nimbusds/oauth2/sdk/token/AccessToken;Lcom/nimbusds/oauth2/sdk/token/RefreshToken;Ljava/lang/String;)V" the class loader (instance of hudson/ClassicPluginStrategy$AntClassLoader2) of the current class, com/microsoft/aad/adal4j/AdalAccessTokenResponse, and the class loader (instance of hudson/ClassicPluginStrategy$AntClassLoader2) for the method's defining class, com/nimbusds/openid/connect/sdk/OIDCAccessTokenResponse, have different Class objects for the type com/nimbusds/oauth2/sdk/token/AccessToken used in the signature
	at rx.exceptions.Exceptions.propagate(Exceptions.java:57)
	at rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:463)
	at rx.observables.BlockingObservable.last(BlockingObservable.java:226)
	at com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.GroupableResourcesImpl.getByResourceGroup(GroupableResourcesImpl.java:109)
	at com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.GroupableResourcesImpl.getByResourceGroup(GroupableResourcesImpl.java:33)
	at com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate$1.call(AzureVMManagementServiceDelegate.java:1342)
	at com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate$1.call(AzureVMManagementServiceDelegate.java:1338)
	at com.microsoft.azure.vmagent.retry.RetryTask.call(RetryTask.java:49)
	... 4 more
Caused by: java.io.IOException: java.lang.LinkageError: loader constraint violation: when resolving method "com.nimbusds.openid.connect.sdk.OIDCAccessTokenResponse.<init>(Lcom/nimbusds/oauth2/sdk/token/AccessToken;Lcom/nimbusds/oauth2/sdk/token/RefreshToken;Ljava/lang/String;)V" the class loader (instance of hudson/ClassicPluginStrategy$AntClassLoader2) of the current class, com/microsoft/aad/adal4j/AdalAccessTokenResponse, and the class loader (instance of hudson/ClassicPluginStrategy$AntClassLoader2) for the method's defining class, com/nimbusds/openid/connect/sdk/OIDCAccessTokenResponse, have different Class objects for the type com/nimbusds/oauth2/sdk/token/AccessToken used in the signature
	at com.microsoft.azure.credentials.ApplicationTokenCredentials.acquireAccessToken(ApplicationTokenCredentials.java:174)
	at com.microsoft.azure.credentials.ApplicationTokenCredentials.getToken(ApplicationTokenCredentials.java:139)
	at com.microsoft.azure.credentials.AzureTokenCredentials.getToken(AzureTokenCredentials.java:66)
	at com.microsoft.azure.credentials.AzureTokenCredentialsInterceptor.intercept(AzureTokenCredentialsInterceptor.java:36)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
	at com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor.intercept(ResourceManagerThrottlingInterceptor.java:43)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
	at com.microsoft.azure.management.resources.fluentcore.utils.ProviderRegistrationInterceptor.intercept(ProviderRegistrationInterceptor.java:43)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
	at com.microsoft.azure.vmagent.AzureVMAgentPlugin$AzureTelemetryInterceptor.intercept(AzureVMAgentPlugin.java:29)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
	at com.microsoft.rest.interceptors.BaseUrlHandler.intercept(BaseUrlHandler.java:43)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
	at com.microsoft.rest.interceptors.RequestIdHeaderInterceptor.intercept(RequestIdHeaderInterceptor.java:29)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
	at okhttp3.RealCall.execute(RealCall.java:77)
	at retrofit2.OkHttpCall.execute(OkHttpCall.java:180)
	at retrofit2.adapter.rxjava.CallExecuteOnSubscribe.call(CallExecuteOnSubscribe.java:40)
	at retrofit2.adapter.rxjava.CallExecuteOnSubscribe.call(CallExecuteOnSubscribe.java:24)
	at rx.Observable.unsafeSubscribe(Observable.java:10327)
	at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
	at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
	at rx.Observable.unsafeSubscribe(Observable.java:10327)
	at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
	at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
	at rx.Observable.unsafeSubscribe(Observable.java:10327)
	at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
	at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
	at rx.Observable.unsafeSubscribe(Observable.java:10327)
	at rx.internal.operators.DeferredScalarSubscriber.subscribeTo(DeferredScalarSubscriber.java:153)
	at rx.internal.operators.OnSubscribeTakeLastOne.call(OnSubscribeTakeLastOne.java:32)
	at rx.internal.operators.OnSubscribeTakeLastOne.call(OnSubscribeTakeLastOne.java:22)
	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
	at rx.Observable.subscribe(Observable.java:10423)
	at rx.Observable.subscribe(Observable.java:10390)
	at rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:443)
	... 10 more
Caused by: java.util.concurrent.ExecutionException: java.lang.LinkageError: loader constraint violation: when resolving method "com.nimbusds.openid.connect.sdk.OIDCAccessTokenResponse.<init>(Lcom/nimbusds/oauth2/sdk/token/AccessToken;Lcom/nimbusds/oauth2/sdk/token/RefreshToken;Ljava/lang/String;)V" the class loader (instance of hudson/ClassicPluginStrategy$AntClassLoader2) of the current class, com/microsoft/aad/adal4j/AdalAccessTokenResponse, and the class loader (instance of hudson/ClassicPluginStrategy$AntClassLoader2) for the method's defining class, com/nimbusds/openid/connect/sdk/OIDCAccessTokenResponse, have different Class objects for the type com/nimbusds/oauth2/sdk/token/AccessToken used in the signature
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at com.microsoft.azure.credentials.ApplicationTokenCredentials.acquireAccessToken(ApplicationTokenCredentials.java:160)
	... 55 more
Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "com.nimbusds.openid.connect.sdk.OIDCAccessTokenResponse.<init>(Lcom/nimbusds/oauth2/sdk/token/AccessToken;Lcom/nimbusds/oauth2/sdk/token/RefreshToken;Ljava/lang/String;)V" the class loader (instance of hudson/ClassicPluginStrategy$AntClassLoader2) of the current class, com/microsoft/aad/adal4j/AdalAccessTokenResponse, and the class loader (instance of hudson/ClassicPluginStrategy$AntClassLoader2) for the method's defining class, com/nimbusds/openid/connect/sdk/OIDCAccessTokenResponse, have different Class objects for the type com/nimbusds/oauth2/sdk/token/AccessToken used in the signature
	at com.microsoft.aad.adal4j.AdalAccessTokenResponse.<init>(AdalAccessTokenResponse.java:40)
	at com.microsoft.aad.adal4j.AdalAccessTokenResponse.<init>(AdalAccessTokenResponse.java:46)
	at com.microsoft.aad.adal4j.AdalAccessTokenResponse.parseJsonObject(AdalAccessTokenResponse.java:93)
	at com.microsoft.aad.adal4j.AdalAccessTokenResponse.parseHttpResponse(AdalAccessTokenResponse.java:67)
	at com.microsoft.aad.adal4j.AdalTokenRequest.executeOAuthRequestAndProcessResponse(AdalTokenRequest.java:83)
	at com.microsoft.aad.adal4j.AuthenticationContext.acquireTokenCommon(AuthenticationContext.java:818)
	at com.microsoft.aad.adal4j.AuthenticationContext.access$100(AuthenticationContext.java:66)
	at com.microsoft.aad.adal4j.AuthenticationContext$1.call(AuthenticationContext.java:174)
	at com.microsoft.aad.adal4j.AuthenticationContext$1.call(AuthenticationContext.java:163)
	... 4 more

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

jieshe@microsoft.com (JIRA)

unread,
Sep 24, 2018, 10:26:02 PM9/24/18
to jenkinsc...@googlegroups.com

jieshe@microsoft.com (JIRA)

unread,
Sep 24, 2018, 11:36:02 PM9/24/18
to jenkinsc...@googlegroups.com

jieshe@microsoft.com (JIRA)

unread,
Sep 24, 2018, 11:37:02 PM9/24/18
to jenkinsc...@googlegroups.com
Jie Shen started work on Bug JENKINS-53743
 
Change By: Jie Shen
Status: Open In Progress

engin.diri@lidl.com (JIRA)

unread,
Sep 25, 2018, 1:58:04 AM9/25/18
to jenkinsc...@googlegroups.com

jieshe@microsoft.com (JIRA)

unread,
Sep 25, 2018, 3:29:01 AM9/25/18
to jenkinsc...@googlegroups.com
Jie Shen commented on Bug JENKINS-53743

Hi E D,

It seems to be a version conflict problem here, but I cannot reproduce it. So please provide more information including:

  • Which image configuration do you use in Virtual Machine Template? If it is advanced one, please provide the details.
  •  How do you use -Dhttp. parameters? How do you set it?

engin.diri@lidl.com (JIRA)

unread,
Sep 25, 2018, 9:39:01 AM9/25/18
to jenkinsc...@googlegroups.com
E D commented on Bug JENKINS-53743

i just use the vanilla docker image jenkins/jenkins:2.138.1-alpine  no extras.  I just press the verify configuration button and get the error there. I didn't configure anything.

 

i pass the -D paramter as JAVA_OPTS=-Dhttps.proxyHost=xx.yy.zz.ww -Dhttps.proxyPort=8081 -Dhttp.proxyHost=xx.yy.zz.ww -Dhttp.proxyPort=8081

jieshe@microsoft.com (JIRA)

unread,
Sep 27, 2018, 2:25:02 AM9/27/18
to jenkinsc...@googlegroups.com
Jie Shen commented on Bug JENKINS-53743

Hi E D, I have found the issue and a new version will be available soon. Thanks for you reporting!

jieshe@microsoft.com (JIRA)

unread,
Sep 29, 2018, 4:52:03 AM9/29/18
to jenkinsc...@googlegroups.com

jieshe@microsoft.com (JIRA)

unread,
Sep 29, 2018, 4:52:03 AM9/29/18
to jenkinsc...@googlegroups.com

yuwzho@microsoft.com (JIRA)

unread,
Dec 24, 2018, 2:42:02 AM12/24/18
to jenkinsc...@googlegroups.com

yuwzho@microsoft.com (JIRA)

unread,
Dec 24, 2018, 2:42:02 AM12/24/18
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages