简体   繁体   English

尝试创建SSL客户端套接字时,CLOSE_WAIT和FIN_WAIT_2

[英]CLOSE_WAIT and FIN_WAIT_2 when I try to create a SSL client socket

The server port was listening correctly before I invoked this line: 在调用此行之前,服务器端口正在正确侦听:

SSLSocket socket = (SSLSocket) ssFactory.createSocket(ipAddress, port);

Then it became like this: 然后变成这样:

  1. TCP 0.0.0.0:23333 0.0.0.0:0 LISTENING TCP 0.0.0.0:23333 0.0.0.0:0侦听
  2. TCP 10.200.49.196:23333 10.200.49.196:50814 FIN_WAIT_2 TCP 10.200.49.196:23333 10.200.49.196:50814 FIN_WAIT_2
  3. TCP 10.200.49.196:50814 10.200.49.196:23333 CLOSE_WAIT TCP 10.200.49.196:50814 10.200.49.196:23333 CLOSE_WAIT

I never wanted to close the port. 我从不想关闭港口。 Why did it hang like that? 为什么会这样挂? The code worked fine before. 该代码之前工作正常。

I can not ask as comment. 我不能要求发表评论。 :( :(

Did the certificate change and the SSL hand shake failed? 证书更改和SSL握手失败了吗? This may result in a closed SSL connection. 这可能会导致SSL连接关闭。

The netstat output shows: netstat输出显示:

  • a running server socket 正在运行的服务器套接字
  • a client to server entry of a closed connection 客户端到服务器的关闭连接条目
  • and a server to client entry of a closed connection 和服务器到客户端的封闭连接条目

Is there any exception thrown? 是否有引发任何异常?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM