gmacario / easy-jenkins

Easily deploy a Jenkins CI/CD infrastructure via docker-compose
MIT License
35 stars 9 forks source link

Could not update commit status... Maximum number of login attempts exceeded. #227

Closed gmacario closed 7 years ago

gmacario commented 7 years ago

Preconditions:

  1. Install easy-jenkins on mv-linux-powerhorse
  2. Login as user admin
  3. Expose Jenkins dashboard as https://build.solarma.it/
  4. Open Blue Ocean and create pipeline from https://github.com/gmacario/genivi-dev-platform
  5. Enable GitHub user authentication
  6. Login as GitHub user gmacario
  7. Browse repository gmacario/genivi-dev-platform
  8. Try rebuilding branch dev-rokers

Error message from https://build.solarma.it/job/gmacario/job/genivi-dev-platform/job/dev-rokers/4/console

Started by user Gianpaolo Macario

Could not update commit status. Message: GitHub API rate limit exceeded

org.jenkinsci.plugins.github_branch_source.RateLimitExceededException: GitHub API rate limit exceeded
    at org.jenkinsci.plugins.github_branch_source.Connector$1.onError(Connector.java:410)
    at org.kohsuke.github.Requester.handleApiError(Requester.java:676)
    at org.kohsuke.github.Requester._to(Requester.java:285)
    at org.kohsuke.github.Requester.to(Requester.java:226)
    at org.kohsuke.github.GitHub.checkApiUrlValidity(GitHub.java:668)
    at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.checkApiUrlValidity(GitHubSCMSource.java:501)
    at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:845)
    at jenkins.scm.api.SCMSource.fetch(SCMSource.java:509)
    at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:95)
    at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:262)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:405)
Finished: FAILURE
gmacario commented 7 years ago

Excerpt from docker-compose logs -f

myjenkins_1  | Jul 05, 2017 7:11:50 AM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
myjenkins_1  | INFO: gmacario/genivi-dev-platform/dev-rokers #4 completed: FAILURE
myjenkins_1  | Jul 05, 2017 7:11:50 AM org.jenkinsci.plugins.workflow.flow.FlowExecutionList unregister
myjenkins_1  | WARNING: Owner[gmacario/genivi-dev-platform/dev-rokers/4:gmacario/genivi-dev-platform/dev-rokers #4] was not in the list to begin with: []
myjenkins_1  | Jul 05, 2017 7:11:50 AM io.jenkins.blueocean.events.PipelineEventListener$1 run
myjenkins_1  | SEVERE: Unexpected error publishing pipeline FlowNode event.
myjenkins_1  | java.util.concurrent.ExecutionException: org.jenkinsci.plugins.github_branch_source.RateLimitExceededException: GitHub API rate limit exceeded
myjenkins_1  |  at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:289)
myjenkins_1  |  at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:276)
myjenkins_1  |  at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:111)
myjenkins_1  |  at io.jenkins.blueocean.events.PipelineEventListener$1.run(PipelineEventListener.java:224)
myjenkins_1  |  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
myjenkins_1  |  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
myjenkins_1  |  at java.lang.Thread.run(Thread.java:748)
myjenkins_1  | Caused by: org.jenkinsci.plugins.github_branch_source.RateLimitExceededException: GitHub API rate limit exceeded
myjenkins_1  |  at org.jenkinsci.plugins.github_branch_source.Connector$1.onError(Connector.java:410)
myjenkins_1  |  at org.kohsuke.github.Requester.handleApiError(Requester.java:676)
myjenkins_1  |  at org.kohsuke.github.Requester._to(Requester.java:285)
myjenkins_1  |  at org.kohsuke.github.Requester.to(Requester.java:226)
myjenkins_1  |  at org.kohsuke.github.GitHub.checkApiUrlValidity(GitHub.java:668)
myjenkins_1  |  at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.checkApiUrlValidity(GitHubSCMSource.java:501)
myjenkins_1  |  at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:845)
myjenkins_1  |  at jenkins.scm.api.SCMSource.fetch(SCMSource.java:509)
myjenkins_1  |  at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:95)
myjenkins_1  |  at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:262)
myjenkins_1  |  at hudson.model.ResourceController.execute(ResourceController.java:97)
myjenkins_1  |  at hudson.model.Executor.run(Executor.java:405)
myjenkins_1  |
gmacario commented 7 years ago

