Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

websocket plugin data is empty #4302

Closed
Layfolk-zcy opened this issue Jan 9, 2023 · 1 comment
Closed

websocket plugin data is empty #4302

Layfolk-zcy opened this issue Jan 9, 2023 · 1 comment
Labels
type: question Further information is requested

Comments

@Layfolk-zcy
Copy link

Layfolk-zcy commented Jan 9, 2023

Question

shenyu version-2.5.0

shenyu Admin and gateway data sync by nacos

when i run websocket example project that selector data is empty in proxy of pluginList.

In the picture, the data is inserted by myself
image
image
image

this is a result by postman.
image

this is config of websocket server
image

error infomation

2023-01-09 15:07:32 [parallel-5] INFO  org.apache.shenyu.plugin.base.AbstractShenyuPlugin - websocket selector success match , selector name :/ws-annotation
2023-01-09 15:07:32 [parallel-5] INFO  org.apache.shenyu.plugin.base.AbstractShenyuPlugin - websocket rule success match , rule name :/myWs
2023-01-09 15:07:32 [parallel-5] INFO  org.apache.shenyu.plugin.websocket.WebSocketPlugin - you websocket urlPath is :ws://172.1.11.35:8001/ws-annotation/myWs
2023-01-09 15:07:32 [reactor-http-nio-9] WARN  reactor.netty.http.client.HttpClientConnect - [8bf5dd8b-1, L:/172.1.11.35:19834 - R:/172.1.11.35:8001] The connection observed an error
io.netty.handler.codec.http.websocketx.WebSocketClientHandshakeException: Invalid handshake response getStatus: 404 
	at io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker13.verify(WebSocketClientHandshaker13.java:272)
	at io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker.finishHandshake(WebSocketClientHandshaker.java:309)
	at reactor.netty.http.client.WebsocketClientOperations.onInboundNext(WebsocketClientOperations.java:116)
	at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:93)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:299)
	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)
2023-01-09 15:07:32 [reactor-http-nio-9] WARN  reactor.netty.channel.FluxReceive - [8bf5dd8b-1, L:/172.1.11.35:19834 ! R:/172.1.11.35:8001] An exception has been observed post termination, use DEBUG level to see the full stack: io.netty.handler.codec.http.websocketx.WebSocketClientHandshakeException: Connection prematurely closed BEFORE opening handshake is complete.
@Layfolk-zcy Layfolk-zcy added the type: question Further information is requested label Jan 9, 2023
@iwangjie
Copy link
Contributor

iwangjie commented Feb 5, 2023

Check that the IP and port mappings are correct, and try using the TELNET command to test the WS operation.

If you can not solve your problem, please try to refer to the following article, may be helpful to you

@yu199195 yu199195 closed this as completed May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants