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

A connection to https://api.github.com/ was leaked. Did you forget to close a response body?

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      github-branch-source 2.9.1
      jenkins 2.261
      github-api 1.116.0
    • Similar Issues:

      Description

      Our logs are getting spammed with:
      "A connection to https://api.github.com/ was leaked. Did you forget to close a response body?"

      If I enable fine detail logging I get these stacktraces:

      Jun 10, 2020 8:03:39 AM WARNING okhttp3.internal.platform.Platform log
      A connection to https://api.github.com/ was leaked. Did you forget to close a response body?
      java.lang.Throwable: response.body().close()
      	at okhttp3.internal.platform.Platform.getStackTraceForCloseable(Platform.java:148)
      	at okhttp3.RealCall.captureCallStackTrace(RealCall.java:116)
      	at okhttp3.RealCall.execute(RealCall.java:88)
      	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$OkHttpURLConnection.getResponse(ObsoleteUrlFactory.java:666)
      	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$OkHttpURLConnection.getResponseCode(ObsoleteUrlFactory.java:697)
      	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$DelegatingHttpsURLConnection.getResponseCode(ObsoleteUrlFactory.java:1058)
      	at org.kohsuke.github.GitHubHttpUrlConnectionClient.getResponseInfo(GitHubHttpUrlConnectionClient.java:69)
      	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:348)
      	at org.kohsuke.github.GitHubClient.fetch(GitHubClient.java:145)
      	at org.kohsuke.github.GitHubClient.checkApiUrlValidity(GitHubClient.java:279)
      	at org.kohsuke.github.GitHub.checkApiUrlValidity(GitHub.java:1088)
      	at org.jenkinsci.plugins.github_branch_source.Connector.checkApiUrlValidity(Connector.java:332)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSource(GitHubSCMNavigator.java:1082)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:902)
      	at jenkins.scm.api.SCMNavigator.visitSources(SCMNavigator.java:221)
      	at jenkins.branch.OrganizationFolder$SCMEventListenerImpl.onSCMHeadEvent(OrganizationFolder.java:1103)
      	at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:246)
      	at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:229)
      	at jenkins.scm.api.SCMEvent$Dispatcher.run(SCMEvent.java:505)
      	at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      
      Jun 10, 2020 8:03:39 AM WARNING okhttp3.internal.platform.Platform log
      A connection to https://api.github.com/ was leaked. Did you forget to close a response body?
      java.lang.Throwable: response.body().close()
      	at okhttp3.internal.platform.Platform.getStackTraceForCloseable(Platform.java:148)
      	at okhttp3.RealCall.captureCallStackTrace(RealCall.java:116)
      	at okhttp3.RealCall.execute(RealCall.java:88)
      	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$OkHttpURLConnection.getResponse(ObsoleteUrlFactory.java:666)
      	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$OkHttpURLConnection.getResponseCode(ObsoleteUrlFactory.java:697)
      	at org.kohsuke.github.extras.okhttp3.ObsoleteUrlFactory$DelegatingHttpsURLConnection.getResponseCode(ObsoleteUrlFactory.java:1058)
      	at org.kohsuke.github.GitHubHttpUrlConnectionClient.getResponseInfo(GitHubHttpUrlConnectionClient.java:69)
      	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:348)
      	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:312)
      	at org.kohsuke.github.GitHubClient.isPrivateModeEnabled(GitHubClient.java:631)
      	at org.kohsuke.github.GitHubClient.checkApiUrlValidity(GitHubClient.java:281)
      	at org.kohsuke.github.GitHub.checkApiUrlValidity(GitHub.java:1088)
      	at org.jenkinsci.plugins.github_branch_source.Connector.checkApiUrlValidity(Connector.java:332)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSource(GitHubSCMNavigator.java:1082)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:902)
      	at jenkins.scm.api.SCMNavigator.visitSources(SCMNavigator.java:221)
      	at jenkins.branch.OrganizationFolder$SCMEventListenerImpl.onSCMHeadEvent(OrganizationFolder.java:1103)
      	at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:246)
      	at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:229)
      	at jenkins.scm.api.SCMEvent$Dispatcher.run(SCMEvent.java:505)
      	at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      

        Attachments

          Activity

          Hide
          bitwiseman Liam Newman added a comment -

          Tim JacombWhat version of the github-api-plugin are you using?

          Show
          bitwiseman Liam Newman added a comment - Tim Jacomb What version of the github-api-plugin are you using?
          Hide
          timja Tim Jacomb added a comment -

          111.4 I think the latest published one 1.112 seemed missing from mirrors

          Show
          timja Tim Jacomb added a comment - 111.4 I think the latest published one 1.112 seemed missing from mirrors
          Show
          timja Tim Jacomb added a comment - All plugins are here: https://github.com/hmcts/cnp-jenkins-docker/blob/master/plugins.txt
          Hide
          bitwiseman Liam Newman added a comment -

          Tim Jacomb
          The latest version of github-api is 1.112.0 .

          Show
          bitwiseman Liam Newman added a comment - Tim Jacomb The latest version of github-api is 1.112.0 .
          Hide
          timja Tim Jacomb added a comment -

          I was unable to download that version so used the previous one

          Show
          timja Tim Jacomb added a comment - I was unable to download that version so used the previous one
          Hide
          timja Tim Jacomb added a comment -

          Updated to 1.112.0 and its still happening

          Show
          timja Tim Jacomb added a comment - Updated to 1.112.0 and its still happening
          Hide
          bitwiseman Liam Newman added a comment -

          This will be fixed in v1.114 when I can publish it.

          Show
          bitwiseman Liam Newman added a comment - This will be fixed in v1.114 when I can publish it.
          Hide
          timja Tim Jacomb added a comment -

          Liam Newman this seems unfixed, I've updated the environment with what we're currently running

           

          Oct 21, 2020 7:29:53 PM WARNING okhttp3.internal.platform.Platform logA connection to https://api.github.com/ was leaked. Did you forget to close a response body?
          java.lang.Throwable: response.body().close()
          	at okhttp3.internal.platform.Platform.getStackTraceForCloseable(Platform.java:149)
          	at okhttp3.internal.connection.Transmitter.callStart(Transmitter.java:116)
          	at okhttp3.RealCall.execute(RealCall.java:78)
          	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.fetch(GitHubClient.java:145)
          	at org.kohsuke.github.GitHubClient.checkApiUrlValidity(GitHubClient.java:330)
          	at org.kohsuke.github.GitHub.checkApiUrlValidity(GitHub.java:1103)
          	at org.jenkinsci.plugins.github_branch_source.Connector.checkApiUrlValidity(Connector.java:332)
          	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSource(GitHubSCMNavigator.java:1112)
          	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:902)
          	at jenkins.scm.api.SCMNavigator.visitSources(SCMNavigator.java:221)
          	at jenkins.branch.OrganizationFolder$SCMEventListenerImpl.onSCMHeadEvent(OrganizationFolder.java:1165)
          	at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:246)
          	at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:229)
          	at jenkins.scm.api.SCMEvent$Dispatcher.run(SCMEvent.java:505)
          	at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
          	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
          	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
          	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
          	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
          	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
          	at java.base/java.lang.Thread.run(Thread.java:834)
          
          Oct 21, 2020 7:29:53 PM WARNING okhttp3.internal.platform.Platform logA connection to https://api.github.com/ was leaked. Did you forget to close a response body?
          java.lang.Throwable: response.body().close()
          	at okhttp3.internal.platform.Platform.getStackTraceForCloseable(Platform.java:149)
          	at okhttp3.internal.connection.Transmitter.callStart(Transmitter.java:116)
          	at okhttp3.RealCall.execute(RealCall.java:78)
          	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.fetch(GitHubClient.java:145)
          	at org.kohsuke.github.GitHubClient.checkApiUrlValidity(GitHubClient.java:330)
          	at org.kohsuke.github.GitHub.checkApiUrlValidity(GitHub.java:1103)
          	at org.jenkinsci.plugins.github_branch_source.Connector.checkApiUrlValidity(Connector.java:332)
          	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSource(GitHubSCMNavigator.java:1112)
          	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:902)
          	at jenkins.scm.api.SCMNavigator.visitSources(SCMNavigator.java:221)
          	at jenkins.branch.OrganizationFolder$SCMEventListenerImpl.onSCMHeadEvent(OrganizationFolder.java:1165)
          	at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:246)
          	at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:229)
          	at jenkins.scm.api.SCMEvent$Dispatcher.run(SCMEvent.java:505)
          	at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
          	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
          	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
          	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
          	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
          	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
          	at java.base/java.lang.Thread.run(Thread.java:834) 
          Show
          timja Tim Jacomb added a comment - Liam Newman this seems unfixed, I've updated the environment with what we're currently running   Oct 21, 2020 7:29:53 PM WARNING okhttp3.internal.platform.Platform logA connection to https: //api.github.com/ was leaked. Did you forget to close a response body? java.lang.Throwable: response.body().close() at okhttp3.internal.platform.Platform.getStackTraceForCloseable(Platform.java:149) at okhttp3.internal.connection.Transmitter.callStart(Transmitter.java:116) at okhttp3.RealCall.execute(RealCall.java:78) 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.fetch(GitHubClient.java:145) at org.kohsuke.github.GitHubClient.checkApiUrlValidity(GitHubClient.java:330) at org.kohsuke.github.GitHub.checkApiUrlValidity(GitHub.java:1103) at org.jenkinsci.plugins.github_branch_source.Connector.checkApiUrlValidity(Connector.java:332) at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSource(GitHubSCMNavigator.java:1112) at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:902) at jenkins.scm.api.SCMNavigator.visitSources(SCMNavigator.java:221) at jenkins.branch.OrganizationFolder$SCMEventListenerImpl.onSCMHeadEvent(OrganizationFolder.java:1165) at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:246) at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:229) at jenkins.scm.api.SCMEvent$Dispatcher.run(SCMEvent.java:505) at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang. Thread .run( Thread .java:834) Oct 21, 2020 7:29:53 PM WARNING okhttp3.internal.platform.Platform logA connection to https: //api.github.com/ was leaked. Did you forget to close a response body? java.lang.Throwable: response.body().close() at okhttp3.internal.platform.Platform.getStackTraceForCloseable(Platform.java:149) at okhttp3.internal.connection.Transmitter.callStart(Transmitter.java:116) at okhttp3.RealCall.execute(RealCall.java:78) 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.fetch(GitHubClient.java:145) at org.kohsuke.github.GitHubClient.checkApiUrlValidity(GitHubClient.java:330) at org.kohsuke.github.GitHub.checkApiUrlValidity(GitHub.java:1103) at org.jenkinsci.plugins.github_branch_source.Connector.checkApiUrlValidity(Connector.java:332) at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSource(GitHubSCMNavigator.java:1112) at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:902) at jenkins.scm.api.SCMNavigator.visitSources(SCMNavigator.java:221) at jenkins.branch.OrganizationFolder$SCMEventListenerImpl.onSCMHeadEvent(OrganizationFolder.java:1165) at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:246) at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:229) at jenkins.scm.api.SCMEvent$Dispatcher.run(SCMEvent.java:505) at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang. Thread .run( Thread .java:834)

            People

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

              Dates

              Created:
              Updated: