Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8192797

Websocket fails to handle server requests immediately after wss connection obtained

    Details

    • Subcomponent:
    • Resolved In Build:
      team

      Description

      The server endpoint is deployed on Glassfish 4.1, which is simply close the session in OnOpen method. A simple connect/disconnect works well in ws connect, but if it is wss. It will fail with IOException below.

      Please see the following snippet of debugging log:
      DEBUG: [HttpClient-8-Worker-2] [2s 575ms] SSLTube(SocketTube(8)) Http1AsyncReceiver downstream subscription demand is 9223372036854775807
      DEBUG: [HttpClient-8-Worker-2] [2s 575ms] SSLTube(SocketTube(8)) Http1AsyncReceiver checkRequestMore: canRequestMore=false, hasDemand=true
      DEBUG: [HttpClient-8-Worker-2] [2s 575ms] SSLTube(SocketTube(8)) Http1AsyncReceiver Http1TubeSubscriber: no need to request more
      DEBUG: [HttpClient-8-SelectorManager] [2s 575ms] PlainHttpConnection(SocketTube(8)) Shutting down input
      DEBUG: [HttpClient-8-SelectorManager] [2s 576ms] PlainHttpConnection(SocketTube(8)) Shutting down output
      java.io.IOException: connection closed for reading
      at jdk.incubator.httpclient/jdk.incubator.http.SSLDelegate$EngineWrapper.recvAndUnwrap(SSLDelegate.java:282)
      at jdk.incubator.httpclient/jdk.incubator.http.SSLDelegate.recvData(SSLDelegate.java:361)
      at jdk.incubator.httpclient/jdk.incubator.http.AbstractAsyncSSLConnection$SSLConnectionChannel.read(AbstractAsyncSSLConnection.java:140)
      at jdk.incubator.httpclient/jdk.incubator.http.RawChannelImpl.read(RawChannelImpl.java:114)
      at jdk.incubator.httpclient/jdk.incubator.http.internal.websocket.Receiver$PushContinuouslyTask.run(Receiver.java:157)
      at jdk.incubator.httpclient/jdk.incubator.http.internal.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:147)
      at jdk.incubator.httpclient/jdk.incubator.http.internal.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:198)
      at jdk.incubator.httpclient/jdk.incubator.http.internal.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:271)
      at jdk.incubator.httpclient/jdk.incubator.http.internal.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:224)
      at jdk.incubator.httpclient/jdk.incubator.http.internal.websocket.Receiver$1.handle(Receiver.java:93)
      at jdk.incubator.httpclient/jdk.incubator.http.RawChannelImpl$NonBlockingRawAsyncEvent.handle(RawChannelImpl.java:98)
      at jdk.incubator.httpclient/jdk.incubator.http.HttpClientImpl$SelectorManager.handleEvent(HttpClientImpl.java:769)
      at jdk.incubator.httpclient/jdk.incubator.http.HttpClientImpl$SelectorManager.run(HttpClientImpl.java:731)
      java.lang.Exception: failures: 4
      at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:96)
      at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
      at java.base/java.lang.Thread.run(Thread.java:844)

        Attachments

          Activity

            People

            • Assignee:
              xiaofeya Xiaofeng Yang
              Reporter:
              xiaofeya Xiaofeng Yang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: