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

Github Branch Source: rate limit sleep interrupted

    XMLWordPrintable

Details

    Description

      With the latest release of Github Branch Source Plugin, we encounter a rate limit of the authentification flow when token are renewed.

      We use the [Github App authentication|https://docs.cloudbees.com/docs/cloudbees-ci/latest/cloud-admin-guide/github-app-auth]

      The RateLimit settings is "Throttle at/near rate limit".

      The authentification process failed and leave the Job in a failed state, even if, according to our monitoring, it remains many quota available. (13k available requests at the time of exception).

      java.lang.InterruptedException: sleep interrupted
      	at java.lang.Thread.sleep(Native Method)
      	at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.waitUntilRateLimit(ApiRateLimitChecker.java:283)
      	at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.checkRateLimit(ApiRateLimitChecker.java:228)
      	at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$RateLimitCheckerAdapter.checkRateLimit(ApiRateLimitChecker.java:201)
      	at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:126)
      Caused: java.io.InterruptedIOException: sleep interrupted
      	at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:140)
      	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:392)
      Caused: org.kohsuke.github.HttpException: Server returned HTTP response code: -1, message: 'null' for URL: https://api.github.com/app
      	at org.kohsuke.github.GitHubClient.interpretApiError(GitHubClient.java:494)
      	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:414)
      	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:358)
      	at org.kohsuke.github.Requester.fetch(Requester.java:74)
      	at org.kohsuke.github.GitHub.getApp(GitHub.java:1094)
      	at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:169)
      Caused: java.lang.IllegalArgumentException: Couldn't authenticate with GitHub app ID XXXXX
      	at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:171)
      	at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:238)
      	at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:270)
      	at org.jenkinsci.plugins.github_branch_source.Connector.checkApiUrlValidity(Connector.java:323)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.checkApiUrlValidity(GitHubSCMSource.java:1541)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:1596)
      	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582)
      	at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:98)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      Finished: FAILURE

       

      Attachments

        Issue Links

          Activity

            vibioh Vincent created issue -
            timja Tim Jacomb made changes -
            Field Original Value New Value
            Description With the latest release of Github Branch Source Plugin, we encounter a rate limit of the authentification flow when token are renewed.

            We use the [Github App authentication|[https://docs.cloudbees.com/docs/cloudbees-ci/latest/cloud-admin-guide/github-app-auth].]

            The RateLimit settings is "Throttle at/near rate limit".

            The authentification process failed and leave the Job in a failed state, even if, according to our monitoring, it remains many quota available. (13k available requests at the time of exception).

             

             
            {code:java}
            java.lang.InterruptedException: sleep interrupted at java.lang.Thread.sleep(Native Method) at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.waitUntilRateLimit(ApiRateLimitChecker.java:283) at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.checkRateLimit(ApiRateLimitChecker.java:228) at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$RateLimitCheckerAdapter.checkRateLimit(ApiRateLimitChecker.java:201) at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:126) Caused: java.io.InterruptedIOException: sleep interrupted at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:140) at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:392) Caused: org.kohsuke.github.HttpException: Server returned HTTP response code: -1, message: 'null' for URL: https://api.github.com/app at org.kohsuke.github.GitHubClient.interpretApiError(GitHubClient.java:494) at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:414) at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:358) at org.kohsuke.github.Requester.fetch(Requester.java:74) at org.kohsuke.github.GitHub.getApp(GitHub.java:1094) at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:169) Caused: java.lang.IllegalArgumentException: Couldn't authenticate with GitHub app ID XXXXX at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:171) at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:238) at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:270) at org.jenkinsci.plugins.github_branch_source.Connector.checkApiUrlValidity(Connector.java:323) at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.checkApiUrlValidity(GitHubSCMSource.java:1541) at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:1596) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:98) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE{code}
             
            With the latest release of Github Branch Source Plugin, we encounter a rate limit of the authentification flow when token are renewed.

            We use the [Github App authentication|[https://docs.cloudbees.com/docs/cloudbees-ci/latest/cloud-admin-guide/github-app-auth].]

            The RateLimit settings is "Throttle at/near rate limit".

            The authentification process failed and leave the Job in a failed state, even if, according to our monitoring, it remains many quota available. (13k available requests at the time of exception).

             

             
            {code:java}
            java.lang.InterruptedException: sleep interrupted at java.lang.Thread.sleep(Native Method) at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.waitUntilRateLimit(ApiRateLimitChecker.java:283) at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.checkRateLimit(ApiRateLimitChecker.java:228) at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$RateLimitCheckerAdapter.checkRateLimit(ApiRateLimitChecker.java:201) at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:126) Caused: java.io.InterruptedIOException: sleep interrupted at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:140) at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:392) Caused: org.kohsuke.github.HttpException: Server returned HTTP response code: -1, message: 'null' for URL: https://api.github.com/app at org.kohsuke.github.GitHubClient.interpretApiError(GitHubClient.java:494) at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:414) at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:358) at org.kohsuke.github.Requester.fetch(Requester.java:74) at org.kohsuke.github.GitHub.getApp(GitHub.java:1094) at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:169) Caused: java.lang.IllegalArgumentException: Couldn't authenticate with GitHub app ID XXXXX at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:171) at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:238) at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:270) at org.jenkinsci.plugins.github_branch_source.Connector.checkApiUrlValidity(Connector.java:323) at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.checkApiUrlValidity(GitHubSCMSource.java:1541) at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:1596) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:98) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE
            {code}
             
            vibioh Vincent made changes -
            Description With the latest release of Github Branch Source Plugin, we encounter a rate limit of the authentification flow when token are renewed.

            We use the [Github App authentication|[https://docs.cloudbees.com/docs/cloudbees-ci/latest/cloud-admin-guide/github-app-auth].]

            The RateLimit settings is "Throttle at/near rate limit".

            The authentification process failed and leave the Job in a failed state, even if, according to our monitoring, it remains many quota available. (13k available requests at the time of exception).

             

             
            {code:java}
            java.lang.InterruptedException: sleep interrupted at java.lang.Thread.sleep(Native Method) at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.waitUntilRateLimit(ApiRateLimitChecker.java:283) at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.checkRateLimit(ApiRateLimitChecker.java:228) at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$RateLimitCheckerAdapter.checkRateLimit(ApiRateLimitChecker.java:201) at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:126) Caused: java.io.InterruptedIOException: sleep interrupted at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:140) at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:392) Caused: org.kohsuke.github.HttpException: Server returned HTTP response code: -1, message: 'null' for URL: https://api.github.com/app at org.kohsuke.github.GitHubClient.interpretApiError(GitHubClient.java:494) at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:414) at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:358) at org.kohsuke.github.Requester.fetch(Requester.java:74) at org.kohsuke.github.GitHub.getApp(GitHub.java:1094) at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:169) Caused: java.lang.IllegalArgumentException: Couldn't authenticate with GitHub app ID XXXXX at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:171) at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:238) at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:270) at org.jenkinsci.plugins.github_branch_source.Connector.checkApiUrlValidity(Connector.java:323) at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.checkApiUrlValidity(GitHubSCMSource.java:1541) at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:1596) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:98) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE
            {code}
             
            With the latest release of Github Branch Source Plugin, we encounter a rate limit of the authentification flow when token are renewed.

            We use the [Github App authentication|[https://docs.cloudbees.com/docs/cloudbees-ci/latest/cloud-admin-guide/github-app-auth].]

            The RateLimit settings is "Throttle at/near rate limit".

            The authentification process failed and leave the Job in a failed state, even if, according to our monitoring, it remains many quota available. (13k available requests at the time of exception).

             

             
            {code:java}
            java.lang.InterruptedException: sleep interrupted
            at java.lang.Thread.sleep(Native Method)
            at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.waitUntilRateLimit(ApiRateLimitChecker.java:283)
            at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.checkRateLimit(ApiRateLimitChecker.java:228)
            at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$RateLimitCheckerAdapter.checkRateLimit(ApiRateLimitChecker.java:201)
            at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:126)
            Caused: java.io.InterruptedIOException: sleep interrupted
            at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:140)
            at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:392)
            Caused: org.kohsuke.github.HttpException: Server returned HTTP response code: -1, message: 'null' for URL: https://api.github.com/app
            at org.kohsuke.github.GitHubClient.interpretApiError(GitHubClient.java:494)
            at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:414)
            at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:358)
            at org.kohsuke.github.Requester.fetch(Requester.java:74)
            at org.kohsuke.github.GitHub.getApp(GitHub.java:1094)
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:169)
            Caused: java.lang.IllegalArgumentException: Couldn't authenticate with GitHub app ID XXXXX
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:171)
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:238)
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:270)
            at org.jenkinsci.plugins.github_branch_source.Connector.checkApiUrlValidity(Connector.java:323)
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.checkApiUrlValidity(GitHubSCMSource.java:1541)
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:1596)
            at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582)
            at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:98)
            at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:429)
            Finished: FAILURE{code}
             
            vibioh Vincent made changes -
            Description With the latest release of Github Branch Source Plugin, we encounter a rate limit of the authentification flow when token are renewed.

            We use the [Github App authentication|[https://docs.cloudbees.com/docs/cloudbees-ci/latest/cloud-admin-guide/github-app-auth].]

            The RateLimit settings is "Throttle at/near rate limit".

            The authentification process failed and leave the Job in a failed state, even if, according to our monitoring, it remains many quota available. (13k available requests at the time of exception).

             

             
            {code:java}
            java.lang.InterruptedException: sleep interrupted
            at java.lang.Thread.sleep(Native Method)
            at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.waitUntilRateLimit(ApiRateLimitChecker.java:283)
            at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.checkRateLimit(ApiRateLimitChecker.java:228)
            at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$RateLimitCheckerAdapter.checkRateLimit(ApiRateLimitChecker.java:201)
            at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:126)
            Caused: java.io.InterruptedIOException: sleep interrupted
            at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:140)
            at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:392)
            Caused: org.kohsuke.github.HttpException: Server returned HTTP response code: -1, message: 'null' for URL: https://api.github.com/app
            at org.kohsuke.github.GitHubClient.interpretApiError(GitHubClient.java:494)
            at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:414)
            at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:358)
            at org.kohsuke.github.Requester.fetch(Requester.java:74)
            at org.kohsuke.github.GitHub.getApp(GitHub.java:1094)
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:169)
            Caused: java.lang.IllegalArgumentException: Couldn't authenticate with GitHub app ID XXXXX
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:171)
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:238)
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:270)
            at org.jenkinsci.plugins.github_branch_source.Connector.checkApiUrlValidity(Connector.java:323)
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.checkApiUrlValidity(GitHubSCMSource.java:1541)
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:1596)
            at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582)
            at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:98)
            at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:429)
            Finished: FAILURE{code}
             
            With the latest release of Github Branch Source Plugin, we encounter a rate limit of the authentification flow when token are renewed.

            We use the [Github App authentication|[https://docs.cloudbees.com/docs/cloudbees-ci/latest/cloud-admin-guide/github-app-auth].]

            The RateLimit settings is "Throttle at/near rate limit".

            The authentification process failed and leave the Job in a failed state, even if, according to our monitoring, it remains many quota available. (13k available requests at the time of exception).
            {code:java}
            java.lang.InterruptedException: sleep interrupted
            at java.lang.Thread.sleep(Native Method)
            at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.waitUntilRateLimit(ApiRateLimitChecker.java:283)
            at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.checkRateLimit(ApiRateLimitChecker.java:228)
            at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$RateLimitCheckerAdapter.checkRateLimit(ApiRateLimitChecker.java:201)
            at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:126)
            Caused: java.io.InterruptedIOException: sleep interrupted
            at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:140)
            at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:392)
            Caused: org.kohsuke.github.HttpException: Server returned HTTP response code: -1, message: 'null' for URL: https://api.github.com/app
            at org.kohsuke.github.GitHubClient.interpretApiError(GitHubClient.java:494)
            at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:414)
            at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:358)
            at org.kohsuke.github.Requester.fetch(Requester.java:74)
            at org.kohsuke.github.GitHub.getApp(GitHub.java:1094)
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:169)
            Caused: java.lang.IllegalArgumentException: Couldn't authenticate with GitHub app ID XXXXX
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:171)
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:238)
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:270)
            at org.jenkinsci.plugins.github_branch_source.Connector.checkApiUrlValidity(Connector.java:323)
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.checkApiUrlValidity(GitHubSCMSource.java:1541)
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:1596)
            at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582)
            at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:98)
            at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:429)
            Finished: FAILURE{code}
             
            vibioh Vincent made changes -
            Description With the latest release of Github Branch Source Plugin, we encounter a rate limit of the authentification flow when token are renewed.

            We use the [Github App authentication|[https://docs.cloudbees.com/docs/cloudbees-ci/latest/cloud-admin-guide/github-app-auth].]

            The RateLimit settings is "Throttle at/near rate limit".

            The authentification process failed and leave the Job in a failed state, even if, according to our monitoring, it remains many quota available. (13k available requests at the time of exception).
            {code:java}
            java.lang.InterruptedException: sleep interrupted
            at java.lang.Thread.sleep(Native Method)
            at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.waitUntilRateLimit(ApiRateLimitChecker.java:283)
            at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.checkRateLimit(ApiRateLimitChecker.java:228)
            at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$RateLimitCheckerAdapter.checkRateLimit(ApiRateLimitChecker.java:201)
            at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:126)
            Caused: java.io.InterruptedIOException: sleep interrupted
            at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:140)
            at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:392)
            Caused: org.kohsuke.github.HttpException: Server returned HTTP response code: -1, message: 'null' for URL: https://api.github.com/app
            at org.kohsuke.github.GitHubClient.interpretApiError(GitHubClient.java:494)
            at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:414)
            at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:358)
            at org.kohsuke.github.Requester.fetch(Requester.java:74)
            at org.kohsuke.github.GitHub.getApp(GitHub.java:1094)
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:169)
            Caused: java.lang.IllegalArgumentException: Couldn't authenticate with GitHub app ID XXXXX
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:171)
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:238)
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:270)
            at org.jenkinsci.plugins.github_branch_source.Connector.checkApiUrlValidity(Connector.java:323)
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.checkApiUrlValidity(GitHubSCMSource.java:1541)
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:1596)
            at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582)
            at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:98)
            at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:429)
            Finished: FAILURE{code}
             
            With the latest release of Github Branch Source Plugin, we encounter a rate limit of the authentification flow when token are renewed.

            We use the [Github App authentication|[https://docs.cloudbees.com/docs/cloudbees-ci/latest/cloud-admin-guide/github-app-auth]]

            The RateLimit settings is "Throttle at/near rate limit".

            The authentification process failed and leave the Job in a failed state, even if, according to our monitoring, it remains many quota available. (13k available requests at the time of exception).
            {code:java}
            java.lang.InterruptedException: sleep interrupted
            at java.lang.Thread.sleep(Native Method)
            at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.waitUntilRateLimit(ApiRateLimitChecker.java:283)
            at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$LocalChecker.checkRateLimit(ApiRateLimitChecker.java:228)
            at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$RateLimitCheckerAdapter.checkRateLimit(ApiRateLimitChecker.java:201)
            at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:126)
            Caused: java.io.InterruptedIOException: sleep interrupted
            at org.kohsuke.github.GitHubRateLimitChecker.checkRateLimit(GitHubRateLimitChecker.java:140)
            at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:392)
            Caused: org.kohsuke.github.HttpException: Server returned HTTP response code: -1, message: 'null' for URL: https://api.github.com/app
            at org.kohsuke.github.GitHubClient.interpretApiError(GitHubClient.java:494)
            at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:414)
            at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:358)
            at org.kohsuke.github.Requester.fetch(Requester.java:74)
            at org.kohsuke.github.GitHub.getApp(GitHub.java:1094)
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:169)
            Caused: java.lang.IllegalArgumentException: Couldn't authenticate with GitHub app ID XXXXX
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.generateAppInstallationToken(GitHubAppCredentials.java:171)
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:238)
            at org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.getPassword(GitHubAppCredentials.java:270)
            at org.jenkinsci.plugins.github_branch_source.Connector.checkApiUrlValidity(Connector.java:323)
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.checkApiUrlValidity(GitHubSCMSource.java:1541)
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:1596)
            at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582)
            at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:98)
            at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:429)
            Finished: FAILURE{code}
             
            timja Tim Jacomb made changes -
            Summary Github Branch Source Rate Limit Authentification Github Branch Source: rate limit sleep interrupted
            bitwiseman Liam Newman made changes -
            Assignee Liam Newman [ bitwiseman ]
            bitwiseman Liam Newman made changes -
            Remote Link This issue links to "PR-395 (Web Link)" [ 26513 ]
            bitwiseman Liam Newman made changes -
            Link This issue duplicates JENKINS-62249 [ JENKINS-62249 ]
            bitwiseman Liam Newman made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            bitwiseman Liam Newman made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            bitwiseman Liam Newman made changes -
            Released As https://github.com/jenkinsci/bitbucket-branch-source-plugin/releases/tag/cloudbees-bitbucket-branch-source-2.9.7
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            bitwiseman Liam Newman made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

            People

              bitwiseman Liam Newman
              vibioh Vincent
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: