-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins 2.176.1
Cppcheck plugin 1.25
-
Powered by SuggestiMate
I'm having a problem running a code check job using this plugin. The code analysis is working and cppcheck creates a report in xml as expected. Than I think it should analyze that report, but something isn't working, from the console output I can read this:
[Cppcheck] Error on cppcheck analysis: java.io.IOException: Remote call on [host] failed
I can't find what the plugin is trying to do, maybe it's trying to remote execute a command on the node. No further informations in the log on master node.
Thanks in advance for the help
[JENKINS-60077] Cppcheck plugin failure on report analysis
My Jenkins version is 2.176.3, Cppcheck plugin version is 1.25, OpenJDK version is openjdk 11.0.7
Slaves log is the following:
May 08, 2020 9:36:54 AM hudson.remoting.UserRequest perform WARNING: LinkageError while performing UserRequest:org.jenkinsci.plugins.cppcheck.CppcheckParserResult@197b3cdc java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at org.jenkinsci.plugins.cppcheck.CppcheckParserResult.invoke(CppcheckParserResult.java:69) at org.jenkinsci.plugins.cppcheck.CppcheckParserResult.invoke(CppcheckParserResult.java:24) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3069) at hudson.remoting.UserRequest.perform(UserRequest.java:211) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.lang.ClassNotFoundException: Bootstrap pseudo-classloader disabled: javax.xml.bind.JAXBException via null at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch4(RemoteClassLoader.java:858) at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch3(RemoteClassLoader.java:893) at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:931) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:18) at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 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) Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to channel at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1788) at hudson.remoting.Request.call(Request.java:202) at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:288) at com.sun.proxy.$Proxy6.fetch3(Unknown Source) at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:211) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at org.jenkinsci.plugins.cppcheck.CppcheckParserResult.invoke(CppcheckParserResult.java:69) at org.jenkinsci.plugins.cppcheck.CppcheckParserResult.invoke(CppcheckParserResult.java:24) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3069) at hudson.remoting.UserRequest.perform(UserRequest.java:211) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)
I got this issue on my slave running ubuntu 20.04 but not ubuntu 16.04
Cppcheck plugin version is 1.25
jenkins log:
[Cppcheck] Starting the cppcheck analysis.
[Cppcheck] Processing 1 files with the pattern 'build/cppcheck.xml'.
[Cppcheck] Error on cppcheck analysis: java.io.IOException: Remote call on JNLP4-connect connection from #################### failed
Build step 'Publish Cppcheck results' changed build result to FAILURE
slave log:
May 26, 2020 5:06:07 PM hudson.remoting.UserRequest performay 26, 2020 5:06:07 PM hudson.remoting.UserRequest performWARNING: LinkageError while performing UserRequest:org.jenkinsci.plugins.cppcheck.CppcheckParserResult@4fe4fejava.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at org.jenkinsci.plugins.cppcheck.CppcheckParserResult.invoke(CppcheckParserResult.java:69) at org.jenkinsci.plugins.cppcheck.CppcheckParserResult.invoke(CppcheckParserResult.java:24) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3069) at hudson.remoting.UserRequest.perform(UserRequest.java:211) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:117) at java.base/java.lang.Thread.run(Thread.java:834)Caused by: java.lang.ClassNotFoundException: Bootstrap pseudo-classloader disabled: javax.xml.bind.JAXBException via null at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch4(RemoteClassLoader.java:858) at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch3(RemoteClassLoader.java:893) at sun.reflect.GeneratedMethodAccessor907.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:931) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:18) at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection to ############### at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1788) at hudson.remoting.Request.call(Request.java:202) at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:288) at com.sun.proxy.$Proxy7.fetch3(Unknown Source) at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:211) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at org.jenkinsci.plugins.cppcheck.CppcheckParserResult.invoke(CppcheckParserResult.java:69) at org.jenkinsci.plugins.cppcheck.CppcheckParserResult.invoke(CppcheckParserResult.java:24) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3069) at hudson.remoting.UserRequest.perform(UserRequest.java:211) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:117) at java.base/java.lang.Thread.run(Thread.java:834)
Note we switched to the warnings-ng plugin and that has worked splendid for cppcheck XML files.
https://github.com/jenkinsci/warnings-ng-plugin/blob/master/SUPPORTED-FORMATS.md
I faced with this issue as well.
The problem is Cppcheck plugin cannot find JAXB API lib on a slave machine and therefore throws java.lang.NoClassDefFoundError about javax/xml/bind/JAXBException class from this lib.
The lib presents in OpenJDK8 and it's absent in OpenJDK11.
There is Jenkins plugin https://plugins.jenkins.io/jaxb/ that fixes the issue with absent lib in OpenJDK11.
Cppcheck plugin depends on it in pom.xml, no need to install it separately.
In my case the issue happens because different java versions installed and used on Jenkins master and slave servers.
Jenkins master: OpenJDK8
Jenkins slave: OpenJDK11
I guess the master decides that the lib isn't required because OpenJDK8 is used on it and therefore the master doesn't install the lib from Jaxb Jenkins plugin on the slave (in remoting/jarCache).
To resolve the issue just update OpenJDK to 11 version on Jenkins master server and be sure that Jenkins master uses it.
This helped me.
Today, I find out this same issue. Yesterday, we upgrade Jenkins slave (Ubuntu 18.04 LTS) to use Java 11. After the upgrade our pipeline start to failed. Only what I can see from the build log is:
[Pipeline] publishCppcheck 03:28:00 [Cppcheck] Starting the cppcheck analysis. 03:28:00 [Cppcheck] Error on cppcheck analysis: java.io.IOException: Remote call on XXXX failed [Pipeline] publishHTML
When the same pipeline job is run Windows slave, it work as expected?
I also met this problem. My Jenkins version is 2.176.3, Cppcheck plugin version is 1.25, OpenJDK version is "1.8.0_111", here is the output log, thanks.