[JIRA] (JENKINS-48035) Github multibranch: GitHub Webhook is not created right after saving the job

23 views
Skip to first unread message

it.carlosrodlop@gmail.com (JIRA)

unread,
May 16, 2019, 12:34:03 PM5/16/19
to jenkinsc...@googlegroups.com
Carlos Rodríguez López updated an issue
 
Jenkins / Bug JENKINS-48035
Github multibranch: GitHub Webhook is not created right after saving the job
Change By: Carlos Rodríguez López
Attachment: repo-team-2.png
Attachment: repo-team.png
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

it.carlosrodlop@gmail.com (JIRA)

unread,
May 16, 2019, 12:35:04 PM5/16/19
to jenkinsc...@googlegroups.com
Carlos Rodríguez López edited a comment on Bug JENKINS-48035
 
Re: Github multibranch: GitHub Webhook is not created right after saving the job
[~rsandell] [~stephenconnolly] I am reopening this ticket again because the same reported issue seems to be back running
(Regression?)

h4. Enviroment Environment

{code:java}
Jenkins LTS 2.164.2
* github:1.29.4 'GitHub plugin'
* github-api:1.95 'GitHub API Plugin'
* github-branch-source:2.5.0 *(update available)* 'GitHub Branch Source Plugin'
{code}

h4. Observation

What we see on logs

{code:java}
May 16, 2019 3:12:38 PM org.jenkinsci.plugins.github.webhook.WebhookManager$2 applyNullSafe
WARNING: Failed to add GitHub webhook for GitHubRepositoryName[host=github.com,username=mock-carlosrodlop-org,repository=my-hw-maven-app]
java.lang.NullPointerException: There are no credentials with admin access to manage hooks on GitHubRepositoryName[host=github.com,username=mock-carlosrodlop-org,repository=my-hw-maven-app]
{code}

But it is not right... I am using this repo with user:carlosrodlop and pass:APIToken

!repo-team.png|thumbnail!

!repo-team-2.png|thumbnail!  






it.carlosrodlop@gmail.com (JIRA)

unread,
May 16, 2019, 12:35:06 PM5/16/19
to jenkinsc...@googlegroups.com

rsandell Stephen Connolly I am reopening this ticket again because the same reported issue seems to be back running

Enviroment

Jenkins LTS 2.164.2
 * github:1.29.4 'GitHub plugin'
 * github-api:1.95 'GitHub API Plugin'
 * github-branch-source:2.5.0 *(update available)* 'GitHub Branch Source Plugin'

Observation

What we see on logs

May 16, 2019 3:12:38 PM org.jenkinsci.plugins.github.webhook.WebhookManager$2 applyNullSafe
WARNING: Failed to add GitHub webhook for GitHubRepositoryName[host=github.com,username=mock-carlosrodlop-org,repository=my-hw-maven-app]
java.lang.NullPointerException: There are no credentials with admin access to manage hooks on GitHubRepositoryName[host=github.com,username=mock-carlosrodlop-org,repository=my-hw-maven-app]

But it is not right... I am using this repo with user:carlosrodlop and pass:APIToken

it.carlosrodlop@gmail.com (JIRA)

unread,
May 16, 2019, 12:36:02 PM5/16/19
to jenkinsc...@googlegroups.com

it.carlosrodlop@gmail.com (JIRA)

unread,
May 16, 2019, 12:52:05 PM5/16/19
to jenkinsc...@googlegroups.com
Carlos Rodríguez López edited a comment on Bug JENKINS-48035
 
Re: Github multibranch: GitHub Webhook is not created right after saving the job
[~rsandell] [~stephenconnolly] I am reopening this ticket again because the same reported issue seems to be back running (Regression?)

h4. Environment

{code:java}

Jenkins LTS 2.164.2
* github:1.29.4 'GitHub plugin'
* github-api:1.95 'GitHub API Plugin'
* github-branch-source:2.5.0 *(update available)* 'GitHub Branch Source Plugin'
{code}

h4. Observation


What we see on logs

{code:java}

