Netty websocket SSL连接HANDSHAKE_ISSUED

时间:2016-03-29 11:02:07

标签: java android ssl netty handshake

我在与服务器握手时遇到netty websocket连接问题。

我在Android上使用它。

我收到了活动SslHandshakeStateEvent.HANDSHAKE_ISSUED

我能读到的是:

The Handshake was started but the server did not response yet to the request

很快我得到channelInactive并且连接正在关闭。

看起来像服务器问题,但与此服务器的连接在其他平台(如IOS,Windows)上运行良好,也适用于其他服务器。

我的问题是这个连接可能有什么问题我得到了HANDSHAKE_ISSUED,在什么情况下会发生这些?

EDIT 来自netty的日志,需要更改xxx的地址:

03-29 17:10:01.294 27227-27604/com.x.androidtestapp D/nativeSSL: [id: 0x3a098404] REGISTERED
03-29 17:10:01.294 27227-27604/com.x.androidtestapp D/nativeSSL: [id: 0x3a098404] CONNECT: xxx/xxx
03-29 17:10:01.594 27227-27604/com.x.androidtestapp D/nativeSSL: [id: 0x3a098404, /xxx => xxx] ACTIVE
03-29 17:10:01.604 27227-27604/com.x.androidtestapp D/nativeSSL: [id: 0x3a098404, /xxx => xxx] WRITE, DefaultFullHttpRequest(decodeResult: success)
03-29 17:10:01.604 27227-27604/com.x.androidtestapp D/nativeSSL: GET /notification/notificationChannel/websocket HTTP/1.1
03-29 17:10:01.604 27227-27604/com.x.androidtestapp D/nativeSSL: Upgrade: websocket
03-29 17:10:01.604 27227-27604/com.x.androidtestapp D/nativeSSL: Connection: Upgrade
03-29 17:10:01.604 27227-27604/com.x.androidtestapp D/nativeSSL: Sec-WebSocket-Key: K4zSElkfuBKi6ymQ1VVhuw==
03-29 17:10:01.604 27227-27604/com.x.androidtestapp D/nativeSSL: Host: xxx
03-29 17:10:01.604 27227-27604/com.x.androidtestapp D/nativeSSL: Sec-WebSocket-Origin: http://xxx
03-29 17:10:01.604 27227-27604/com.x.androidtestapp D/nativeSSL: Sec-WebSocket-Version: 13, 0B
03-29 17:10:01.604 27227-27604/com.x.androidtestapp D/nativeSSL: [id: 0x3a098404, /xxx => xxx/xxx] FLUSH
03-29 17:10:02.575 27227-27604/com.x.androidtestapp D/nativeSSL: [id: 0x3a098404, /xxx :> xxx/xxx] UNREGISTERED

1 个答案:

答案 0 :(得分:0)

握手的http部分有未处理的401。