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

SCM checkout retry count not working

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      From time to time I reveive error when getting SCM changes from Git repository and the option "SCM checkout retry count" (I have set it to 3) is not working.

      ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
      hudson.plugins.git.GitException: Command "git fetch -t git@github.com:xxx/xxx +refs/heads/:refs/remotes/origin/" returned status code 128:
      stdout:
      stderr: ssh_exchange_identification: Connection closed by remote host
      fatal: The remote end hung up unexpectedly

      at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:818)
      at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:780)
      at hudson.plugins.git.GitAPI.fetch(GitAPI.java:196)
      at hudson.plugins.git.GitAPI.fetch(GitAPI.java:1026)
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:812)
      at hudson.plugins.git.GitSCM.access$100(GitSCM.java:90)
      at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1096)
      at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1064)
      at hudson.FilePath.act(FilePath.java:842)
      at hudson.FilePath.act(FilePath.java:824)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1064)
      at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:117)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1249)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
      at hudson.model.Run.execute(Run.java:1488)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:236)
      ERROR: Could not fetch from any repository
      FATAL: Could not fetch from any repository
      hudson.plugins.git.GitException: Could not fetch from any repository
      at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1103)
      at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1064)
      at hudson.FilePath.act(FilePath.java:842)
      at hudson.FilePath.act(FilePath.java:824)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1064)
      at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:117)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1249)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
      at hudson.model.Run.execute(Run.java:1488)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:236)

        Attachments

          Activity

          Hide
          jyrmyx Jyri Ilama added a comment -

          Doesn't work anymore with git-plugin v>= 2.0.
          The same problem as earlier, gets fixed by changing throwing from GitException -> IOException.
          git/src/main/java/hudson/plugins/git/GitSCM.java:629:
          catch (GitException ex)

          { throw new IOException("Failed to fetch from "+url.toString(), ex); }
          Show
          jyrmyx Jyri Ilama added a comment - Doesn't work anymore with git-plugin v>= 2.0. The same problem as earlier, gets fixed by changing throwing from GitException -> IOException. git/src/main/java/hudson/plugins/git/GitSCM.java:629: catch (GitException ex) { throw new IOException("Failed to fetch from "+url.toString(), ex); }
          Hide
          wooh Adam PAPAI added a comment -

          Sent PR and this time I added a test as well. So I won't happen again hopefully.

          Show
          wooh Adam PAPAI added a comment - Sent PR and this time I added a test as well. So I won't happen again hopefully.
          Hide
          gc Gaurav Chhabra added a comment -

          SCM checkout retry count isn’t working. I set it to 3 after upgrading the GIT client plugins.

          Following are the details:
          Jenkins core is at 1.547
          Git server plugin is at 1.3
          Jenkins GIT client plugin is at 1.8.0
          Jenkins GIT plugin is at 2.2.1

          Show
          gc Gaurav Chhabra added a comment - SCM checkout retry count isn’t working. I set it to 3 after upgrading the GIT client plugins. Following are the details: Jenkins core is at 1.547 Git server plugin is at 1.3 Jenkins GIT client plugin is at 1.8.0 Jenkins GIT plugin is at 2.2.1
          Hide
          cg Christian Goetze added a comment -

          Just to note that it isn't working for me either - using Jenkins 1.558, Git Client Plugin 1.9.1, Git Plugin 2.2.1.

          Sadly, we do get the occasional ssh connect failure, and we can't seem to find a way to fix it by itself, so retrying the checkout is the only way for us to get more reliable builds.

          Show
          cg Christian Goetze added a comment - Just to note that it isn't working for me either - using Jenkins 1.558, Git Client Plugin 1.9.1, Git Plugin 2.2.1. Sadly, we do get the occasional ssh connect failure, and we can't seem to find a way to fix it by itself, so retrying the checkout is the only way for us to get more reliable builds.
          Hide
          sdecooma Sofie De Cooman added a comment -

          We still run into this issue - we're using git plugin v3.8.0

          e.g. while loading a shared pipeline library on a multibranch-pipeline

          We got error "unable to access [shared pipeline repo git repo url]: The requested URL returned error: 504

          WorkflowScript: Loading libraries failed

           

          No retry is done to load the shared pipeline library, while SCM retry count is set to 5 

          Show
          sdecooma Sofie De Cooman added a comment - We still run into this issue - we're using git plugin v3.8.0 e.g. while loading a shared pipeline library on a multibranch-pipeline We got error "unable to access [shared pipeline repo git repo url] : The requested URL returned error: 504 WorkflowScript: Loading libraries failed   No retry is done to load the shared pipeline library, while SCM retry count is set to 5 

            People

            • Assignee:
              wooh Adam PAPAI
              Reporter:
              lnowak Łukasz Nowak
            • Votes:
              8 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

              • Created:
                Updated: