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

Git SCM polling starts job when network is down

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • None
    • Ubuntu Linux

      We have Jenkins set up in our intranet to poll a Bitbucket Git repository every minute. Last night our network went down so that the Git polling managed to see a change in Git, but when the job started Bitbucket was unavailable and fetching the repository failed.

      After this every minute even though the Git polling failed, it launched the job (which consequently failed as well). During the night it caused 1000 failed builds. If the Git polling cannot connect to the Git repository, it should not start the job.

      Polling log from a failed build (not the first one):

      Started on Aug 5, 2013 6:14:55 PM
      Using strategy: Default
      [poll] Last Built Revision: Revision [removed] (origin/feature/[removed])
      Fetching changes from the remote Git repositories
      Fetching upstream changes from origin
      ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
      hudson.plugins.git.GitException: Command "git fetch -t origin +refs/heads/:refs/remotes/origin/" returned status code 128:
      stdout:
      stderr: ssh: Could not resolve hostname bitbucket.org: Temporary failure in name resolution
      fatal: The remote end hung up unexpectedly

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:774)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:740)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:161)
      at hudson.plugins.git.GitAPI.fetch(GitAPI.java:230)
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:793)
      at hudson.plugins.git.GitSCM.access$000(GitSCM.java:57)
      at hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:723)
      at hudson.plugins.git.GitSCM$1.invoke(GitSCM.java:706)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2387)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:679)
      Polling for changes in
      Done. Took 5.1 sec
      Changes found

            ndeloof Nicolas De Loof
            plaa Sampo Niskanen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: