java.io.IOException: Connection reset by peer at sun.nio.ch.FileDispatcherImpl.read0(java.base@9-ea/Native Method) at sun.nio.ch.SocketDispatcher.read(java.base@9-ea/SocketDispatcher.java:39) at sun.nio.ch.IOUtil.readIntoNativeBuffer(java.base@9-ea/IOUtil.java:223) at sun.nio.ch.IOUtil.read(java.base@9-ea/IOUtil.java:197) at sun.nio.ch.SocketChannelImpl.read(java.base@9-ea/SocketChannelImpl.java:382) at java.net.http.PlainHttpConnection.readImpl(java.httpclient@9-ea/PlainHttpConnection.java:222) at java.net.http.HttpConnection.read(java.httpclient@9-ea/HttpConnection.java:310) at java.net.http.HttpConnection.read(java.httpclient@9-ea/HttpConnection.java:286) at java.net.http.Http1Response.getBuffer(java.httpclient@9-ea/Http1Response.java:251) at java.net.http.Http1Response.readStatusLine(java.httpclient@9-ea/Http1Response.java:264) at java.net.http.Http1Response.readHeaders(java.httpclient@9-ea/Http1Response.java:69) at java.net.http.Http1Exchange.getResponse(java.httpclient@9-ea/Http1Exchange.java:144) at java.net.http.Exchange.responseImpl0(java.httpclient@9-ea/Exchange.java:149) at java.net.http.Exchange.responseImpl(java.httpclient@9-ea/Exchange.java:129) at java.net.http.Exchange.response(java.httpclient@9-ea/Exchange.java:86) at java.net.http.MultiExchange.response(java.httpclient@9-ea/MultiExchange.java:99) at java.net.http.HttpRequestImpl.response(java.httpclient@9-ea/HttpRequestImpl.java:214)

