Closed timja closed 6 years ago
oleg_nenashev ping from IRC
I am currently testing using mvn hpi:run, would this be interfering with the servlet classes?
Tentative update:
Ran through a list of testing changes and eventually tried installing the .hpi of my plugin onto a regular jenkins in docker instead of testing from mvn hpi:run. Haven't seen any problems since doing that... so far
Thanks for your comment, I wouldn't have considered this kind of interference at all otherwise.
Not sure why there would be a failure using hpi:run, which does use Jetty (though sometimes a different version than jenkins.war). If there is a complete, self-contained demo reproducing the problem it would assist diagnosis.
Code changed in jenkins
User: Oleg Nenashev
Path:
core/src/main/java/hudson/FilePath.java
http://jenkins-ci.org/commit/jenkins/27e5943050846d353a0b257237a73925d3726360
Log:
Merge pull request #3067 from KostyaSha/fixRemotingFilePathmkdirs
JENKINS-46386 - Don't use unloadable things in remoting mkdirs calls.
Compare: https://github.com/jenkinsci/jenkins/compare/be0238644911...27e594305084
oleg_nenashev Does the merged change by integer resolve this issue?
No, that may have fixed things at one point, but it regressed again with JENKINS-47324 I think. This is reproducible in trunk as follows:
Started by user unknown or anonymous Building remotely on docker in workspace /…/workspace/… java.lang.ClassNotFoundException: javax.servlet.ServletContextListener at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch(RemoteClassLoader.java:808) at … Caused: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.lang.ClassLoader.defineClass(ClassLoader.java:642) at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:373) Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to docker at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1740) at hudson.remoting.UserResponse.retrieve(UserRequest.java:314) at hudson.remoting.Channel.call(Channel.java:955) at hudson.FilePath.act(FilePath.java:997) at hudson.FilePath.act(FilePath.java:986) at hudson.FilePath.mkdirs(FilePath.java:1174) at hudson.model.AbstractProject.checkout(AbstractProject.java:1202) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499) at hudson.model.Run.execute(Run.java:1727) at … Caused: java.lang.LinkageError: Failed to load jenkins.util.SystemProperties at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:377) at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:285) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at hudson.Util.(Util.java:1674) at hudson.FilePath.mkdirs(FilePath.java:3058) at hudson.FilePath.access$900(FilePath.java:207) at hudson.FilePath$Mkdirs.invoke(FilePath.java:1182) at hudson.FilePath$Mkdirs.invoke(FilePath.java:1178) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2873) at hudson.remoting.UserRequest.perform(UserRequest.java:153) at …Caused: java.io.IOException: Remote call on docker failed at hudson.remoting.Channel.call(Channel.java:961) at hudson.FilePath.act(FilePath.java:997) Caused: java.io.IOException: remote file operation failed: /…/workspace/… at hudson.remoting.Channel@…:docker at hudson.FilePath.act(FilePath.java:1004) at hudson.FilePath.act(FilePath.java:986) at hudson.FilePath.mkdirs(FilePath.java:1174) at hudson.model.AbstractProject.checkout(AbstractProject.java:1202) at … Finished: FAILURE
Code changed in jenkins
User: Jesse Glick
Path:
core/src/main/java/jenkins/util/SystemProperties.java
test/src/test/java/jenkins/util/SystemPropertiesTest.java
war/src/main/webapp/WEB-INF/web.xml
http://jenkins-ci.org/commit/jenkins/7948315142cd8ac82ee69ab42416ea8af574860b
Log:
JENKINS-46386 Make SystemProperties safe to call from agent JVMs.
Code changed in jenkins
User: Oleg Nenashev
Path:
core/src/main/java/jenkins/util/SystemProperties.java
test/src/test/java/jenkins/util/SystemPropertiesTest.java
war/src/main/webapp/WEB-INF/web.xml
http://jenkins-ci.org/commit/jenkins/63a58031624f196b18d93aef00c76a10543ec95f
Log:
Merge pull request #3362 from jglick/SystemProperties-JENKINS-46386
JENKINS-46386 Make SystemProperties safe to call from agent JVMs
Compare: https://github.com/jenkinsci/jenkins/compare/9e667a2f4fcd...63a58031624f
The patch from jglick has been released in 2.113.
I am closing this issue, because now the general use-case is addressed
Code changed in jenkins
User: Jesse Glick
Path:
core/src/main/java/jenkins/util/SystemProperties.java
test/src/test/java/jenkins/util/SystemPropertiesTest.java
war/src/main/webapp/WEB-INF/web.xml
http://jenkins-ci.org/commit/jenkins/615c3b1f616b9ba4aa5dd2c348b61b3546edf882
Log:
JENKINS-46386 Make SystemProperties safe to call from agent JVMs.
(cherry picked from commit 7948315142cd8ac82ee69ab42416ea8af574860b)
[Originally depends on: JENKINS-26677]
(previously posted about this on mailing list https://groups.google.com/forum/#!topic/jenkinsci-dev/Zte6nExHM8w was encouraged to file a ticket also)
I'm developing a cloud provider plugin and have run into an intermittent issue with launching agents. In the computer launch log I get this series of errors:
This doesn't happen every time. If the failure does happen, it seems to work if I manually relaunch the agent through the UI. In the remoting/logs on the agent itself, all it has is the ERROR: Connection terminated stuff towards the bottom
Originally reported by stevenfoster, imported from: Agent sometimes fails to launch in custom cloud provider