Azure / DotNetty

DotNetty project – a port of netty, event-driven asynchronous network application framework
Other
4.06k stars 971 forks source link

一个异常问题 #421

Open 18469645 opened 6 years ago

18469645 commented 6 years ago

先描述下我的环境 1、一个支持websocket的服务,该websocket服务支持SSL证书访问,已布在阿里服务器上,并搞了个免费的证书SSL。 2、对外的访问(包括webapi和websocket)统一经过网关路由,网关路由用的是ocelot中间件。比如域名www.abc.com绑了ip和443端口 3、Websocket服务监听的是8084,用户通过访问www.abc.com路由到8084。进行websocket连接。 现在的问题是:路由配置看起来是正常,能正常路由到websocket服务,但是每次连接时总是报这个错:WebSocketServerHandler 引发类型为“DotNetty.Codecs.DecoderException”的异常。然后就自动断开, 如果把websocket访问地址加上端口号,如wss://www.abc.com:8084/websocket,则一切正常。 能帮我分析下,这可能是什么问题吗?该怎么解决这个问题

scc172fly commented 6 years ago

请用英文描述你的问题!哈哈,中文微软的人看不懂!

yejinmo commented 6 years ago

First describe my environment

  1. A service that supports WebSocket. The WebSocket service supports SSL certificate access and is deployed on the server.
  2. External access (including WebAPI and WebSocket) is uniformly routed through the gateway, and gateway routing uses ocelot middleware. For example, the domain name www.abc.com is tied to the ip and 443 ports.
  3. The WebSocket service listens to the 8084, and the user routes to the 8084 by visiting www.abc.com. Make a WebSocket connection. The problem now is that the routing configuration looks normal and can be routed to the WebSocket service normally, but this error is always reported every time the connection is made: WebSocket ServerHandler throws an exception of type "DotNetty.Codecs.DecoderException". Then it is automatically disconnected, If you add the WebSocket access address to the port number, such as wss://www.abc.com:8084/ WebSocket , everything works fine. Can you help me analyze this, what could be the problem? How to solve this problem
yejinmo commented 6 years ago

楼主应该使用英文提问 最不济也应该用下 Google 翻译

18469645 commented 6 years ago

对,就是这个意思,我英文太差,写不出来,谢谢楼上的朋友!