Git Polling fails

63 views
Skip to first unread message

ok999

unread,
Sep 13, 2016, 12:39:09 PM9/13/16
to Jenkins Users
I have a very simple job that polls the Git SCM, and if any changes if kicks of a downstream job. For the last 1 week, the Git polling fails with the below error. 

Git Polling Log
Started on Sep 12, 2016 9:44:04 AM
Polling SCM changes on Agent1
Using strategy: Default
[poll] Last Built Revision: Revision b95fc53f42ff764c390e22d1dfcc132f20 (refs/remotes/my_repo/develop)
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repositories
> git config remote.my_repo.url https://tfs.org.com/tfs/DefaultCollection/Some-Org/_git/my_repo # timeout=10
Cleaning workspace
> git rev-parse --verify HEAD # timeout=10
Resetting working tree
> git reset --hard # timeout=10
> git clean -fdx # timeout=10
> git --version # timeout=10
using .gitcredentials to set credentials
> git config --local credential.username JenkinsUser # timeout=10
> git config --local credential.helper store --file=\"C:\Users\JenkinsUser~1\AppData\Local\Temp\git4353270016803178193.credentials\" # timeout=10
> git -c core.askpass=true fetch --no-tags --progress https://tfs.org.com/tfs/DefaultCollection/Some-Org/_git/my_repo +refs/heads/*:refs/remotes/my_repo/*
> git config --local --remove-section credential # timeout=10
FATAL: hudson.plugins.git.GitException: Failed to fetch from https://tfs.org.com/tfs/DefaultCollection/Some-Org/_git/my_repo
hudson.util.IOException2: hudson.plugins.git.GitException: Failed to fetch from https://tfs.org.com/tfs/DefaultCollection/Some-Org/_git/my_repo
        at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:529)
        at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:381)
        at hudson.scm.SCM.poll(SCM.java:398)
        at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1475)
        at hudson.model.AbstractProject._poll(AbstractProject.java:1445)
        at hudson.model.AbstractProject.poll(AbstractProject.java:1356)
        at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:526)
        at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:555)
        at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
        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: Failed to fetch from https://tfs.org.com/tfs/DefaultCollection/Some-Org/_git/my_repo
        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:766)
        at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:657)
        at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:527)
        ... 13 more
Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --no-tags --progress https://tfs.org.com/tfs/DefaultCollection/Some-Org/_git/my_repo +refs/heads/*:refs/remotes/my_repo/*" returned status code 1:
stdout: 
stderr: remote: Microsoft (R) Visual Studio (R) Team Foundation Server[K
remote: 
remote: Found 49 objects to send. (36 ms)[K
error: Could not read 6f4eb3c55fd98c719baf898a9352a1100fa32765
fatal: revision walk setup failed
error: https://tfs.org.com/tfs/DefaultCollection/Some-Org/_git/my_repo did not send all necessary objects


        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1710)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1454)
        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:120)
        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: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 java.lang.Thread.run(Thread.java:744)
        at ......remote call to Agent1(Native Method)
        at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
        at hudson.remoting.UserResponse.retrieve(UserRequest.java:220)
        at hudson.remoting.Channel.call(Channel.java:781)
        at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145)
        at sun.reflect.GeneratedMethodAccessor670.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131)
        at com.sun.proxy.$Proxy104.execute(Unknown Source)
        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:764)
        ... 15 more
Done. Took 50 sec
No changes


Manual test with the git clone/fetch works. And when this polling issue starts, i can kick off the build, that does a clone of the repo and it works. Moreover, the git polling starts to works after i manually kick start the job, but the issue re-appears after some time again. 


Mark Waite

unread,
Sep 13, 2016, 2:20:12 PM9/13/16
to Jenkins Users
Are you sure that you executed the same commands when trying to duplicate the problem?  The message seems to be from your server and seems to say that a specific sha1 cannot be found in the remote repository.

Is there any server maintenance on your TFS server at the time you see the issue?

Mark Waite

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a8acf6b4-590b-4e66-909b-a198873d5425%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Mark Waite

unread,
Sep 16, 2016, 9:48:35 AM9/16/16
to Jenkins Users

Since that message comes from the server side, I think you may need to talk with the people providing your git server.

You might create a job or two which retain their full history and only perform polling and cloning with no build step.

Another step might be to create a separate script running outside Jenkins which frequently polls and alerts you to any messages.  That would provide more evidence the problem is on the server

Mark Waite


On Fri, Sep 16, 2016, 6:32 AM ok999 <nirish...@gmail.com> wrote:
Yes, i am sure that i used the same command for duplicating. I can see the commit just fine via: git show #{SHA}
Moreover, the job executes successfully when started manually. And it involves cloning the repo.  
Reply all
Reply to author
Forward
0 new messages