H5W3
当前位置:H5W3 > 其他技术问题 > 正文

websocket failed:Error during WebSocket handshake:net::ERR_CONNECTION_RESET

问:

websocket开放遇到了下面的错误,如何解决?

failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET

Provisional headers are shown
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cache-Control: no-cache
Connection: Upgrade
Host: 120.78.204.188:2346
Origin: http://wk.huapiaoliang.com/
Pragma: no-cache
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
Sec-WebSocket-Key: zEyD7PWouZx/OLPbheek/A==
Sec-WebSocket-Version: 13
Upgrade: websocket
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36

 

答:

1 先确认是否服务端的问题:直接浏览器访问你的服务看是否正常
2 再确认WebSocket的异常,可以抓访问 http 包看和1的区别,找线索。

 

本文地址:H5W3 » websocket failed:Error during WebSocket handshake:net::ERR_CONNECTION_RESET

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址