JDK Bug System | Felix Yang | 3 months ago
  1. 0

    This is intermittent. It has been observed once in 9 b133 same binaries run on Solaris X64. Test output: ----------System.out:(1/20)---------- Server port = 58559 ----------System.err:(30/2212)---------- java.io.IOException: Connection reset by peer at sun.nio.ch.FileDispatcherImpl.read0(java.base@9-ea/Native Method) at sun.nio.ch.SocketDispatcher.read(java.base@9-ea/SocketDispatcher.java:39) at sun.nio.ch.IOUtil.readIntoNativeBuffer(java.base@9-ea/IOUtil.java:223) at sun.nio.ch.IOUtil.read(java.base@9-ea/IOUtil.java:197) at sun.nio.ch.SocketChannelImpl.read(java.base@9-ea/SocketChannelImpl.java:382) at java.net.http.PlainHttpConnection.readImpl(java.httpclient@9-ea/PlainHttpConnection.java:222) at java.net.http.HttpConnection.read(java.httpclient@9-ea/HttpConnection.java:310) at java.net.http.HttpConnection.read(java.httpclient@9-ea/HttpConnection.java:286) at java.net.http.Http1Response.getBuffer(java.httpclient@9-ea/Http1Response.java:251) at java.net.http.Http1Response.readStatusLine(java.httpclient@9-ea/Http1Response.java:264) at java.net.http.Http1Response.readHeaders(java.httpclient@9-ea/Http1Response.java:69) at java.net.http.Http1Exchange.getResponse(java.httpclient@9-ea/Http1Exchange.java:144) at java.net.http.Exchange.responseImpl0(java.httpclient@9-ea/Exchange.java:149) at java.net.http.Exchange.responseImpl(java.httpclient@9-ea/Exchange.java:129) at java.net.http.Exchange.response(java.httpclient@9-ea/Exchange.java:86) at java.net.http.MultiExchange.response(java.httpclient@9-ea/MultiExchange.java:99) at java.net.http.HttpRequestImpl.response(java.httpclient@9-ea/HttpRequestImpl.java:214) at HeadersTest1.main(HeadersTest1.java:73) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:535) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110) at java.lang.Thread.run(java.base@9-ea/Thread.java:843)

    JDK Bug System | 3 months ago | Felix Yang
    java.io.IOException: Connection reset by peer at sun.nio.ch.FileDispatcherImpl.read0(java.base@9-ea/Native Method) at sun.nio.ch.SocketDispatcher.read(java.base@9-ea/SocketDispatcher.java:39) at sun.nio.ch.IOUtil.readIntoNativeBuffer(java.base@9-ea/IOUtil.java:223) at sun.nio.ch.IOUtil.read(java.base@9-ea/IOUtil.java:197) at sun.nio.ch.SocketChannelImpl.read(java.base@9-ea/SocketChannelImpl.java:382) at java.net.http.PlainHttpConnection.readImpl(java.httpclient@9-ea/PlainHttpConnection.java:222) at java.net.http.HttpConnection.read(java.httpclient@9-ea/HttpConnection.java:310) at java.net.http.HttpConnection.read(java.httpclient@9-ea/HttpConnection.java:286) at java.net.http.Http1Response.getBuffer(java.httpclient@9-ea/Http1Response.java:251) at java.net.http.Http1Response.readStatusLine(java.httpclient@9-ea/Http1Response.java:264) at java.net.http.Http1Response.readHeaders(java.httpclient@9-ea/Http1Response.java:69) at java.net.http.Http1Exchange.getResponse(java.httpclient@9-ea/Http1Exchange.java:144) at java.net.http.Exchange.responseImpl0(java.httpclient@9-ea/Exchange.java:149) at java.net.http.Exchange.responseImpl(java.httpclient@9-ea/Exchange.java:129) at java.net.http.Exchange.response(java.httpclient@9-ea/Exchange.java:86) at java.net.http.MultiExchange.response(java.httpclient@9-ea/MultiExchange.java:99) at java.net.http.HttpRequestImpl.response(java.httpclient@9-ea/HttpRequestImpl.java:214)
  2. 0

    java/net/httpclient/ImmutableHeaders.java fails intermittently #section:main ----------messages:(4/162)---------- command: main ImmutableHeaders reason: User specified action: run main/othervm ImmutableHeaders Mode: othervm [/othervm specified] elapsed time (seconds): 1.123 ----------configuration:(0/0)---------- ----------System.out:(1/20)---------- Server port = 41936 ----------System.err:(30/2220)---------- java.io.IOException: Connection reset by peer at sun.nio.ch.FileDispatcherImpl.read0(java.base@9-ea/Native Method) at sun.nio.ch.SocketDispatcher.read(java.base@9-ea/SocketDispatcher.java:39) at sun.nio.ch.IOUtil.readIntoNativeBuffer(java.base@9-ea/IOUtil.java:223) at sun.nio.ch.IOUtil.read(java.base@9-ea/IOUtil.java:197) at sun.nio.ch.SocketChannelImpl.read(java.base@9-ea/SocketChannelImpl.java:382) at java.net.http.PlainHttpConnection.readImpl(java.httpclient@9-ea/PlainHttpConnection.java:219) at java.net.http.HttpConnection.read(java.httpclient@9-ea/HttpConnection.java:308) at java.net.http.HttpConnection.read(java.httpclient@9-ea/HttpConnection.java:284) at java.net.http.Http1Response.getBuffer(java.httpclient@9-ea/Http1Response.java:249) at java.net.http.Http1Response.readStatusLine(java.httpclient@9-ea/Http1Response.java:262) at java.net.http.Http1Response.readHeaders(java.httpclient@9-ea/Http1Response.java:67) at java.net.http.Http1Exchange.getResponse(java.httpclient@9-ea/Http1Exchange.java:142) at java.net.http.Exchange.responseImpl0(java.httpclient@9-ea/Exchange.java:147) at java.net.http.Exchange.responseImpl(java.httpclient@9-ea/Exchange.java:127) at java.net.http.Exchange.response(java.httpclient@9-ea/Exchange.java:84) at java.net.http.MultiExchange.response(java.httpclient@9-ea/MultiExchange.java:98) at java.net.http.HttpRequestImpl.response(java.httpclient@9-ea/HttpRequestImpl.java:212) at ImmutableHeaders.main(ImmutableHeaders.java:82) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:531) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110) at java.lang.Thread.run(java.base@9-ea/Thread.java:804)

    JDK Bug System | 6 months ago | Amy Lu
    java.io.IOException: Connection reset by peer at sun.nio.ch.FileDispatcherImpl.read0(java.base@9-ea/Native Method) at sun.nio.ch.SocketDispatcher.read(java.base@9-ea/SocketDispatcher.java:39) at sun.nio.ch.IOUtil.readIntoNativeBuffer(java.base@9-ea/IOUtil.java:223) at sun.nio.ch.IOUtil.read(java.base@9-ea/IOUtil.java:197) at sun.nio.ch.SocketChannelImpl.read(java.base@9-ea/SocketChannelImpl.java:382) at java.net.http.PlainHttpConnection.readImpl(java.httpclient@9-ea/PlainHttpConnection.java:219) at java.net.http.HttpConnection.read(java.httpclient@9-ea/HttpConnection.java:308) at java.net.http.HttpConnection.read(java.httpclient@9-ea/HttpConnection.java:284) at java.net.http.Http1Response.getBuffer(java.httpclient@9-ea/Http1Response.java:249) at java.net.http.Http1Response.readStatusLine(java.httpclient@9-ea/Http1Response.java:262) at java.net.http.Http1Response.readHeaders(java.httpclient@9-ea/Http1Response.java:67) at java.net.http.Http1Exchange.getResponse(java.httpclient@9-ea/Http1Exchange.java:142) at java.net.http.Exchange.responseImpl0(java.httpclient@9-ea/Exchange.java:147) at java.net.http.Exchange.responseImpl(java.httpclient@9-ea/Exchange.java:127) at java.net.http.Exchange.response(java.httpclient@9-ea/Exchange.java:84) at java.net.http.MultiExchange.response(java.httpclient@9-ea/MultiExchange.java:98) at java.net.http.HttpRequestImpl.response(java.httpclient@9-ea/HttpRequestImpl.java:212)
  3. 0

    Exception in thread "main" java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request" at sun.net.www.protocol.http.HttpURLConnection.doTunneling(java.base@9-ea/HttpURLConnection.java:2077) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(java.base@9-ea/AbstractDelegateHttpsURLConnection.java:183) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(java.base@9-ea/HttpURLConnection.java:1280) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(java.base@9-ea/HttpURLConnection.java:1255) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(java.base@9-ea/HttpsURLConnectionImpl.java:231) at PostThruProxyWithAuth.doClientSide(PostThruProxyWithAuth.java:172) at PostThruProxyWithAuth.main(PostThruProxyWithAuth.java:113)

    JDK Bug System | 5 months ago | John Jiang
    java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request" at sun.net.www.protocol.http.HttpURLConnection.doTunneling(java.base@9-ea/HttpURLConnection.java:2077) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(java.base@9-ea/AbstractDelegateHttpsURLConnection.java:183) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(java.base@9-ea/HttpURLConnection.java:1280) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(java.base@9-ea/HttpURLConnection.java:1255) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(java.base@9-ea/HttpsURLConnectionImpl.java:231)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    When HTTP_2 client access a HTTP/2 server over HTTPS, the below exception was thrown, Exception in thread "main" java.io.IOException: stream closed at java.net.http.Queue.putAll(java.httpclient@9-internal/Queue.java:45) at java.net.http.AsyncSSLDelegate.write(java.httpclient@9-internal/AsyncSSLDelegate.java:152) at java.net.http.AsyncSSLConnection.write(java.httpclient@9-internal/AsyncSSLConnection.java:92) at java.net.http.Http2Connection.sendConnectionPreface(java.httpclient@9-internal/Http2Connection.java:564) at java.net.http.Http2Connection.<init>(java.httpclient@9-internal/Http2Connection.java:189) at java.net.http.Http2ClientImpl.getConnectionFor(java.httpclient@9-internal/Http2ClientImpl.java:101) at java.net.http.ExchangeImpl.get(java.httpclient@9-internal/ExchangeImpl.java:86) at java.net.http.Exchange.responseImpl0(java.httpclient@9-internal/Exchange.java:179) at java.net.http.Exchange.responseImpl(java.httpclient@9-internal/Exchange.java:172) at java.net.http.Exchange.response(java.httpclient@9-internal/Exchange.java:122) at java.net.http.MultiExchange.response(java.httpclient@9-internal/MultiExchange.java:146) at java.net.http.HttpRequestImpl.response(java.httpclient@9-internal/HttpRequestImpl.java:251) at SimpleSslTest.main(SimpleSslTest.java:35)

    JDK Bug System | 3 months ago | John Jiang
    java.io.IOException: stream closed at java.net.http.Queue.putAll(java.httpclient@9-internal/Queue.java:45) at java.net.http.AsyncSSLDelegate.write(java.httpclient@9-internal/AsyncSSLDelegate.java:152) at java.net.http.AsyncSSLConnection.write(java.httpclient@9-internal/AsyncSSLConnection.java:92) at java.net.http.Http2Connection.sendConnectionPreface(java.httpclient@9-internal/Http2Connection.java:564) at java.net.http.Http2Connection.<init>(java.httpclient@9-internal/Http2Connection.java:189) at java.net.http.Http2ClientImpl.getConnectionFor(java.httpclient@9-internal/Http2ClientImpl.java:101) at java.net.http.ExchangeImpl.get(java.httpclient@9-internal/ExchangeImpl.java:86) at java.net.http.Exchange.responseImpl0(java.httpclient@9-internal/Exchange.java:179) at java.net.http.Exchange.responseImpl(java.httpclient@9-internal/Exchange.java:172) at java.net.http.Exchange.response(java.httpclient@9-internal/Exchange.java:122) at java.net.http.MultiExchange.response(java.httpclient@9-internal/MultiExchange.java:146) at java.net.http.HttpRequestImpl.response(java.httpclient@9-internal/HttpRequestImpl.java:251)
  6. 0

    public class SimpleConnectTest { public static void main(String[] args) throws Exception { String url = "..."; // This access won't return body HttpClient client = HttpClient.create().version(Version.HTTP_2).build(); HttpRequest request = client.request(new URI(url)).GET(); HttpResponse<String> response = request.response(HttpResponse.BodyHandler.asString()); System.out.println(response.statusCode()); System.out.println(response.body()); } } Exception in thread "main" java.io.IOException: Queue closed at java.net.http.Queue.take(java.httpclient@9-internal/Queue.java:113) at java.net.http.Stream.lambda$receiveData$1(java.httpclient@9-internal/Stream.java:187) at java.net.http.Stream.executeInline(java.httpclient@9-internal/Stream.java:164) at java.net.http.Stream.receiveData(java.httpclient@9-internal/Stream.java:182) at java.net.http.Stream.readBodyAsync(java.httpclient@9-internal/Stream.java:142) at java.net.http.Stream.readBody(java.httpclient@9-internal/Stream.java:155) at java.net.http.Exchange.readBody(java.httpclient@9-internal/Exchange.java:131) at java.net.http.MultiExchange.response(java.httpclient@9-internal/MultiExchange.java:121) at java.net.http.HttpRequestImpl.response(java.httpclient@9-internal/HttpRequestImpl.java:251) at SimpleConnectTest.main(SimpleConnectTest.java:13)

    JDK Bug System | 3 months ago | John Jiang
    java.io.IOException: Queue closed at java.net.http.Queue.take(java.httpclient@9-internal/Queue.java:113) at java.net.http.Stream.lambda$receiveData$1(java.httpclient@9-internal/Stream.java:187) at java.net.http.Stream.executeInline(java.httpclient@9-internal/Stream.java:164) at java.net.http.Stream.receiveData(java.httpclient@9-internal/Stream.java:182) at java.net.http.Stream.readBodyAsync(java.httpclient@9-internal/Stream.java:142) at java.net.http.Stream.readBody(java.httpclient@9-internal/Stream.java:155) at java.net.http.Exchange.readBody(java.httpclient@9-internal/Exchange.java:131) at java.net.http.MultiExchange.response(java.httpclient@9-internal/MultiExchange.java:121) at java.net.http.HttpRequestImpl.response(java.httpclient@9-internal/HttpRequestImpl.java:251)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.IOException

      Connection reset by peer at sun.nio.ch.FileDispatcherImpl.read0(java.base@9-ea/Native Method) at sun.nio.ch.SocketDispatcher.read(java.base@9-ea/SocketDispatcher.java:39) at sun.nio.ch.IOUtil.readIntoNativeBuffer(java.base@9-ea/IOUtil.java:223) at sun.nio.ch.IOUtil.read(java.base@9-ea/IOUtil.java:197) at sun.nio.ch.SocketChannelImpl.read(java.base@9-ea/SocketChannelImpl.java:382) at java.net.http.PlainHttpConnection.readImpl(java.httpclient@9-ea/PlainHttpConnection.java:222) at java.net.http.HttpConnection.read(java.httpclient@9-ea/HttpConnection.java:310) at java.net.http.HttpConnection.read(java.httpclient@9-ea/HttpConnection.java:286) at java.net.http.Http1Response.getBuffer(java.httpclient@9-ea/Http1Response.java:251) at java.net.http.Http1Response.readStatusLine(java.httpclient@9-ea/Http1Response.java:264) at java.net.http.Http1Response.readHeaders(java.httpclient@9-ea/Http1Response.java:69) at java.net.http.Http1Exchange.getResponse(java.httpclient@9-ea/Http1Exchange.java:144) at java.net.http.Exchange.responseImpl0(java.httpclient@9-ea/Exchange.java:149) at java.net.http.Exchange.responseImpl(java.httpclient@9-ea/Exchange.java:129) at java.net.http.Exchange.response(java.httpclient@9-ea/Exchange.java:86) at java.net.http.MultiExchange.response(java.httpclient@9-ea/MultiExchange.java:99) at java.net.http.HttpRequestImpl.response(java.httpclient@9-ea/HttpRequestImpl.java:214)

      at HeadersTest1.main()
    2. Unknown
      HeadersTest1.main
      1. HeadersTest1.main(HeadersTest1.java:73)
      1 frame