| Summary: | Websocket mapping created by downloadable cartridge does not work | ||
|---|---|---|---|
| Product: | OpenShift Online | Reporter: | Michal Fojtik <mfojtik> |
| Component: | Containers | Assignee: | Mrunal Patel <mpatel> |
| Status: | CLOSED UPSTREAM | QA Contact: | libra bugs <libra-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 2.x | CC: | agoldste, rmillner, xtian |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-11-11 20:10:22 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Michal Fojtik
2013-11-06 14:46:23 UTC
I spend some time investigating this issue and I discovered that the websocket request never reach the cartridge HTTP server (puma in this case). The node-web-proxy does not proxy the websocket request properly. In this case the: ws://ruby01-mfojtik.dev.rhcloud.com:8000/haproxy-monitor-socket is proxyfied to the application and not to the cartridge. Since the application does not provide the websocket interface, the websocket connection is closed. /var/log/node-web-proxy/websockets.log: 209.132.186.34 ruby01-mfojtik.dev.rhcloud.com - - [06/Nov/2013:11:17:14 -0500] "GET /haproxy-monitor-socket HTTP/1.1" 1011 0 "-" "Websocket RFC-6455/13" (3ms) - 209.132.186.34 ruby01-mfojtik.dev.rhcloud.com - - [06/Nov/2013:11:17:14 -0500] "GET /haproxy-monitor-socket HTTP/1.1" 1000 0 "-" "Websocket RFC-6455/13" (146ms) - You can easely reproduce this by using the steps from Description. I think the node-web-proxy will need to be a bit more smarter about deciding to what endpoint it is going to pass the websocket request. Assigning back to Node. It looks like we currently only set up the node-web-proxy connection if the frontend path is / https://github.com/openshift/origin-server/blob/master/plugins/frontend/nodejs-websocket/lib/openshift/runtime/frontend/http/plugins/nodejs-websocket.rb#L49 The proxy code in the NodeJS websocket router doesn't know how to deal with multiple cartridges on different paths so the plugin class only passes that kind of URL down to the NodeJS routes file. It is a long standing issue to bring the NodeJS websocket router up to the same feature set as the Apache front-end. This bug should be converted into a Trello card and placed on the feature roadmap. |