Closed vitaliy-kuzmich closed 4 years ago
just tried 4.1.0.CR1, it also does not works. What is the changes in frames between 4.1.0.Beta8 and 4.1.0.CR1 ? upd: I found that there is problem with proxy, I used HttpProxyHandler.
upd: wss does not working with proxies. But worked before.
@vitaliy-kuzmich can you give us a reproducer ?
https://github.com/vitaliy-kuzmich/reproducer5070 to fix: cut HttpProxyHandler handler from WSInitializer or change netty version to 4.1.0.Beta8 in pom.xml
@vitaliy-kuzmich what I'm expected to see when it works ?
@normanmaurer "CloseWebSocketFrame Cannot continue due to an unexpected error" it is mean then WS parsed well....
@vitaliy-kuzmich did you also try to test it by have the proxy (little-proxy) and your code run in two different JVMs ? As maybe the little-proxy is prepared to take the latest CR releases in terms of changes.
firstly I got this error at external proxy service... I found that same error occures with little-proxy also, so I used it to reproduce and exclude external services which is easier.
@normanmaurer no I did not test it on different JVMs.
@vitaliy-kuzmich ah ok... thanks!
@vitaliy-kuzmich just checked and I can not reproduce with latest code from 4.1 branch. Can you try with 4.1.0.Final-SNAPSHOT and check if you can not reproduce anymore as well ?
hmm something is still wrong. let me investigate
@vitaliy-kuzmich ok I know whats going on.... let me think about a way to fix it.
@vitaliy-kuzmich basically the HttpClientCodec of HttpProxyHandler is removed by mistake.
I am having this exact issue with 4.1.5 Final. Sorry Actually I am gettting RSV:4 io.netty.handler.codec.CorruptedFrameException: RSV != 0 and no extension negotiated, RSV:4 at io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.protocolViolation(WebSocket08FrameDecoder.java:412) at io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.decode(WebSocket08FrameDecoder.java:188) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
RSV 4 seems to be connected to another issue: https://github.com/netty/netty/issues/5837.
I can reproduce this issue (wss over proxy => CorruptedFrameException: RSV != 0 and no extension negotiated, RSV:1) with VertX 3.3.3 which uses netty 4.1.5.Final.
From the comments, it looks like @normanmaurer has resolved the issue - but it is still open. Will this be merged or should it already be fixed?
Thanks! :smile:
Will this be merged or should it already be fixed?
Obviously, the fix was included in a later version than 4.1.5.
I'm facing "io.netty.handler.codec.CorruptedFrameException: RSV != 0 and no extension negotiated, RSV:1" (vertx 3.4.1, wss over proxy), can I do anything or should I just wait for new version?
VertX 3.4.1 (which is the latest release of VertX) uses netty 4.1.8.Final (released Jan 2017).
It actually looks like the corresponding pull request https://github.com/netty/netty/pull/5329 was never merged.
Any chance to merge it and use in next release?
@normanmaurer any chance to merge your solution to this issue - was it commit https://github.com/netty/netty/commit/387bb09f9a97c4c2e6a3c461bed0666f5cd59277 ?
@philrykoff he is off on holiday now, if you take that commit, rebase it, and address the comments Trustin left in a new PR I think that would help a lot.
@philrykoff i use vertx 3.4.2 also has this problem ,do you have any idea to fix this?
I have never worked "in" netty, so I am a bit hesitant to rebase that PR myself. I am currently wrapping up a project and get back to this afterwards.
The default value is http so i set the type to socks5,hahaha,but I don’t know why netty doesn’t support https?
在 2017年10月13日,下午3:28,Phil Rykoff notifications@github.com<mailto:notifications@github.com> 写道:
hesitant
Hi - I have the same problem with vertx 3.5.1 / netty 4.1.19.Final / wss over proxy Are there any plans to fix this ? Best regards Thomas
@normanmaurer any particular reason why 387bb09f9a97c4c2e6a3c461bed0666f5cd59277 is not merged? Any plans to do it?
Hi, I am also facing same issue. Is there plan to merge fix in any of upcoming releases?
Also others who faced same issue, found way to get around? Can you please describe what you did? Thanks in advance.
Just for reference exception I saw:
at io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.protocolViolation(WebSocket08FrameDecoder.java:412)
at io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.decode(WebSocket08FrameDecoder.java:188)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1336)
at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1127)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1162)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1342)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:934)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
at java.lang.Thread.run(Thread.java:745)
@kedarw I found a workaround: https://github.com/TakahikoKawasaki/nv-websocket-client This is websocket client library supporting wss and proxy. I replaced vertx websocket client with this. Works in production :)
Thanks @wojtas626, appreciate your help. I will try nv-websocket-client.
Hi - I have the same problem with vertx 3.5.1 / netty 4.1.19.Final / wss over proxy Are there any plans to fix this ? Best regards Thomas
I am still experiencing this issue in Vert.x 3.7.0 / Netty 4.1.30.Final 😞.
The problem is that the WebSocketClientHandshaker put ws-decoder(ws-encoder) in the wrong place in the ChannelPipeline. The WebSocketClientHandshaker find the position where the ws-decoder(ws-encoder)was put in the ChannelPipeline by locating the first io.netty.handler.codec.http.HttpClientCodec. details :https://github.com/netty/netty/issues/5201#issue-152789771 workaround:rewrite HttpProxyHandler and HttpClientCodec which HttpProxyHandler referenced, change the package name. Make sure HttpClientCodec which HttpProxyHandler referenced in the channelpipeline is different from io.netty.handler.codec.http.HttpClientCodec。
Version: 4.1.38.Final
Change
pipeline.addLast(new WebSocketServerProtocolHandler(WEBSOCKET_PATH, true));
to
pipeline.addLast(new WebSocketServerProtocolHandler(WEBSOCKET_PATH, null, true, 65536, false, true, 10000L));
Resolved my problem.
Hello, I have this exception, at 4.1.0.CR6 but at 4.1.0.Beta8 works well. What I did wrong? Currently I am using custom Handshaker, with 13 version (WebSocketClientHandshaker13) .
I tried to set "allowExtensions" but then with
reproduce: try to connect to lightstreamer server. via wss