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

Github Webhook not working after upgrade Jenkins and plugins

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: git-plugin, github-plugin
    • Labels:
      None
    • Environment:
      Latest Jenkins 1.601 but hte issue had appeared in 1.600
    • Similar Issues:

      Description

      When github sends a webhook to trigger a build in Jenkins, the Job does not start.
      I've already downgraded Jenkins and github plugin back to original versions but the issue persists.
      I've also wiped the workspace and started an initial build manually, and the issue persists
      Adding the logger: "com.cloudbees.jenkins.GitHubWebHook" I can see this stacktrace:

      Mar 08, 2015 6:29:57 PM INFO com.cloudbees.jenkins.GitHubWebHook processGitHubPayload
      Received POST for https://github.com/MyCompany/MyRepository
      Mar 08, 2015 6:29:57 PM INFO com.cloudbees.jenkins.GitHubWebHook processGitHubPayload
      Poked MyJob
      Mar 08, 2015 6:29:57 PM SEVERE com.cloudbees.jenkins.GitHubPushTrigger$1 runPolling
      Failed to record SCM polling
      java.lang.NullPointerException
      	at org.jenkinsci.plugins.envinject.EnvInjectPluginAction$1.transformEntry(EnvInjectPluginAction.java:25)
      	at org.jenkinsci.plugins.envinject.EnvInjectPluginAction$1.transformEntry(EnvInjectPluginAction.java:23)
      	at com.google.common.collect.Maps$TransformedEntriesMap$1$1.apply(Maps.java:1218)
      	at com.google.common.collect.Maps$TransformedEntriesMap$1$1.apply(Maps.java:1216)
      	at com.google.common.collect.Iterators$8.next(Iterators.java:812)
      	at java.util.AbstractMap.putAll(AbstractMap.java:272)
      	at java.util.TreeMap.putAll(TreeMap.java:321)
      	at org.jenkinsci.plugins.envinject.EnvInjectVarList.<init>(EnvInjectVarList.java:26)
      	at org.jenkinsci.plugins.envinject.EnvInjectPluginAction.getTarget(EnvInjectPluginAction.java:22)
      	at org.jenkinsci.plugins.envinject.EnvInjectPluginAction.buildEnvVars(EnvInjectPluginAction.java:31)
      	at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:929)
      	at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:564)
      	at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:526)
      	at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:380)
      	at hudson.scm.SCM.poll(SCM.java:397)
      	at hudson.model.AbstractProject._poll(AbstractProject.java:1446)
      	at hudson.model.AbstractProject.poll(AbstractProject.java:1349)
      	at com.cloudbees.jenkins.GitHubPushTrigger$1.runPolling(GitHubPushTrigger.java:81)
      	at com.cloudbees.jenkins.GitHubPushTrigger$1.run(GitHubPushTrigger.java:106)
      	at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	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:1110)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      	at java.lang.Thread.run(Thread.java:679)Mar 08, 2015 6:29:57 PM INFO com.cloudbees.jenkins.GitHubWebHook processGitHubPayload
      

        Attachments

          Activity

          Hide
          tkambler Tim Ambler added a comment -

          Downgraded to 2.2.4 found here - https://updates.jenkins-ci.org/download/plugins/git/ - and still broken.

          Show
          tkambler Tim Ambler added a comment - Downgraded to 2.2.4 found here - https://updates.jenkins-ci.org/download/plugins/git/ - and still broken.
          Hide
          tkambler Tim Ambler added a comment -

          WARNING: Failed to instantiate optional component com.cloudbees.jenkins.GitHubRepositoryNameContributor$FromMultiSCM; skipping

          Show
          tkambler Tim Ambler added a comment - WARNING: Failed to instantiate optional component com.cloudbees.jenkins.GitHubRepositoryNameContributor$FromMultiSCM; skipping
          Hide
          tkambler Tim Ambler added a comment -
          Show
          tkambler Tim Ambler added a comment - This looks to be very relevant - http://comments.gmane.org/gmane.comp.java.hudson.user/65493
          Hide
          markewaite Mark Waite added a comment -

          I don't have a GitHub Webhook available, so I can't test it, but it is hoped that the fix is included in git plugin 2.4.0 released 18 July 2015. If someone with a GitHub Webhook available could test it and mark it "resolved" (if 2.4.0 resolves it), that would be much appreciated.

          Show
          markewaite Mark Waite added a comment - I don't have a GitHub Webhook available, so I can't test it, but it is hoped that the fix is included in git plugin 2.4.0 released 18 July 2015. If someone with a GitHub Webhook available could test it and mark it "resolved" (if 2.4.0 resolves it), that would be much appreciated.
          Hide
          llibicpep Dmytro Kryvenko added a comment -

          Jenkins 1.609.1
          git plugin 2.4.0

          Confirm that the issue has been resolved.
          Tests done:
          1. Created freestyle project
          2. Added Git SCM configuration with the branch "refs/heads/master" value
          3. Checkbox enabled "Build when a change is pushed to github"
          4. Verified few times that the job is triggered per push to github

          Show
          llibicpep Dmytro Kryvenko added a comment - Jenkins 1.609.1 git plugin 2.4.0 Confirm that the issue has been resolved. Tests done: 1. Created freestyle project 2. Added Git SCM configuration with the branch "refs/heads/master" value 3. Checkbox enabled "Build when a change is pushed to github" 4. Verified few times that the job is triggered per push to github

            People

            • Assignee:
              Unassigned
              Reporter:
              alexandrezia Alexandre Zia
            • Votes:
              6 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: