hudson.plugins.git.GitException: Failed to fetch from https://stash/product.git

Jenkins JIRA | Russell Gallop | 3 months ago
  1. 0

    We have a simple pipeline job that checks out source from git (stash) and builds it. This uses "Stash Webhook to Jenkins" commit notifications which should include a SHA1 hash. It generally works fine but occasionally the server will return http code 503 (log below) when checking out. After this, the job stops responding to commit notifications. While we have multiple nodes, this job is only running on one specific node (for performance reasons). Running the job manually gets it out of this state but this should not be necessary. I believe that Jenkins should be resilient to transient failures like this. {quote}> git -c core.askpass=true fetch --tags --progress https://stash/product.git +refs/heads/*:refs/remotes/origin/* # timeout=30 > git config --local --remove-section credential # timeout=10 ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException: Failed to fetch from https://stash/product.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:799) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1055) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1086) 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:52) at hudson.security.ACL.impersonate(ACL.java:213) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress https://stash/product.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: fatal: unable to access 'https://stash/product.git/': Received HTTP code 503 from proxy after CONNECT at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1740) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1476) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145) at hudson.remoting.UserRequest.perform(UserRequest.java:153) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at hudson.remoting.Engine$1$1.run(Engine.java:85) at java.lang.Thread.run(Thread.java:745) at ......remote call to jagent-lin6(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.UserResponse.retrieve(UserRequest.java:253) at hudson.remoting.Channel.call(Channel.java:781) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145) at sun.reflect.GeneratedMethodAccessor572.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131) at com.sun.proxy.$Proxy85.execute(Unknown Source) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797) ... 13 more{quote} Our pipeline script looks something like this...: {quote}node('specific_node') { stage('Check out') { checkout scm: [$class: 'GitSCM', branches: [[name: "*/master"]], doGenerateSubmoduleConfigurations: false, extensions: [ [$class: 'CleanCheckout'], [$class: 'CloneOption', reference: '', shallow: false, timeout: 30] ], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'abcd1234', url: 'https://git/product.git']] ] } } {quote}

    Jenkins JIRA | 3 months ago | Russell Gallop
    hudson.plugins.git.GitException: Failed to fetch from https://stash/product.git
  2. 0

    [JIRA] (JENKINS-38441) Commit notifications stop triggering job after error accessing git server

    Google Groups | 3 months ago | russell...@gmail.com (JIRA)
    hudson.plugins.git.GitException: Failed to fetch from https://stash/product.git
  3. 0

    Jenkins hangs on Mac slave when cloning from Gitlab instance

    Stack Overflow | 2 years ago | Bryan Sills
    hudson.plugins.git.GitException: Command "git fetch --tags --progress git@<GITLAB>:<USERNAME>/<REPO>.git +refs/heads/*:refs/remotes/origin/*" returned status code 143: stdout: stderr:
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Occasional git checkout error at http://ci.deis.io/

    GitHub | 2 years ago | mboersma
    hudson.plugins.git.GitException: Could not checkout null with start point 90e9e3f45ce232d4a3602f0232863e4317fc6892

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. hudson.plugins.git.GitException

      Command "git -c core.askpass=true fetch --tags --progress https://stash/product.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: fatal: unable to access 'https://stash/product.git/': Received HTTP code 503 from proxy after CONNECT

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn()
    2. org.jenkinsci.plugins
      RemoteGitImpl$CommandInvocationHandler$1.call
      1. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1740)
      2. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1476)
      3. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63)
      4. org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314)
      5. org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
      6. org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
      6 frames
    3. Hudson :: Remoting Layer
      InterceptingExecutorService$1.call
      1. hudson.remoting.UserRequest.perform(UserRequest.java:153)
      2. hudson.remoting.UserRequest.perform(UserRequest.java:50)
      3. hudson.remoting.Request$2.run(Request.java:332)
      4. hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      4 frames
    4. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:262)
      2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      3 frames
    5. Hudson :: Remoting Layer
      Engine$1$1.run
      1. hudson.remoting.Engine$1$1.run(Engine.java:85)
      1 frame
    6. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame