Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55257

Timestamper break builds on Windows agents

    Details

    • Similar Issues:
    • Released As:
      core 2.161, timestamper-plugin 1.9

      Description

      The following pipeline fails on Windows agents:

      pipeline {
          options {
              timestamps()
              skipDefaultCheckout()
          }
          agent {
              label 'windows-astro'
          }
          stages {
              stage("Stage 1") {
                  steps {
                      git 'git@github.com:amuniz/maven-helloworld.git'
                      withMaven(jdk: 'jdk-8', maven: 'mvn-3.3.9', mavenLocalRepo: '.repository') {
                          bat 'mvn -version'
                      }
                  }
              }
          }
      }
      

      Error:

      [Pipeline] node
      Running on b314ca90e2fb in c:\build\e4909a8e\workspace\my-team\Tinkering\amuniz\test-p
      [Pipeline] {
      [Pipeline] timestamps
      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (Stage 1)
      [Pipeline] git
      Cloning the remote Git repository
      ERROR: Error cloning remote repo 'origin'
      hudson.plugins.git.GitException: java.io.IOException: Remote call on JNLP4-connect connection from ip-172-18-51-14.ec2.internal/172.18.51.14:49670 failed
      	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:169)
      	at sun.reflect.GeneratedMethodAccessor642.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
      	at com.sun.proxy.$Proxy125.execute(Unknown Source)
      	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1146)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:90)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:77)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)
      	at hudson.security.ACL.impersonate(ACL.java:290)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	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)
      Caused by: java.io.IOException: Remote call on JNLP4-connect connection from ip-172-18-51-14.ec2.internal/172.18.51.14:49670 failed
      	at hudson.remoting.Channel.call(Channel.java:961)
      	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
      	... 18 more
      Caused by: java.lang.IllegalAccessError: tried to access field hudson.remoting.Channel.executor from class org.jenkinsci.remoting.util.AnonymousClassWarnings
      	at org.jenkinsci.remoting.util.AnonymousClassWarnings.check(AnonymousClassWarnings.java:65)
      	at org.jenkinsci.remoting.util.AnonymousClassWarnings$1.annotateClass(AnonymousClassWarnings.java:119)
      	at java.io.ObjectOutputStream.writeNonProxyDesc(Unknown Source)
      	at java.io.ObjectOutputStream.writeClassDesc(Unknown Source)
      	at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
      	at java.io.ObjectOutputStream.writeObject0(Unknown Source)
      	at java.io.ObjectOutputStream.writeObject(Unknown Source)
      	at hudson.console.ConsoleNote.encodeToBytes(ConsoleNote.java:185)
      	at hudson.console.ConsoleNote.encode(ConsoleNote.java:211)
      	at hudson.plugins.timestamper.TimestampNotesOutputStream.eol(TimestampNotesOutputStream.java:70)
      	at hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:60)
      	at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:56)
      	at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:74)
      	at java.io.PrintStream.write(Unknown Source)
      	at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
      	at sun.nio.cs.StreamEncoder.implFlushBuffer(Unknown Source)
      	at sun.nio.cs.StreamEncoder.flushBuffer(Unknown Source)
      	at java.io.OutputStreamWriter.flushBuffer(Unknown Source)
      	at java.io.PrintStream.newLine(Unknown Source)
      	at java.io.PrintStream.println(Unknown Source)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:567)
      	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
      	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:207)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:53)
      	at hudson.remoting.Request$2.run(Request.java:358)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	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 hudson.remoting.Engine$1$1.run(Engine.java:98)
      	at java.lang.Thread.run(Unknown Source)
      	Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from ip-172-18-51-14.ec2.internal/172.18.51.14:49670
      		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
      		at hudson.remoting.UserResponse.retrieve(UserRequest.java:389)
      		at hudson.remoting.Channel.call(Channel.java:955)
      		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
      		at sun.reflect.GeneratedMethodAccessor642.invoke(Unknown Source)
      		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      		at java.lang.reflect.Method.invoke(Method.java:498)
      		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
      		at com.sun.proxy.$Proxy125.execute(Unknown Source)
      		at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1146)
      		at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
      		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120)
      		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:90)
      		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:77)
      		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)
      		at hudson.security.ACL.impersonate(ACL.java:290)
      		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)
      		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      		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)
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // timestamps
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: Error cloning remote repo 'origin'
      Finished: FAILURE
      

      Additional notes:

      1. It works on Linux agents.
      2. It works removing the timestamps() option.
      3. Agent details:

      Default locale: en_US, platform encoding: Cp1252
      OS name: "windows server 2016", version: "10.0", arch: "amd64", family: "dos"
      

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Likely a configuration issue rather than a Jenkins bug per se. Channel.executor is public and should be in the same JAR file. What version of Java is the agent running?

            Show
            jglick Jesse Glick added a comment - Likely a configuration issue rather than a Jenkins bug per se. Channel.executor is public and should be in the same JAR file. What version of Java is the agent running?
            Hide
            amuniz Antonio Muñiz added a comment -

            It's JRE-8u151 to launch the agent and then the build uses a regular tool installer for 1.8.0_192.

            Show
            amuniz Antonio Muñiz added a comment - It's JRE-8u151 to launch the agent and then the build uses a regular tool installer for 1.8.0_192 .
            Hide
            wgc123 D Pasto added a comment -

            FWIW - I'm running into what looks like the same issue.  I have a declarative pipeline and couldn't understand why it's only my branch blowing up this way, and I see it with the default checkout, an explicit 'checkout scm', or 'git ...'.  I'm running timestamper 1.8.10 and java 1.8.0_191-b12 64bit.  Commenting out the timestamps option got me past this.

            Show
            wgc123 D Pasto added a comment - FWIW - I'm running into what looks like the same issue.  I have a declarative pipeline and couldn't understand why it's only my branch blowing up this way, and I see it with the default checkout, an explicit 'checkout scm', or 'git ...'.  I'm running timestamper 1.8.10 and java 1.8.0_191-b12 64bit.  Commenting out the timestamps option got me past this.
            Hide
            rlariviere Richer Larivière added a comment -

            I'm having the same issue with Jenkins v2.150.1.

            Show
            rlariviere Richer Larivière added a comment - I'm having the same issue with Jenkins v2.150.1.
            Hide
            jthompson Jeff Thompson added a comment -

            I'll try reproducing it when I can get a Windows machine set up. In the meantime if anyone can provide more information, logs, or simple reproduction steps, that might help.

            Show
            jthompson Jeff Thompson added a comment - I'll try reproducing it when I can get a Windows machine set up. In the meantime if anyone can provide more information, logs, or simple reproduction steps, that might help.
            Hide
            levt Lev Tartakovsky added a comment -

            The problem seams affecting only Windows server 2016.
            It appeared after upgrading Jenkins master to 2.150.1. 
            Has somebody observed similar problems at other OS? 

            Show
            levt Lev Tartakovsky added a comment - The problem seams affecting only Windows server 2016. It appeared after upgrading Jenkins master to 2.150.1.  Has somebody observed similar problems at other OS? 
            Hide
            levt Lev Tartakovsky added a comment -

            Jeff Thompson, at our slave's jenkins-slave.err.log and remoting.log we get similar error:
            Dec 24, 2018 4:56:55 PM hudson.remoting.UserRequest perform
            WARNING: LinkageError while performing UserRequest:sp.sd.fileoperations.FolderCreateOperation$TargetFileCallable@30c1b52a
            java.lang.IllegalAccessError: tried to access field hudson.remoting.Channel.executor from class org.jenkinsci.remoting.util.AnonymousClassWarnings
            at org.jenkinsci.remoting.util.AnonymousClassWarnings.check(AnonymousClassWarnings.java:65)
            at org.jenkinsci.remoting.util.AnonymousClassWarnings$1.annotateClass(AnonymousClassWarnings.java:121)
            at java.io.ObjectOutputStream.writeNonProxyDesc(Unknown Source)
            at java.io.ObjectOutputStream.writeClassDesc(Unknown Source)
            at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
            at java.io.ObjectOutputStream.writeObject0(Unknown Source)
            at java.io.ObjectOutputStream.writeObject(Unknown Source)
            at hudson.console.ConsoleNote.encodeToBytes(ConsoleNote.java:185)
            at hudson.console.ConsoleNote.encode(ConsoleNote.java:211)
            at hudson.plugins.timestamper.TimestampNotesOutputStream.eol(TimestampNotesOutputStream.java:70)
            at hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:60)
            at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:56)
            at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:74)
            at java.io.PrintStream.write(Unknown Source)
            at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
            at sun.nio.cs.StreamEncoder.implFlushBuffer(Unknown Source)
            at sun.nio.cs.StreamEncoder.flushBuffer(Unknown Source)
            at java.io.OutputStreamWriter.flushBuffer(Unknown Source)
            at java.io.PrintStream.newLine(Unknown Source)
            at java.io.PrintStream.println(Unknown Source)
            at sp.sd.fileoperations.FolderCreateOperation$TargetFileCallable.invoke(FolderCreateOperation.java:69)
            at sp.sd.fileoperations.FolderCreateOperation$TargetFileCallable.invoke(FolderCreateOperation.java:51)
            at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3086)
            at hudson.remoting.UserRequest.perform(UserRequest.java:205)
            at hudson.remoting.UserRequest.perform(UserRequest.java:52)
            at hudson.remoting.Request$2.run(Request.java:356)
            at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
            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 hudson.remoting.Engine$1$1.run(Engine.java:98)
            at java.lang.Thread.run(Unknown Source)

            Show
            levt Lev Tartakovsky added a comment - Jeff Thompson , at our slave's jenkins-slave.err.log and remoting.log we get similar error: Dec 24, 2018 4:56:55 PM hudson.remoting.UserRequest perform WARNING: LinkageError while performing UserRequest:sp.sd.fileoperations.FolderCreateOperation$TargetFileCallable@30c1b52a java.lang.IllegalAccessError: tried to access field hudson.remoting.Channel.executor from class org.jenkinsci.remoting.util.AnonymousClassWarnings at org.jenkinsci.remoting.util.AnonymousClassWarnings.check(AnonymousClassWarnings.java:65) at org.jenkinsci.remoting.util.AnonymousClassWarnings$1.annotateClass(AnonymousClassWarnings.java:121) at java.io.ObjectOutputStream.writeNonProxyDesc(Unknown Source) at java.io.ObjectOutputStream.writeClassDesc(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at hudson.console.ConsoleNote.encodeToBytes(ConsoleNote.java:185) at hudson.console.ConsoleNote.encode(ConsoleNote.java:211) at hudson.plugins.timestamper.TimestampNotesOutputStream.eol(TimestampNotesOutputStream.java:70) at hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:60) at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:56) at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:74) at java.io.PrintStream.write(Unknown Source) at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source) at sun.nio.cs.StreamEncoder.implFlushBuffer(Unknown Source) at sun.nio.cs.StreamEncoder.flushBuffer(Unknown Source) at java.io.OutputStreamWriter.flushBuffer(Unknown Source) at java.io.PrintStream.newLine(Unknown Source) at java.io.PrintStream.println(Unknown Source) at sp.sd.fileoperations.FolderCreateOperation$TargetFileCallable.invoke(FolderCreateOperation.java:69) at sp.sd.fileoperations.FolderCreateOperation$TargetFileCallable.invoke(FolderCreateOperation.java:51) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3086) at hudson.remoting.UserRequest.perform(UserRequest.java:205) at hudson.remoting.UserRequest.perform(UserRequest.java:52) at hudson.remoting.Request$2.run(Request.java:356) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 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 hudson.remoting.Engine$1$1.run(Engine.java:98) at java.lang.Thread.run(Unknown Source)
            Hide
            markewaite Mark Waite added a comment -

            I can't duplicate the problem as described on Windows 10. I'm surprised if it is truly specific to Windows Server 2016 and not visible on Windows 10.

            The repository where I've tried various permutations of the bug duplication instructions is the JENKINS-55257 branch of my jenkins-bugs repository.

            My Java versions are JDK 8 on agents and on master, with all the agents running at least 1.8.0 151. The master is running JDK 8 162 from my my docker image.

            Show
            markewaite Mark Waite added a comment - I can't duplicate the problem as described on Windows 10. I'm surprised if it is truly specific to Windows Server 2016 and not visible on Windows 10. The repository where I've tried various permutations of the bug duplication instructions is the JENKINS-55257 branch of my jenkins-bugs repository . My Java versions are JDK 8 on agents and on master, with all the agents running at least 1.8.0 151. The master is running JDK 8 162 from my my docker image .
            Hide
            wgc123 D Pasto added a comment - - edited

            For me this is happening on a Win 2012r2 agent, so it is not just Win2016.  The Jenkins agent is running as administrator with UAC set to never.

            Show
            wgc123 D Pasto added a comment - - edited For me this is happening on a Win 2012r2 agent, so it is not just Win2016.  The Jenkins agent is running as administrator with UAC set to never.
            Hide
            jthompson Jeff Thompson added a comment -

            I tried reproducing this on 2.150.1 with Windows Server 2016. Everything worked fine.

            As Jesse said originally it's most likely a configuration issue. Or possibly some interaction with another another plugin. There is no indication this is a Remoting problem. And probably not a Timestamper problem.

            As reported there is insufficient information to reproduce or analyze. If anyone can provide further details, isolate the problem more, or troubleshoot their configuration that we be useful. Otherwise it's probably best to mark this as Cannot Reproduce.

            Show
            jthompson Jeff Thompson added a comment - I tried reproducing this on 2.150.1 with Windows Server 2016. Everything worked fine. As Jesse said originally it's most likely a configuration issue. Or possibly some interaction with another another plugin. There is no indication this is a Remoting problem. And probably not a Timestamper problem. As reported there is insufficient information to reproduce or analyze. If anyone can provide further details, isolate the problem more, or troubleshoot their configuration that we be useful. Otherwise it's probably best to mark this as Cannot Reproduce.
            Hide
            wgc123 D Pasto added a comment -

            > Channel.executor is public and should be in the same JAR file.

            What about the other direction?  I’m not very familiar with jar files but they’re just zip files, right?  Is there anything we can inspect?  What file is this and what version?  What can we try updating or reverting?

            Show
            wgc123 D Pasto added a comment - > Channel.executor is public and should be in the same JAR file. What about the other direction?  I’m not very familiar with jar files but they’re just zip files, right?  Is there anything we can inspect?  What file is this and what version?  What can we try updating or reverting?
            Hide
            chamshoff Christoph Amshoff added a comment - - edited

            Same problem here after upgrading Jenkins Core from 2.138.3 to 2.150.1, along with several Pipeline/Blue Ocean plugin updates. Agents are running under Windows Server 2012 R2 and 2016. Removing timestamps() step fixed the build, but that's not really an option for us (lots of jobs in different branches), so we had to rollback the update... hence this is a showstopper, actually.

            Configuration worked before and did not change, so it's definitely related to the update and I doubt it's a configuration problem.

             

            Show
            chamshoff Christoph Amshoff added a comment - - edited Same problem here after upgrading Jenkins Core from 2.138.3 to 2.150.1, along with several Pipeline/Blue Ocean plugin updates. Agents are running under Windows Server 2012 R2 and 2016. Removing timestamps() step fixed the build, but that's not really an option for us (lots of jobs in different branches), so we had to rollback the update... hence this is a showstopper, actually. Configuration worked before and did not change, so it's definitely related to the update and I doubt it's a configuration problem.  
            Hide
            jglick Jesse Glick added a comment -

            I’m not very familiar with jar files but they’re just zip files, right?

            Correct.

            Short of a known way to reproduce this error from scratch in a fresh installation of Jenkins, the diagnostic path I would start with is opening the Groovy console on an affected agent and running

            [hudson.remoting.Channel, org.jenkinsci.remoting.util.AnonymousClassWarnings]*.protectionDomain.codeSource.location
            

            You would expect to see something like

            Result: [https://jenkins/jnlpJars/remoting.jar, https://host:jenkins/jnlpJars/remoting.jar]
            

            If you see something else, then we have a lead. If you see the above, then some other diagnostics would be needed.

            Configuration worked before and did not change, so it's definitely related to the update

            “Related” to the update perhaps, but that does not imply a bug in any software which was updated. Incidental changes in behavior often cause existing misconfigurations to become manifest. Similarly, my proposed rewrite in JENKINS-48344 would delete the code path which evidently triggers this problem, but that does not make it a “fix” for this issue.

            Show
            jglick Jesse Glick added a comment - I’m not very familiar with jar files but they’re just zip files, right? Correct. Short of a known way to reproduce this error from scratch in a fresh installation of Jenkins, the diagnostic path I would start with is opening the Groovy console on an affected agent and running [hudson.remoting.Channel, org.jenkinsci.remoting.util.AnonymousClassWarnings]*.protectionDomain.codeSource.location You would expect to see something like Result: [https://jenkins/jnlpJars/remoting.jar, https://host:jenkins/jnlpJars/remoting.jar] If you see something else, then we have a lead. If you see the above, then some other diagnostics would be needed. Configuration worked before and did not change, so it's definitely related to the update “Related” to the update perhaps, but that does not imply a bug in any software which was updated. Incidental changes in behavior often cause existing misconfigurations to become manifest. Similarly, my proposed rewrite in JENKINS-48344 would delete the code path which evidently triggers this problem, but that does not make it a “fix” for this issue.
            Hide
            wgc123 D Pasto added a comment -

            Does this mean anything?

            Result: [file:/C:/Jenkins/slave.jar, null]
            
            Show
            wgc123 D Pasto added a comment - Does this mean anything? Result: [file:/C:/Jenkins/slave.jar, null ]
            Hide
            jglick Jesse Glick added a comment -

            That would be consistent with an older slave.jar that predates the addition of the org/jenkinsci/remoting/util/AnonymousClassWarnings.class entry. That in itself is unsurprising. The question is where the reference to this class comes from. Presumably it is being remotely loaded from the master, via ConsoleNote.encodeToBytes. I think the problem is that this method is being called from the agent side, which it should not. And that in turn means that the problem is solved by JENKINS-48344.

            So now we just need for Steven G Brown to merge my PR.

            Show
            jglick Jesse Glick added a comment - That would be consistent with an older slave.jar that predates the addition of the org/jenkinsci/remoting/util/AnonymousClassWarnings.class entry. That in itself is unsurprising. The question is where the reference to this class comes from. Presumably it is being remotely loaded from the master, via ConsoleNote.encodeToBytes . I think the problem is that this method is being called from the agent side, which it should not. And that in turn means that the problem is solved by JENKINS-48344 . So now we just need for Steven G Brown to merge my PR.
            Hide
            jglick Jesse Glick added a comment -

            In the meantime, I suspect core PR 3851 would fix the exception, if anyone wants to test it.

            Show
            jglick Jesse Glick added a comment - In the meantime, I suspect core PR 3851 would fix the exception, if anyone wants to test it.
            Hide
            jglick Jesse Glick added a comment -

            Oh, and probable way to reproduce (Jeff Thompson you might manage it): run an agent using an old version of slave.jar; use timestamper (without my fix); and run some step which produces remote logging, like git, or just sh if you are running with -Dorg.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep.USE_WATCHING=true.

            Show
            jglick Jesse Glick added a comment - Oh, and probable way to reproduce ( Jeff Thompson you might manage it): run an agent using an old version of slave.jar ; use timestamper (without my fix); and run some step which produces remote logging, like git , or just sh if you are running with -Dorg.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep.USE_WATCHING=true .
            Hide
            jthompson Jeff Thompson added a comment -

            If it's not connected with Remoting, my interest in reproducing it wanes. I'm satisfied that you have a handle on the cause and resolution. Unless you need me to review and test the PR. Of course, it would be better if someone who is actually experiencing the problem could do that.

            Show
            jthompson Jeff Thompson added a comment - If it's not connected with Remoting, my interest in reproducing it wanes. I'm satisfied that you have a handle on the cause and resolution. Unless you need me to review and test the PR. Of course, it would be better if someone who is actually experiencing the problem could do that.
            Hide
            jglick Jesse Glick added a comment -

            It is certainly related to Remoting, though I do not believe it is a bug in Remoting.

            Show
            jglick Jesse Glick added a comment - It is certainly related to Remoting, though I do not believe it is a bug in Remoting.
            Hide
            wgc123 D Pasto added a comment -

            Looks similar to JENKINS-54058,[ as does the current characterization of this issue.  What do you think?

            Show
            wgc123 D Pasto added a comment - Looks similar to  JENKINS-54058 , [ as does the current characterization of this issue.  What do you think?
            Hide
            jglick Jesse Glick added a comment -

            Reproduced the stack trace under somewhat artificial conditions in a functional test, so I am pretty confident my core patch would fix it even if the timestamper plugin patch continues to be delayed.

            For affected users, the workaround is simple: upgrade your agent JARs.

            Show
            jglick Jesse Glick added a comment - Reproduced the stack trace under somewhat artificial conditions in a functional test, so I am pretty confident my core patch would fix it even if the timestamper plugin patch continues to be delayed. For affected users, the workaround is simple: upgrade your agent JARs.
            Hide
            wgc123 D Pasto added a comment - - edited

            Verified that upgrading the agent worked for me.

            We ran into this because we deployed agents from a VM template with an old jar, and Jenkins disabled automatic agent updates because we are not running HTTPS.

            Show
            wgc123 D Pasto added a comment - - edited Verified that upgrading the agent worked for me. We ran into this because we deployed agents from a VM template with an old jar, and Jenkins disabled automatic agent updates because we are not running HTTPS.
            Hide
            handyman Dan Hyman added a comment -

            Running into this same error. We were on 2.138.1, upgraded to 2.150.2 with no change. 

             12:32:58 ERROR: Error cloning remote repo 'XXXXX'
            12:32:58 hudson.plugins.git.GitException: java.io.IOException: Remote call on JNLP4-connect connection from XXXXXXXXXX/XX.XX.XX.XX:XXXXX failed
            12:32:58 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:169)
            12:32:58 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            12:32:58 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            12:32:58 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            12:32:58 at java.lang.reflect.Method.invoke(Method.java:498)
            12:32:58 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
            12:32:58 at com.sun.proxy.$Proxy111.execute(Unknown Source)
            12:32:58 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1146)
            12:32:58 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
            12:32:58 at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120)
            12:32:58 at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:90)
            12:32:58 at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:77)
            12:32:58 at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)
            12:32:58 at hudson.security.ACL.impersonate(ACL.java:290)
            12:32:58 at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)
            12:32:58 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
            12:32:58 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            12:32:58 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
            12:32:58 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
            12:32:58 at java.lang.Thread.run(Thread.java:745)
            12:32:58 Caused by: java.io.IOException: Remote call on JNLP4-connect connection from XXXXXXXXXX/XX.XX.XX.XX:XXXXX failed
            12:32:58 at hudson.remoting.Channel.call(Channel.java:961)
            12:32:58 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
            12:32:58 ... 19 more
            12:32:58 Caused by: java.lang.IllegalAccessError: tried to access field hudson.remoting.Channel.executor from class org.jenkinsci.remoting.util.AnonymousClassWarnings
            12:32:58 at org.jenkinsci.remoting.util.AnonymousClassWarnings.check(AnonymousClassWarnings.java:65)
            12:32:58 at org.jenkinsci.remoting.util.AnonymousClassWarnings$1.annotateClass(AnonymousClassWarnings.java:121)
            12:32:58 at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1290)
            12:32:58 at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1231)
            12:32:58 at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1427)
            12:32:58 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
            12:32:58 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
            12:32:58 at hudson.console.ConsoleNote.encodeToBytes(ConsoleNote.java:185)
            12:32:58 at hudson.console.ConsoleNote.encode(ConsoleNote.java:211)
            12:32:58 at hudson.plugins.timestamper.TimestampNotesOutputStream.eol(TimestampNotesOutputStream.java:70)
            12:32:58 at hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:60)
            12:32:58 at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:56)
            12:32:58 at hudson.plugins.ansicolor.AnsiOutputStream.write(AnsiOutputStream.java:87)
            12:32:58 at hudson.plugins.ansicolor.AnsiHtmlOutputStream.write(AnsiHtmlOutputStream.java:220)
            12:32:58 at java.io.FilterOutputStream.write(FilterOutputStream.java:125)
            12:32:58 at java.io.PrintStream.write(PrintStream.java:480)
            12:32:58 at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
            12:32:58 at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
            12:32:58 at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:104)
            12:32:58 at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:185)
            12:32:58 at java.io.PrintStream.newLine(PrintStream.java:546)
            12:32:58 at java.io.PrintStream.println(PrintStream.java:807)
            12:32:58 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:593)
            12:32:58 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
            12:32:58 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
            12:32:58 at hudson.remoting.UserRequest.perform(UserRequest.java:153)
            12:32:58 at hudson.remoting.UserRequest.perform(UserRequest.java:50)
            12:32:58 at hudson.remoting.Request$2.run(Request.java:336)
            12:32:58 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
            12:32:58 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            12:32:58 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
            12:32:58 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
            12:32:58 at hudson.remoting.Engine$1$1.run(Engine.java:94)
            12:32:58 ... 1 more

             

            Show
            handyman Dan Hyman added a comment - Running into this same error. We were on 2.138.1, upgraded to 2.150.2 with no change.   12:32:58 ERROR: Error cloning remote repo 'XXXXX' 12:32:58 hudson.plugins.git.GitException: java.io.IOException: Remote call on JNLP4-connect connection from XXXXXXXXXX/XX.XX.XX.XX:XXXXX failed 12:32:58 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:169) 12:32:58 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 12:32:58 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 12:32:58 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 12:32:58 at java.lang.reflect.Method.invoke(Method.java:498) 12:32:58 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132) 12:32:58 at com.sun.proxy.$Proxy111.execute(Unknown Source) 12:32:58 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1146) 12:32:58 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186) 12:32:58 at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120) 12:32:58 at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:90) 12:32:58 at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:77) 12:32:58 at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50) 12:32:58 at hudson.security.ACL.impersonate(ACL.java:290) 12:32:58 at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47) 12:32:58 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 12:32:58 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 12:32:58 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 12:32:58 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 12:32:58 at java.lang.Thread.run(Thread.java:745) 12:32:58 Caused by: java.io.IOException: Remote call on JNLP4-connect connection from XXXXXXXXXX/XX.XX.XX.XX:XXXXX failed 12:32:58 at hudson.remoting.Channel.call(Channel.java:961) 12:32:58 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146) 12:32:58 ... 19 more 12:32:58 Caused by: java.lang.IllegalAccessError: tried to access field hudson.remoting.Channel.executor from class org.jenkinsci.remoting.util.AnonymousClassWarnings 12:32:58 at org.jenkinsci.remoting.util.AnonymousClassWarnings.check(AnonymousClassWarnings.java:65) 12:32:58 at org.jenkinsci.remoting.util.AnonymousClassWarnings$1.annotateClass(AnonymousClassWarnings.java:121) 12:32:58 at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1290) 12:32:58 at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1231) 12:32:58 at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1427) 12:32:58 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) 12:32:58 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) 12:32:58 at hudson.console.ConsoleNote.encodeToBytes(ConsoleNote.java:185) 12:32:58 at hudson.console.ConsoleNote.encode(ConsoleNote.java:211) 12:32:58 at hudson.plugins.timestamper.TimestampNotesOutputStream.eol(TimestampNotesOutputStream.java:70) 12:32:58 at hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:60) 12:32:58 at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:56) 12:32:58 at hudson.plugins.ansicolor.AnsiOutputStream.write(AnsiOutputStream.java:87) 12:32:58 at hudson.plugins.ansicolor.AnsiHtmlOutputStream.write(AnsiHtmlOutputStream.java:220) 12:32:58 at java.io.FilterOutputStream.write(FilterOutputStream.java:125) 12:32:58 at java.io.PrintStream.write(PrintStream.java:480) 12:32:58 at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221) 12:32:58 at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291) 12:32:58 at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:104) 12:32:58 at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:185) 12:32:58 at java.io.PrintStream.newLine(PrintStream.java:546) 12:32:58 at java.io.PrintStream.println(PrintStream.java:807) 12:32:58 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:593) 12:32:58 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153) 12:32:58 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146) 12:32:58 at hudson.remoting.UserRequest.perform(UserRequest.java:153) 12:32:58 at hudson.remoting.UserRequest.perform(UserRequest.java:50) 12:32:58 at hudson.remoting.Request$2.run(Request.java:336) 12:32:58 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) 12:32:58 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 12:32:58 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 12:32:58 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 12:32:58 at hudson.remoting.Engine$1$1.run(Engine.java:94) 12:32:58 ... 1 more  
            Hide
            handyman Dan Hyman added a comment -

            ...and upgrading slave.jar is a solid workaround for us.
            Game on!

            Show
            handyman Dan Hyman added a comment - ...and upgrading slave.jar is a solid workaround for us. Game on!

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                amuniz Antonio Muñiz
              • Votes:
                7 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: