java – 使用Jetty Content Exchange和SSL时导致“断管”的原因是什么?

我试图使用Jetty Content Exchange对象发出http请求,并收到以下错误.

握手失败究竟意味着什么,以及如何获得有关失败原因的更多信息?

15:53:57.765 [qtp88119371-18] DEBUG org.eclipse.jetty.http.ssl - [Session-1, SSL_NULL_WITH_NULL_NULL] Flushed 37/37
15:53:57.765 [qtp88119371-18] DEBUG org.eclipse.jetty.http.ssl - [Session-1, SSL_NULL_WITH_NULL_NULL] unwrap filled 0
15:53:57.765 [qtp88119371-18] DEBUG org.eclipse.jetty.http.ssl - [Session-1, SSL_NULL_WITH_NULL_NULL] unwrap filled 0
15:53:57.765 [qtp88119371-18] DEBUG org.eclipse.jetty.http.ssl - [Session-1, SSL_NULL_WITH_NULL_NULL] unwrap filled 0
15:53:57.765 [qtp88119371-18] DEBUG org.eclipse.jetty.http.ssl - [Session-1, SSL_NULL_WITH_NULL_NULL] unwrap filled 0
15:53:57.765 [qtp88119371-18] DEBUG org.eclipse.jetty.http.ssl - [Session-1, SSL_NULL_WITH_NULL_NULL] unwrap filled 0
15:53:57.765 [qtp88119371-18] DEBUG org.eclipse.jetty.http.ssl - [Session-1, SSL_NULL_WITH_NULL_NULL] unwrap filled 0
15:53:57.765 [qtp88119371-18] DEBUG org.eclipse.jetty.http.ssl - [Session-1, SSL_NULL_WITH_NULL_NULL] unwrap filled 0
15:53:57.765 [qtp88119371-18] DEBUG org.eclipse.jetty.http.ssl - [Session-1, SSL_NULL_WITH_NULL_NULL] unwrap filled 0
15:53:57.765 [qtp88119371-18] DEBUG org.eclipse.jetty.http.ssl - [Session-1, SSL_NULL_WITH_NULL_NULL] unwrap filled 0
15:53:57.811 [qtp88119371-19] DEBUG org.eclipse.jetty.http.ssl - [Session-1, SSL_NULL_WITH_NULL_NULL] unwrap filled 7
15:53:57.811 [qtp88119371-19] DEBUG org.eclipse.jetty.http.ssl - [Session-1, SSL_NULL_WITH_NULL_NULL] closing NEED_WRAP
15:53:57.811 [qtp88119371-19] DEBUG org.eclipse.jetty.http.ssl - [Session-1, SSL_NULL_WITH_NULL_NULL] close wrap Status = CLOSED HandshakeStatus = NEED_UNWRAP
bytesConsumed = 0 bytesProduced = 23
15:53:57.814 [qtp88119371-19] DEBUG org.eclipse.jetty.util.log - EXCEPTION 
java.io.IOException: Broken pipe
        at sun.nio.ch.FileDispatcher.write0(Native Method) [na:1.6.0_26]
        at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:29) [na:1.6.0_26]
        at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:72) [na:1.6.0_26]
        at sun.nio.ch.IOUtil.write(IOUtil.java:28) [na:1.6.0_26]
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:334) [na:1.6.0_26]
        at org.eclipse.jetty.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:229) [jetty-io-7.4.2.v20110526.jar:7.4.2.v20110526]
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:282) [jetty-io-7.4.2.v20110526.jar:7.4.2.v20110526]
        at org.eclipse.jetty.io.nio.SslSelectChannelEndPoint.flush(SslSelectChannelEndPoint.java:638) [jetty-io-7.4.2.v20110526.jar:7.4.2.v20110526]
        at org.eclipse.jetty.io.nio.SslSelectChannelEndPoint.sslClose(SslSelectChannelEndPoint.java:224) [jetty-io-7.4.2.v20110526.jar:7.4.2.v20110526]
        at org.eclipse.jetty.io.nio.SslSelectChannelEndPoint.close(SslSelectChannelEndPoint.java:313) [jetty-io-7.4.2.v20110526.jar:7.4.2.v20110526]
        at org.eclipse.jetty.io.nio.ChannelEndPoint.fill(ChannelEndPoint.java:187) [jetty-io-7.4.2.v20110526.jar:7.4.2.v20110526]
        at org.eclipse.jetty.io.nio.SslSelectChannelEndPoint.unwrap(SslSelectChannelEndPoint.java:695) [jetty-io-7.4.2.v20110526.jar:7.4.2.v20110526]
        at org.eclipse.jetty.io.nio.SslSelectChannelEndPoint.flush(SslSelectChannelEndPoint.java:559) [jetty-io-7.4.2.v20110526.jar:7.4.2.v20110526]
        at org.eclipse.jetty.io.nio.SslSelectChannelEndPoint.flush(SslSelectChannelEndPoint.java:489) [jetty-io-7.4.2.v20110526.jar:7.4.2.v20110526]
        at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:849) [jetty-http-7.4.2.v20110526.jar:7.4.2.v20110526]
        at org.eclipse.jetty.client.HttpConnection.handle(HttpConnection.java:235) [jetty-client-7.4.2.v20110526.jar:7.4.2.v20110526]
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535) [jetty-io-7.4.2.v20110526.jar:7.4.2.v20110526]
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40) [jetty-io-7.4.2.v20110526.jar:7.4.2.v20110526]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529) [jetty-util-7.4.2.v20110526.jar:7.4.2.v20110526]
        at java.lang.Thread.run(Thread.java:680) [na:1.6.0_26]
15:53:57.818 [qtp88119371-19] WARN  org.eclipse.jetty.util.log - 50.17.212.38:443 javax.net.ssl.SSLException: Received fatal alert: handshake_failure
15:53:57.818 [qtp88119371-19] DEBUG org.eclipse.jetty.util.log - Failure on GetAvailability@296737228=GET//XXXXXXXXXXXXXXXXXXXXXXXX:443/health#4
org.eclipse.jetty.io.EofException
        at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:911)
        at org.eclipse.jetty.client.HttpConnection.handle(HttpConnection.java:235)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
        at java.lang.Thread.run(Thread.java:680)
Caused by: javax.net.ssl.SSLException: Received fatal alert: handshake_failure
        at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190)
        at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1429)
        at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1397)
        at com.sun.net.ssl.internal.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1563)
        at com.sun.net.ssl.internal.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1023)
        at com.sun.net.ssl.internal.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:837)
        at com.sun.net.ssl.internal.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:713)
        at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:607)
        at org.eclipse.jetty.io.nio.SslSelectChannelEndPoint.unwrap(SslSelectChannelEndPoint.java:755)
        at org.eclipse.jetty.io.nio.SslSelectChannelEndPoint.flush(SslSelectChannelEndPoint.java:559)
        at org.eclipse.jetty.io.nio.SslSelectChannelEndPoint.flush(SslSelectChannelEndPoint.java:489)
        at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:849)
        ... 5 more

最佳答案 “断管”表示您已写入已被另一端关闭的连接.通常你发送了一些它不理解的东西,并以静音抗议关闭了连接.在这种情况下,我想知道它是否真的是目标主机上的SSL服务:端口.

点赞