May 16, 2019 3:12:38 PM org.jenkinsci.plugins.github.webhook.WebhookManager$2 applyNullSafe
WARNING: Failed to add GitHub webhook for GitHubRepositoryName[host=github.com,username=mock-carlosrodlop-org,repository=my-hw-maven-app]
java.lang.NullPointerException: There are no credentials with admin access to manage hooks on GitHubRepositoryName[host=github.com,username=mock-carlosrodlop-org,repository=my-hw-maven-app]
{code}

But it is not right... I am using this repo
https://github.com/mock-carlosrodlop-org/my-hw-maven-app with user:carlosrodlop and pass:APIToken and as you can tell from the following images carlosrodlop is an admin

!repo-team.png|thumbnail!

!repo-team-2.png|thumbnail!  






it.carlosrodlop@gmail.com (JIRA)

unread,
May 17, 2019, 6:19:02 AM5/17/19
to jenkinsc...@googlegroups.com
[~rsandell] [~stephenconnolly] I am reopening this ticket again because the same reported issue seems to be back running (Regression?)

h4. Environment

{code:java}
Jenkins LTS 2.164.2
* github:1.29.4 'GitHub plugin'
* github-api:1.95 'GitHub API Plugin'
* github-branch-source:2.5.0 *(update available)* 'GitHub Branch Source Plugin'
{code}

h4. Observation

What we see on Jenkins logs


{code:java}
May 16, 2019 3:12:38 PM org.jenkinsci.plugins.github.webhook.WebhookManager$2 applyNullSafe
WARNING: Failed to add GitHub webhook for GitHubRepositoryName[host=github.com,username=mock-carlosrodlop-org,repository=my-hw-maven-app]
java.lang.NullPointerException: There are no credentials with admin access to manage hooks on GitHubRepositoryName[host=github.com,username=mock-carlosrodlop-org,repository=my-hw-maven-app]
{code}

But it is not right... I am using this repo https://github.com/mock-carlosrodlop-org/my-hw-maven-app with user:carlosrodlop and pass:APIToken and as you can tell from the following images carlosrodlop is an admin

!repo-team.png|thumbnail!

!repo-team-2.png|thumbnail!  

