For what it's worth, I hit this issue in Blue Ocean 1.9 and Jenkins 1.138.4 after git checkouts at the start of a pipeline build failed (the remote was having issues at the time of the checkout). The checkout timed out and failed, and subsequent attempts to retry hit the same issue as this bug, albeit on much newer versions of the plugin/Jenkins.
I'm seeing this behavior in Blue Ocean 1.19. Should I file a new ticket?
It looks like this meets the criteria in the description – it failed during the initial checkout, with this exception:
Pull request #2922 updated
Connecting to https://api.github.com using will/****** (GitHub Access Token)
Could not update commit status. Message: Server returned HTTP response code: -1, message: 'null'for URL: https://api.github.com/repos/<REDACTED>
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
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:975)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:933)
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)
Caused: 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:615)
Caused: org.kohsuke.github.HttpException: Server returned HTTP response code: -1, message: 'null'for URL: https://api.github.com/repos/<REDACTED>
at org.kohsuke.github.Requester.parse(Requester.java:646)
at org.kohsuke.github.Requester.parse(Requester.java:644)
at org.kohsuke.github.Requester.parse(Requester.java:644)
at org.kohsuke.github.Requester.parse(Requester.java:607)
at org.kohsuke.github.Requester._to(Requester.java:285)
at org.kohsuke.github.Requester.to(Requester.java:247)
at org.kohsuke.github.GHPerson.getRepository(GHPerson.java:140)
at org.jenkinsci.plugins.github_branch_source.GitHubSCMFileSystem$BuilderImpl.build(GitHubSCMFileSystem.java:268)
at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:294)
at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:100)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:293)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE