我有一个基于 Java 的服务,当我运行它时抛出意外的 SSL 异常“套接字已关闭”......或者有时“数据以非数据状态接收”。当我通过添加 jvmArgs 配置远程调试器时: -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5050 ,然后运行它永远不会抛出此异常。这个选项有什么东西可以修改服务的行为吗?
例外:
javax.net.ssl.SSLProtocolException: Data received in non-data state: 6
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1061)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:884)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:102)
at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:149)
at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:110)
at org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:191)
at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:164)
at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:138)
at java.security.DigestInputStream.read(DigestInputStream.java:161)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at com.amazonaws.services.s3.internal.ChecksumValidatingInputStream.read(ChecksumValidatingInputStream.java:97)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at java.io.FilterInputStream.read(FilterInputStream.java:107)
at javax.crypto.CipherInputStream.getMoreData(CipherInputStream.java:103)
at javax.crypto.CipherInputStream.read(CipherInputStream.java:224)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at java.io.FilterInputStream.read(FilterInputStream.java:107)
at <mypackagenameremovedforanonymity>.GetObjectActivity.enact(GetObjectActivity.java:118)
上下文:我正在读取包装 SSL 套接字的 InputStream