Custom dedicated loggers as explained in this guide: [GitHub-Webhook-Troubleshooting |https://support.cloudbees.com/hc/en-us/articles/224621648-GitHub-Webhook-Troubleshooting] are not providing any useful hint just

{code:java}
May 16, 2019 4:05:50 PM FINE com.cloudbees.jenkins.GitHubWebHook$1 apply
Calling registerHooks() for multibranch-example-job
May 16, 2019 4:05:51 PM FINE com.cloudbees.jenkins.GitHubWebHook$1 apply
Calling registerHooks() for multibranch-example-job
{code}





it.carlosrodlop@gmail.com (JIRA)

unread,
May 17, 2019, 8:21:04 AM5/17/19
to jenkinsc...@googlegroups.com
[~rsandell] [~stephenconnolly] I am reopening this ticket again because the same reported issue seems to be back running (Regression?)

h4. Environment

{code:java}
Jenkins LTS 2.164.2
* github:1.29.4 'GitHub plugin'
* github-api:1.95 'GitHub API Plugin'
* github-branch-source:2.5.0 *(update available)* 'GitHub Branch Source Plugin'
{code}

h4. Observation Observations

h6. What we see on Jenkins logs


{code:java}
May 16, 2019 3:12:38 PM org.jenkinsci.plugins.github.webhook.WebhookManager$2 applyNullSafe
WARNING: Failed to add GitHub webhook for GitHubRepositoryName[host=github.com,username=mock-carlosrodlop-org,repository=my-hw-maven-app]
java.lang.NullPointerException: There are no credentials with admin access to manage hooks on GitHubRepositoryName[host=github.com,username=mock-carlosrodlop-org,repository=my-hw-maven-app]
{code}

But it is not right... I am using this repo https://github.com/mock-carlosrodlop-org/my-hw-maven-app with user:carlosrodlop and pass:APIToken and as you can tell from the following images carlosrodlop is an admin

!repo-team.png|thumbnail!

!repo-team-2.png|thumbnail!  

h6. Custom dedicated loggers as explained in this guide: [GitHub-Webhook-Troubleshooting |https://support.cloudbees.com/hc/en-us/articles/224621648-GitHub-Webhook-Troubleshooting] are not providing any useful hint just


{code:java}
May 16, 2019 4:05:50 PM FINE com.cloudbees.jenkins.GitHubWebHook$1 apply
Calling registerHooks() for multibranch-example-job
May 16, 2019 4:05:51 PM FINE com.cloudbees.jenkins.GitHubWebHook$1 apply
Calling registerHooks() for multibranch-example-job
{code}

h6. Manage Jenkins > GitHub plugin > Advanced > Re-register hooks for all jobs > webhook in GitHub is NOT generated either. Independently if I enabled or disable Manage hooks options the output is the same: Works only when Jenkins manages hooks (one or more creds specified)



it.carlosrodlop@gmail.com (JIRA)

unread,
Jun 3, 2019, 11:55:04 AM6/3/19
to jenkinsc...@googlegroups.com
Carlos Rodríguez López closed an issue as Cannot Reproduce
 

It is working fine after deep testing

Status: Reopened Closed
Resolution: Cannot Reproduce

dlakatos847@gmail.com (JIRA)

unread,
Jul 6, 2019, 4:48:04 AM7/6/19
to jenkinsc...@googlegroups.com
David Lakatos commented on Bug JENKINS-48035
 
Re: Github multibranch: GitHub Webhook is not created right after saving the job

Carlos Rodríguez López I experienced the same issue you did. What do you mean "It is working fine after deep testing"? How did your problem disappear?

While my OAuth token used by Jenkins has the admin:repo_hook permission on Github, Jenkins throws this exception for all of my managed repositories:

Jul 06, 2019 10:34:16 AM WARNING org.jenkinsci.plugins.github.webhook.WebhookManager$2 applyNullSafe
Failed to add GitHub webhook for GitHubRepositoryName[host=github.com,username=*****,repository=*****]
java.lang.NullPointerException: There are no credentials with admin access to manage hooks on GitHubRepositoryName[host=github.com,username=*****,repository=*****]
{{ at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:231)}}
{{ at org.jenkinsci.plugins.github.webhook.WebhookManager$2.applyNullSafe(WebhookManager.java:179)}}
{{ at org.jenkinsci.plugins.github.webhook.WebhookManager$2.applyNullSafe(WebhookManager.java:175)}}
{{ at org.jenkinsci.plugins.github.util.misc.NullSafeFunction.apply(NullSafeFunction.java:18)}}
{{ at com.google.common.collect.Iterators$8.next(Iterators.java:812)}}
{{ at com.google.common.collect.Iterators$7.computeNext(Iterators.java:648)}}
{{ at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)}}
{{ at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)}}
{{ at com.google.common.collect.Iterators$7.computeNext(Iterators.java:647)}}
{{ at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)}}
{{ at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)}}
{{ at com.google.common.collect.Lists.newArrayList(Lists.java:138)}}
{{ at com.google.common.collect.Lists.newArrayList(Lists.java:119)}}
{{ at org.jenkinsci.plugins.github.util.FluentIterableWrapper.toList(FluentIterableWrapper.java:147)}}
{{ at org.jenkinsci.plugins.github.webhook.WebhookManager$1.run(WebhookManager.java:127)}}
{{ at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)}}
{{ at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)}}
{{ at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)}}
{{ 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:1149)}}
{{ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)}}
{{ at java.lang.Thread.run(Thread.java:748)}}

dlakatos847@gmail.com (JIRA)

unread,
Jul 6, 2019, 4:49:02 AM7/6/19
to jenkinsc...@googlegroups.com
David Lakatos edited a comment on Bug JENKINS-48035
[~carlosrodlop] I experienced the same issue you did. What do you mean "It is working fine after deep testing"? How did your problem disappear?

dlakatos847@gmail.com (JIRA)

unread,
Jul 6, 2019, 4:55:04 AM7/6/19
to jenkinsc...@googlegroups.com

FYI I fixed my issue by regenerating my OAuth access token. It may have been misconfigured in my Jenkins' credentials...

it.carlosrodlop@gmail.com (JIRA)

unread,
Jul 7, 2019, 5:22:03 PM7/7/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages