saurav
saurav

Reputation: 5926

Git polling in Jenkins failing

I am using git polling to trigger the build on jenkins.

I am on git plugin 3.0.0

It was working fine all these days but suddenly it has started to fail with the following error. With same credentials and git plugin my other build jobs are working with other git repos.

    Using strategy: Default
[poll] Last Built Revision: Revision 6c3463c502ba01b873b1e7959fe7cb81f3999e2f (origin/master)
using GIT_SSH to set credentials User for GIT/Gerrit
 > D:\Git\bin\git.exe ls-remote -h ssh://[email protected]:29418/myapp/myapp.git # timeout=10
ERROR: Timeout after 10 minutes
ERROR: Failed to join a process
org.jvnet.winp.WinpException: Failed to read environment variable table error=299 at .\envvar-cmdline.cpp:201
    at org.jvnet.winp.Native.getCmdLineAndEnvVars(Native Method)
    at org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:126)
    at org.jvnet.winp.WinProcess.getCommandLine(WinProcess.java:102)
    at hudson.util.ProcessTree$Windows$1.getArguments(ProcessTree.java:441)
    at hudson.plugins.msbuild.MsBuildKillingVeto.vetoProcessKilling(MsBuildKillingVeto.java:55)
    at hudson.util.ProcessTree$OSProcess.getVeto(ProcessTree.java:239)
    at hudson.util.ProcessTree$Windows$1.killRecursively(ProcessTree.java:422)
    at hudson.util.ProcessTree.killAll(ProcessTree.java:142)
    at hudson.Proc$LocalProc.destroy(Proc.java:378)
    at hudson.Proc$LocalProc.kill(Proc.java:370)
    at hudson.Proc$1.run(Proc.java:157)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Upvotes: 0

Views: 1350

Answers (1)

saurav
saurav

Reputation: 5926

Git polling was getting hung.

I have restarted Jenkins and it is working fine now according to the polling logs.

Our polling strategy was not right. We keep on polling every minute which is increasing the load on Jenkins server and it is running out of threads. Current restart of Jenkins is not a sustainable solution

We should move from git polling to git hook based solution which acts like a push notification

Check this https://groups.google.com/forum/#!topic/jenkinsci-users/smRQrhb2A-Q And this http://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/

cheers,

Saurav

Upvotes: 1

Related Questions