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

Timestamper break builds on Windows agents

XMLWordPrintable

    • core 2.161, timestamper-plugin 1.9

      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"
      

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

              Created:
              Updated:
              Resolved: