Open surajkumar opened 1 year ago
Describe the bug
Example: https://github.com/surajkumar/spring-ws-gateway-issue
I have a simple Spring API Gateway and within the application.yaml I have the following:
application.yaml
- id: websocket-bad uri: lb:ws://websocket predicates: - Path=/websocket-bad/**
The websocket is a simple application that has a web socket server that has been created in Vert.x, running on port 80.
websocket
When I hit the endpoint using Postman: ws://localhost:8080/websocket-bad the following error is display in the API Gateway's console:
ws://localhost:8080/websocket-bad
io.netty.handler.codec.http.websocketx.WebSocketClientHandshakeException: Invalid handshake response getStatus: 404
If I change the application.yaml and use this:
- id: websocket-good uri: ws://localhost:80 predicates: - Path=/websocket-good/**
This works!
There's a problem somewhere when there's a load balancer infront.
I have ensured that the issue is with a web socket in front of the load balancer and not a configuration issue.
Spring Cloud Version: 2022.0.4
Added sample code to reproduce this issue: https://github.com/surajkumar/spring-ws-gateway-issue
Describe the bug
Example: https://github.com/surajkumar/spring-ws-gateway-issue
I have a simple Spring API Gateway and within the
application.yaml
I have the following:The
websocket
is a simple application that has a web socket server that has been created in Vert.x, running on port 80.When I hit the endpoint using Postman:
ws://localhost:8080/websocket-bad
the following error is display in the API Gateway's console:If I change the application.yaml and use this:
This works!
There's a problem somewhere when there's a load balancer infront.
I have ensured that the issue is with a web socket in front of the load balancer and not a configuration issue.
Spring Cloud Version: 2022.0.4