Try deleting organization gmacario and recreating the pipeline

Excerpt from docker-compose logs -f

myjenkins_1  | Jul 05, 2017 7:15:29 AM jenkins.branch.MultiBranchProject$BranchIndexing run
myjenkins_1  | INFO: gmacario/genivi-dev-platform #20170705.071522 branch indexing action completed: SUCCESS in 7.4 sec
myjenkins_1  | Jul 05, 2017 7:15:39 AM io.jenkins.blueocean.autofavorite.FavoritingScmListener onCheckout
myjenkins_1  | INFO: Automatically favorited gmacario/genivi-dev-platform/dev-rokers for Gianpaolo Macario
myjenkins_1  | Jul 05, 2017 7:15:51 AM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
myjenkins_1  | INFO: gmacario/genivi-dev-platform/dev-rokers #1 completed: FAILURE

Build log at https://build.solarma.it/job/gmacario/job/genivi-dev-platform/job/dev-rokers/1/console

Branch indexing
Connecting to https://api.github.com using gmacario/****** (Github Access Token)
Obtained Jenkinsfile from 8c0f0b57773a5ddfcab76b33bac335537727c158
[Pipeline] node
Running on master in /var/jenkins_home/workspace/ivi-dev-platform_dev-rokers-VHTBUQD4YQNVS234C3HXEND42KTUFIEJS443BSENLMZ4N5KPZVTQ
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from 2 remote Git repositories
 > git config remote.origin.url https://github.com/gmacario/genivi-dev-platform.git # timeout=10
Fetching upstream changes from https://github.com/gmacario/genivi-dev-platform.git
 > git --version # timeout=10
using GIT_ASKPASS to set credentials Github Access Token
 > git fetch --tags --progress https://github.com/gmacario/genivi-dev-platform.git +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin1.url https://github.com/gmacario/genivi-dev-platform.git # timeout=10
Fetching upstream changes from https://github.com/gmacario/genivi-dev-platform.git
using GIT_ASKPASS to set credentials Github Access Token
 > git fetch --tags --progress https://github.com/gmacario/genivi-dev-platform.git +refs/pull/*/head:refs/remotes/origin/pr/*
Checking out Revision 8c0f0b57773a5ddfcab76b33bac335537727c158 (dev-rokers)
Commit message: "Merge pull request #6 from gmacario/feat-add-meta-rokers"
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 8c0f0b57773a5ddfcab76b33bac335537727c158
First time build. Skipping changelog.
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Declarative: Agent Setup)
[Pipeline] sh
[ivi-dev-platform_dev-rokers-VHTBUQD4YQNVS234C3HXEND42KTUFIEJS443BSENLMZ4N5KPZVTQ] Running shell script
+ docker pull gmacario/build-yocto
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline

GitHub has been notified of this commit’s build result

ERROR: missing workspace /var/jenkins_home/workspace/ivi-dev-platform_dev-rokers-VHTBUQD4YQNVS234C3HXEND42KTUFIEJS443BSENLMZ4N5KPZVTQ on 
Finished: FAILURE
gmacario commented 7 years ago

I did the following on mv-linux-powerhorse

cd ~/github/gmacario/easy-jenkins
docker-compose down
docker system prune
git checkout master && git pull --all --prune
docker-compose build --pull
./runme.sh

then configured GitHub user authentication BEFORE creating the pipeline, and was not able to reproduce the issue.

Closing issue, please reopen if this happens again.