[
https://issues.jenkins-ci.org/browse/JENKINS-10880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=161240#comment-161240
]
Marc Günther commented on JENKINS-10880:
----------------------------------------
This only happens when you manually edit the config.xml files.
If you want to enable Fast Remote Polling, you can have only one branch, one
repository, and you can not use any excluded regions, excluded users or
submodules. Of course this is not documented anywhere.
Furthermore, if you DO enable it, and these requirements are not met, Jenkins
silently disables it again, without telling you anything about it.
BUT, if you enable it manually by editing the config.xml, then Jenkins will NOT
disable it. And then if you have more than one branch, the config will be in an
inconsistent state, which Jenkins is not able to handle.
> Git plugin fails on remote Poll
> -------------------------------
>
> Key: JENKINS-10880
> URL: https://issues.jenkins-ci.org/browse/JENKINS-10880
> Project: Jenkins
> Issue Type: Bug
> Components: git
> Affects Versions: current
> Reporter: robertdw
> Assignee: Kohsuke Kawaguchi
> Priority: Minor
>
> If you enable remote polling in the Git Plugin, the project will never poll
> successfully, and stops other projects polling as well.
> In GitSCM, requiresWorkspaceForPolling() returns false if remotePoll is
> enabled.
> https://github.com/jenkinsci/git-plugin/blob/git-1.1.12/src/main/java/hudson/plugins/git/GitSCM.java#L582
> This mean that in the jenkins-core AbstractProject (at least on the LTS
> branch), a null value is passed in for the workspace parameter to SCM.poll()
> https://github.com/jenkinsci/jenkins/blob/jenkins-1.409.1/core/src/main/java/hudson/model/AbstractProject.java#L1305
> This ends up in 'compareRemoteRevisionWith' back in GitSCM. At line 651, the
> call to 'workingDirectory(workspace)' returns null - because null was passed
> in as a param from AbstractProject. This means that at line 657, the call to
> !!workingDirectory.exists() results in a null pointer.
> Suggested fix: remove the remotePoll, or make it require a workspace to do
> the polling.
> Stacktrace:
> Sep 2, 2011 2:41:50 PM hudson.triggers.SCMTrigger$Runner runPolling
> SEVERE: Failed to record SCM polling
> java.lang.NullPointerException
> at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:657)
> at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:354)
> at hudson.scm.SCM.poll(SCM.java:371)
> at hudson.model.AbstractProject.poll(AbstractProject.java:1305)
> at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:420)
> at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:449)
> at hudson.triggers.SCMTrigger.run(SCMTrigger.java:103)
> at hudson.triggers.SCMTrigger.run(SCMTrigger.java:83)
> at hudson.triggers.Trigger$1.run(Trigger.java:229)
> at hudson.DependencyRunner.run(DependencyRunner.java:73)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira