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

Appears a timeout isn't being handled properly: "Server returned HTTP response code: -1, message: 'null' for URL"

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Noticed while opening the "plugin flood gates" on ci.jeknins.io (from here)

      I would guesstimate that an underlying timeout isn't being handled properly, not sure why a higher level exception isn't being received though.

      ERROR: [Mon Jun 26 20:42:01 GMT 2017] Could not fetch sources from navigator org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator@1c022c0c
      org.kohsuke.github.HttpException: Server returned HTTP response code: -1, message: 'null' for URL: https://api.github.com/repositories/1163431/collaborators?page=12
      	at org.kohsuke.github.Requester.parse(Requester.java:612)
      	at org.kohsuke.github.Requester._to(Requester.java:262)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester.to(Requester.java:224)
      	at org.kohsuke.github.GHRepository.getCollaboratorNames(GHRepository.java:478)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.updateCollaboratorNames(GitHubSCMSource.java:482)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:461)
      	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:300)
      	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:254)
      	at jenkins.branch.MultiBranchProjectFactory$BySCMSourceCriteria.recognizes(MultiBranchProjectFactory.java:263)
      	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.recognizes(OrganizationFolder.java:1274)
      	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.complete(OrganizationFolder.java:1289)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.add(GitHubSCMNavigator.java:540)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:362)
      	at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:401)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:266)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:162)
      	at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:852)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:405)
      Caused by: java.net.SocketTimeoutException: timeout
      	at okio.Okio$3.newTimeoutException(Okio.java:207)
      	at okio.AsyncTimeout.exit(AsyncTimeout.java:261)
      	at okio.AsyncTimeout$2.read(AsyncTimeout.java:215)
      	at okio.RealBufferedSource.indexOf(RealBufferedSource.java:306)
      	at okio.RealBufferedSource.indexOf(RealBufferedSource.java:300)
      	at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:196)
      	at com.squareup.okhttp.internal.http.Http1xStream.readResponse(Http1xStream.java:186)
      	at com.squareup.okhttp.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:127)
      	at com.squareup.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:737)
      	at com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:609)
      	at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:460)
      	at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:399)
      	at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:527)
      	at com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
      	at com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25)
      	at org.kohsuke.github.Requester.parse(Requester.java:586)
      	... 29 more
      Caused by: java.net.SocketException: Socket closed
      	at java.net.SocketInputStream.read(SocketInputStream.java:204)
      	at java.net.SocketInputStream.read(SocketInputStream.java:141)
      	at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
      	at sun.security.ssl.InputRecord.read(InputRecord.java:503)
      	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
      	at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:930)
      	at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
      	at okio.Okio$2.read(Okio.java:139)
      	at okio.AsyncTimeout$2.read(AsyncTimeout.java:211)
      	... 42 more
      [Mon Jun 26 20:42:01 GMT 2017] Finished organization scan. Scan took 1 min 57 sec
      FATAL: Failed to recompute children of Plugins
      org.kohsuke.github.HttpException: Server returned HTTP response code: -1, message: 'null' for URL: https://api.github.com/repositories/1163431/collaborators?page=12
      	at org.kohsuke.github.Requester.parse(Requester.java:612)
      	at org.kohsuke.github.Requester._to(Requester.java:262)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester._to(Requester.java:270)
      	at org.kohsuke.github.Requester.to(Requester.java:224)
      	at org.kohsuke.github.GHRepository.getCollaboratorNames(GHRepository.java:478)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.updateCollaboratorNames(GitHubSCMSource.java:482)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:461)
      	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:300)
      	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:254)
      	at jenkins.branch.MultiBranchProjectFactory$BySCMSourceCriteria.recognizes(MultiBranchProjectFactory.java:263)
      	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.recognizes(OrganizationFolder.java:1274)
      	at jenkins.branch.OrganizationFolder$SCMSourceObserverImpl$1.complete(OrganizationFolder.java:1289)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.add(GitHubSCMNavigator.java:540)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:362)
      	at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:401)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:266)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:162)
      	at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:852)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:405)
      Caused by: java.net.SocketTimeoutException: timeout
      	at okio.Okio$3.newTimeoutException(Okio.java:207)
      	at okio.AsyncTimeout.exit(AsyncTimeout.java:261)
      	at okio.AsyncTimeout$2.read(AsyncTimeout.java:215)
      	at okio.RealBufferedSource.indexOf(RealBufferedSource.java:306)
      	at okio.RealBufferedSource.indexOf(RealBufferedSource.java:300)
      	at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:196)
      	at com.squareup.okhttp.internal.http.Http1xStream.readResponse(Http1xStream.java:186)
      	at com.squareup.okhttp.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:127)
      	at com.squareup.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:737)
      	at com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:609)
      	at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:460)
      	at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:399)
      	at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:527)
      	at com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
      	at com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25)
      	at org.kohsuke.github.Requester.parse(Requester.java:586)
      	... 29 more
      Caused by: java.net.SocketException: Socket closed
      	at java.net.SocketInputStream.read(SocketInputStream.java:204)
      	at java.net.SocketInputStream.read(SocketInputStream.java:141)
      	at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
      	at sun.security.ssl.InputRecord.read(InputRecord.java:503)
      	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
      	at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:930)
      	at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
      	at okio.Okio$2.read(Okio.java:139)
      	at okio.AsyncTimeout$2.read(AsyncTimeout.java:211)
      	... 42 more
      Finished: FAILURE
      
      

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Evan Borgstrom if you have something that works for you, file it as a PR and it can be reviewed whenever someone maintaining this code has time. (Assign the issue to yourself, mark as In Review, create a link to the PR, make sure the PR links back to JIRA.)

            Regarding my previous comment: TrustContributors definitely makes a lot of API calls and should be discouraged—this was the original trust implementation prior to GitHub enhancements that allowed TrustPermission to be introduced, which does a more precise job of identifying people with write permission. My claim that TrustPermission should be cheaper is based on reading sources of Stephen Connolly’s somewhat weird implementation, in LazyContributorNames.

            Show
            jglick Jesse Glick added a comment - Evan Borgstrom if you have something that works for you, file it as a PR and it can be reviewed whenever someone maintaining this code has time. (Assign the issue to yourself, mark as In Review, create a link to the PR, make sure the PR links back to JIRA.) Regarding my previous comment: TrustContributors definitely makes a lot of API calls and should be discouraged—this was the original trust implementation prior to GitHub enhancements that allowed TrustPermission to be introduced, which does a more precise job of identifying people with write permission. My claim that TrustPermission should be cheaper is based on reading sources of  Stephen Connolly ’s somewhat weird implementation, in LazyContributorNames .
            Hide
            borgstrom Evan Borgstrom added a comment -

            Jesse Glick Sounds good. I will cleanup my branch an file it as a PR.

            WRT to TrustContributors I have it set to "Nobody" for forks, so I don't think that's the issue. When it was set to "Contributors" the issue here was definitely exasperated. We've noticed a bunch of GitHub "issues" over the past couple weeks (like very elevated web hook delivery times), so I assume we're just running into some instabilities in their system.

            Show
            borgstrom Evan Borgstrom added a comment - Jesse Glick Sounds good. I will cleanup my branch an file it as a PR. WRT to TrustContributors I have it set to "Nobody" for forks, so I don't think that's the issue. When it was set to "Contributors" the issue here was definitely exasperated. We've noticed a bunch of GitHub "issues" over the past couple weeks (like very elevated web hook delivery times), so I assume we're just running into some instabilities in their system.
            Hide
            borgstrom Evan Borgstrom added a comment -

            PR filed: https://github.com/kohsuke/github-api/pull/373

            I do not have permissions to assign myself or edit labels.

            Show
            borgstrom Evan Borgstrom added a comment - PR filed: https://github.com/kohsuke/github-api/pull/373 I do not have permissions to assign myself or edit labels.
            Hide
            jglick Jesse Glick added a comment -

            Nobody or Everyone is definitely lower-traffic, Contributors is definitely higher-traffic; I think that From users with Admin or Write permission (the most accurate mode) is relatively cheap.

            Show
            jglick Jesse Glick added a comment - Nobody or Everyone is definitely lower-traffic, Contributors is definitely higher-traffic; I think  that From users with Admin or Write permission (the most accurate mode) is relatively cheap.
            Hide
            erikdahlinghaus Erik Dahlinghaus added a comment -

            Any updates on this issue? PR on github-api still has not been merged because Evan said it's still not working for him. This is causing issues at my organization.

            Show
            erikdahlinghaus Erik Dahlinghaus added a comment - Any updates on this issue? PR on github-api still has not been merged because Evan said it's still not working for him. This is causing issues at my organization.

              People

              • Assignee:
                borgstrom Evan Borgstrom
                Reporter:
                rtyler R. Tyler Croy
              • Votes:
                4 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated: