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

Jenkins Pipeline 'checkout scm' Fails on Specific Node

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • core

      I'm seeing a strange error during the Jenkins checkout scm stage after the initial Jenkinsfile checkout and node selection on one of my two nodes.

      For one particular node, Jenkins is omitting the "git" command in "git init" which expectedly fails the build.

      What I see on the failing node is this:

      > init /home/hudson/build/workspace/androidplatform_pipeline # timeout=10

      On my working node, running the exact same pipeline script, I see this:

      > git init /home/hudson/build/workspace/androidplatform_pipeline # timeout=10

      Both of my nodes are Amazon EC2 instances, so I tried deleting the failing one and replacing it with a clone of the working one, but the "git" command is still being omitted.

      Maybe this issue has been addressed? I've had a hard time structuring useful a query string for this issue.

      Thanks!

      Stack Trace
      Started by user ***** (*****)
      Checking out git https://stash.*****/scm/platform/androidplatform.git
      to read Jenkinsfile
      > git rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
      > git config remote.origin.url https://stash.*****/scm/platform/androidplatform.git # timeout=10
      Fetching upstream changes from https://stash.*****/scm/platform/androidplatform.git
      > git --version # timeout=10
      using GIT_ASKPASS to set credentials hudson user with password
      > git fetch --tags --progress https://stash.*****/scm/platform/androidplatform.git
      +refs/heads/:refs/remotes/origin/
      > git rev-parse refs/remotes/origin/ci/build/CI-87^{commit} # timeout=10
      > git rev-parse refs/remotes/origin/origin/ci/build/CI-87^{commit} # timeout=10
      Checking out Revision 1c807b3f6a1caeb082c24bc69d89464e5da14818 (refs/remotes/origin/ci/build/CI-87)
      > git config core.sparsecheckout # timeout=10
      > git checkout -f 1c807b3f6a1caeb082c24bc69d89464e5da14818 # timeout=60
      > git rev-list 1c807b3f6a1caeb082c24bc69d89464e5da14818 # timeout=10
      [Pipeline] node
      Running on andy-11-dc-big-replace in /home/hudson/build/workspace/androidplatform_pipeline
      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (Clean workspace)
      [Pipeline] deleteDir
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] stage
      [Pipeline] { (Checkout source)
      [Pipeline] checkout
      Cloning the remote Git repository
      Cloning repository https://stash.*****/scm/platform/androidplatform.git
      > init /home/hudson/build/workspace/androidplatform_pipeline # timeout=10
      ERROR: Error cloning remote repo 'origin'
      hudson.plugins.git.GitException: Could not init /home/hudson/build/workspace/androidplatform_pipeline
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:696)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:497)
      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:153)
      at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      at hudson.remoting.Request$2.run(Request.java:336)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      at ......remote call to andy-11-dc-big-replace(Native Method)
      at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
      at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
      at hudson.remoting.Channel.call(Channel.java:830)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
      at sun.reflect.GeneratedMethodAccessor836.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.$Proxy105.execute(Unknown Source)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1067)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1107)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:83)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:73)
      at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
      at hudson.security.ACL.impersonate(ACL.java:260)
      at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
      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:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: hudson.plugins.git.GitException: Error performing command: init /home/hudson/build/workspace/androidplatform_pipeline
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1910)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1871)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1867)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1512)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:694)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:497)
      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:153)
      at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      at hudson.remoting.Request$2.run(Request.java:336)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      ... 4 more
      Caused by: java.io.IOException: Cannot run program "" (in directory "/home/hudson/build/workspace/androidplatform_pipeline"): error=2, No such file or directory
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
      at hudson.Proc$LocalProc.<init>(Proc.java:245)
      at hudson.Proc$LocalProc.<init>(Proc.java:214)
      at hudson.Launcher$LocalLauncher.launch(Launcher.java:846)
      at hudson.Launcher$ProcStarter.start(Launcher.java:384)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1899)
      ... 15 more
      Caused by: java.io.IOException: error=2, No such file or directory
      at java.lang.UNIXProcess.forkAndExec(Native Method)
      at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
      at java.lang.ProcessImpl.start(ProcessImpl.java:134)
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
      ... 20 more
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: null
      Finished: FAILURE
       
      Pipeline Script

      node('andy-11-dc-big-replace') {
          try {

              stage('Clean workspace') {
                  deleteDir()
              }
              stage('Checkout source') {
                  checkout scm
              }

          } catch (e) {
              throw e
          }
      }

            Unassigned Unassigned
            georgecnj George C
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: