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

github branch source: IllegalStateException: cache is closed

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Occurred during org scan on ci.jenkins.io:
      https://ci.jenkins.io/job/Plugins/computation/console

      ERROR: [Sat Jan 09 09:29:47 UTC 2021] Could not fetch sources from navigator org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator@39793714
      java.lang.IllegalStateException: cache is closed
      	at okhttp3.internal.cache.DiskLruCache.checkNotClosed(DiskLruCache.java:645)
      	at okhttp3.internal.cache.DiskLruCache.get(DiskLruCache.java:432)
      	at okhttp3.Cache.get(Cache.java:198)
      	at okhttp3.Cache$1.get(Cache.java:145)
      	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:55)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
      	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
      	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
      	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$UnexpectedException.lambda$static$0(ObsoleteUrlFactory.java:1360)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
      	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229)
      	at okhttp3.RealCall.execute(RealCall.java:81)
      	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$OkHttpURLConnection.getResponse(ObsoleteUrlFactory.java:667)
      	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$OkHttpURLConnection.getResponseCode(ObsoleteUrlFactory.java:698)
      	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$DelegatingHttpsURLConnection.getResponseCode(ObsoleteUrlFactory.java:1059)
      	at org.kohsuke.github.GitHubHttpUrlConnectionClient.getResponseInfo(GitHubHttpUrlConnectionClient.java:69)
      	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:400)
      	at org.kohsuke.github.GitHubClient.getRateLimit(GitHubClient.java:237)
      	at org.kohsuke.github.GitHubClient.getRateLimit(GitHubClient.java:224)
      	at org.kohsuke.github.GitHub.getRateLimit(GitHub.java:391)
      	at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$2.checkApiRateLimit(ApiRateLimitChecker.java:91)
      	at org.jenkinsci.plugins.github_branch_source.Connector.checkApiRateLimit(Connector.java:575)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:1007)
      	at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:542)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:278)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
      	at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:1033)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      [Sat Jan 09 09:29:47 UTC 2021] Finished organization scan. Scan took 12 min
      FATAL: Failed to recompute children of Plugins
      java.lang.IllegalStateException: cache is closed
      	at okhttp3.internal.cache.DiskLruCache.checkNotClosed(DiskLruCache.java:645)
      	at okhttp3.internal.cache.DiskLruCache.get(DiskLruCache.java:432)
      	at okhttp3.Cache.get(Cache.java:198)
      	at okhttp3.Cache$1.get(Cache.java:145)
      	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:55)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
      	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
      	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
      	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$UnexpectedException.lambda$static$0(ObsoleteUrlFactory.java:1360)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
      	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229)
      	at okhttp3.RealCall.execute(RealCall.java:81)
      	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$OkHttpURLConnection.getResponse(ObsoleteUrlFactory.java:667)
      	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$OkHttpURLConnection.getResponseCode(ObsoleteUrlFactory.java:698)
      	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$DelegatingHttpsURLConnection.getResponseCode(ObsoleteUrlFactory.java:1059)
      	at org.kohsuke.github.GitHubHttpUrlConnectionClient.getResponseInfo(GitHubHttpUrlConnectionClient.java:69)
      	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:400)
      	at org.kohsuke.github.GitHubClient.getRateLimit(GitHubClient.java:237)
      	at org.kohsuke.github.GitHubClient.getRateLimit(GitHubClient.java:224)
      	at org.kohsuke.github.GitHub.getRateLimit(GitHub.java:391)
      	at org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker$2.checkApiRateLimit(ApiRateLimitChecker.java:91)
      	at org.jenkinsci.plugins.github_branch_source.Connector.checkApiRateLimit(Connector.java:575)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:1007)
      	at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:542)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:278)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
      	at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:1033)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      Finished: FAILURE
      

        Attachments

          Activity

          Hide
          jglick Jesse Glick added a comment -

          Connector.checkApiRateLimit is pointless if you are using App authentication, as I guess you were based on the link from INFRA-2866? See CloudBees CI docs on the topic. Probably github-branch-source should be smarter and automatically disable throttling and rate limit checks when using App authentication.

          Show
          jglick Jesse Glick added a comment - Connector.checkApiRateLimit is pointless if you are using App authentication, as I guess you were based on the link from INFRA-2866 ? See CloudBees CI docs on the topic. Probably github-branch-source should be smarter and automatically disable throttling and rate limit checks when using App authentication.
          Hide
          timja Tim Jacomb added a comment -

          We already use that near rate limit method, and we do hit the ratelimit still on jenkins ci.

          08:57:00 Jenkins-Imposed API Limiter: Current quota for Github API usage has 624 remaining (1 over buffer). Next quota of 12500 due in 30 min. Sleeping for 3 min 0 sec.
          08:57:00 Jenkins is restricting GitHub API requests only when near or above the rate limit. To configure a different rate limiting strategy, such as having Jenkins attempt to evenly distribute GitHub API requests, go to "GitHub API usage" under "Configure System" in the Jenkins settings.
          09:00:00 Jenkins-Imposed API Limiter: Still sleeping, now only 27 min remaining.
          
          Show
          timja Tim Jacomb added a comment - We already use that near rate limit method, and we do hit the ratelimit still on jenkins ci. 08:57:00 Jenkins-Imposed API Limiter: Current quota for Github API usage has 624 remaining (1 over buffer). Next quota of 12500 due in 30 min. Sleeping for 3 min 0 sec. 08:57:00 Jenkins is restricting GitHub API requests only when near or above the rate limit. To configure a different rate limiting strategy, such as having Jenkins attempt to evenly distribute GitHub API requests, go to "GitHub API usage" under "Configure System " in the Jenkins settings. 09:00:00 Jenkins-Imposed API Limiter: Still sleeping, now only 27 min remaining.

            People

            Assignee:
            bitwiseman Liam Newman
            Reporter:
            timja Tim Jacomb
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: