syndesisio / syndesis-rest

The API for Syndesis - a flexible, customizable, cloud-hosted platform that provides core integration capabilities as a service. It leverages Red Hat's existing product architecture using OpenShift Online/Dedicated and Fuse Integration Services.
https://syndesis-staging.b6ff.rh-idev.openshiftapps.com/api/v1/
Apache License 2.0
6 stars 17 forks source link

WebSocket Upgrade Issue #723

Closed rhuss closed 6 years ago

rhuss commented 7 years ago
2017-10-18 10:06:09.646 ERROR [-,,,] 1 --- [   XNIO-3 I/O-2] io.undertow.request                      : UT005071: Undertow request failed HttpServerExchange{ GET /api/v1/event/streams.ws/b222047e-50a0-4ef2-958a-a37e78cc135f request {Cache-Control=[no-cache], Sec-Websocket-Version=[13], Accept-Encoding=[gzip, deflate, br], Sec-Websocket-Key=[wOzUffTq5EDAvJWbRlOUtg==], Dnt=[1], Origin=[https://app-proj7558.6a63.fuse-ignite.openshiftapps.com], Pragma=[no-cache], X-Forwarded-Port=[443], X-Forwarded-For=[91.51.113.82, 10.131.0.1], Cookie=[_oauth_proxy=cmh1c3MxQHJlZGhhdC5jb218cENPR1BjUkRMaGlGdUk3L1RiZjdzR0ZSY1Nsd1M3VUswNUdmMzhVczdOT1Z5bExPaVhUOGw2M2lDMVZmN2dMWElYL1dOTWN1N0JNZm04Zz18LTYyMTM1NTk2ODAwfA==|1508320216|EBw7KXr2mbFgN7yKKLsF9OlUt40=], Host=[app-proj7558.6a63.fuse-ignite.openshiftapps.com], X-Forwarded-Host=[app-proj7558.6a63.fuse-ignite.openshiftapps.com], Accept-Language=[en-US,en;q=0.8,de;q=0.6], X-Forwarded-Email=[rhuss1@redhat.com], User-Agent=[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36], Sec-Websocket-Extensions=[permessage-deflate; client_max_window_bits], Forwarded=[for=91.51.113.82;host=app-proj7558.6a63.fuse-ignite.openshiftapps.com;proto=https], X-Forwarded-User=[rhuss1], X-Forwarded-Access-Token=[BVVSOH0SiyvaCl12VpOgWtW_wcVRIQxP5MNMXhbdJtI], Authorization=[Basic cmh1c3MxOg==], X-Forwarded-Proto=[https]} response {Access-Control-Allow-Origin=[https://app-proj7558.6a63.fuse-ignite.openshiftapps.com]}}

java.lang.IllegalStateException: UT000133: Request did not contain an Upgrade header, upgrade is not permitted
    at io.undertow.server.HttpServerExchange.upgradeChannel(HttpServerExchange.java:876) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
    at io.undertow.websockets.WebSocketProtocolHandshakeHandler.handleRequest(WebSocketProtocolHandshakeHandler.java:193) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
    at io.syndesis.runtime.EventBusToWebSocket$1.handleRequest(EventBusToWebSocket.java:67) ~[classes!/:0.1-SNAPSHOT]
    at io.undertow.server.handlers.PathHandler.handleRequest(PathHandler.java:94) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
    at io.undertow.server.handlers.PathHandler.handleRequest(PathHandler.java:94) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
    at io.undertow.server.handlers.HttpContinueReadHandler.handleRequest(HttpContinueReadHandler.java:65) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
    at io.undertow.server.handlers.ProxyPeerAddressHandler.handleRequest(ProxyPeerAddressHandler.java:112) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
    at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:254) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
    at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
    at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:59) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.3.8.Final.jar!/:3.3.8.Final]
    at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) [xnio-api-3.3.8.Final.jar!/:3.3.8.Final]
    at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88) [xnio-nio-3.3.8.Final.jar!/:3.3.8.Final]
    at org.xnio.nio.WorkerThread.run(WorkerThread.java:561) [xnio-nio-3.3.8.Final.jar!/:3.3.8.Final]

Guess its due to the OAuth switch.

chirino commented 7 years ago

https://github.com/syndesisio/syndesis-ui/pull/1112 switches us back to using server sent events. It does not have as good Browser coverage but show work better for now.

chirino commented 7 years ago

https://github.com/syndesisio/syndesis-openshift-templates/pull/136 will be needed too so that the long polls last longer than 5ms.

rhuss commented 7 years ago

Seems to be fixed ? Is the current solution also the final solution ?

jimmidyson commented 7 years ago

Seems to be working OK, i'm still going to look at adding in websocket support to oauth proxy though.

chirino commented 7 years ago

I think we still need websocket support since that will give us more browser coverage.

rhuss commented 7 years ago

Removin TP2 label as we have a workaround for TP2, but keep the issue open for 'real' websocket support.

@chirino btw, the only browser not supporting SSE is Internet Explorer / Edge. But there is a nice shim for SSE support even for those platforms, so might makes sense to explore that as a more robust solution.