Bug 1180572
Summary: | [httpd] mod_proxy_wstunnel not loaded automatically | ||
---|---|---|---|
Product: | [Retired] JBoss Web Server 3 | Reporter: | Michal Haško <mhasko> |
Component: | unspecified | Assignee: | Weinan Li <weli> |
Status: | CLOSED EOL | QA Contact: | Pavel Slavicek <pslavice> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.0.0 | CC: | lfuka, pslavice |
Target Milestone: | DR01 | ||
Target Release: | 3.0.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-03-27 18:35:40 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: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1178630 |
Description
Michal Haško
2015-01-09 13:39:15 UTC
fix: [weli@dhcp-66-78-87 httpd24-jws3-el7]$ git diff diff --git a/00-proxy.conf b/00-proxy.conf index a446822..6ce89a4 100644 --- a/00-proxy.conf +++ b/00-proxy.conf @@ -13,3 +13,5 @@ LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so LoadModule proxy_ftp_module modules/mod_proxy_ftp.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_scgi_module modules/mod_proxy_scgi.so + +LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so verification: [weli@dhcp-66-78-87 sbin]$ ./apachectl -M | grep wstunnel proxy_wstunnel_module (shared) more verification: 1. write a nodejs websocket service: # ws.js var ws = require("nodejs-websocket") var server = ws.createServer(function (conn) { console.log("New connection") conn.on("text", function (str) { console.log("Received " + str) conn.sendText(str.toUpperCase() + "!!!") }) conn.on("close", function (code, reason) { console.log("Connection closed") }) }).listen(8088) 2. write a ruby test client: # ws-client.rb require 'faye/websocket' require 'eventmachine' EM.run { ws = Faye::WebSocket::Client.new('http://127.0.0.1/ws/') ws.on :open do |event| p [:open] ws.send('Hello, Martian!') end ws.on :message do |event| p [:message, event.data] end ws.on :close do |event| p [:close, event.code, event.reason] ws = nil end } 3. setup httpd proxy properly: LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so ... ProxyPass /ws/ ws://127.0.0.1:8088/ ProxyPassReverse /ws/ ws://127.0.0.1:8088/ ... LogLevel debug 4. start nodejs service: [weli@dhcp-66-78-87 work]$ node ws.js 5. start httpd [weli@dhcp-66-78-87 sbin]$ sudo ./apachectl restart 6. run ws-client.rb [weli@dhcp-66-78-87 work]$ ruby ws-client.rb [:open] [:message, "HELLO, MARTIAN!!!!"] nodejs server side: [weli@dhcp-66-78-87 work]$ node ws.js New connection Received Hello, Martian! httpd log: [Mon Jan 12 22:50:57.097895 2015] [proxy_wstunnel:debug] [pid 23014] mod_proxy_wstunnel.c(331): [client 127.0.0.1:46872] AH02451: serving URL ws://127.0.0.1:8088/ [Mon Jan 12 22:50:57.097902 2015] [proxy:debug] [pid 23014] proxy_util.c(2020): AH00942: WS: has acquired connection for (127.0.0.1) [Mon Jan 12 22:50:57.097933 2015] [proxy:debug] [pid 23014] proxy_util.c(2072): [client 127.0.0.1:46872] AH00944: connecting ws://127.0.0.1:8088/ to 127.0.0.1:8088 [Mon Jan 12 22:50:57.098021 2015] [proxy:debug] [pid 23014] proxy_util.c(2194): [client 127.0.0.1:46872] AH00947: connected / to 127.0.0.1:8088 [Mon Jan 12 22:50:57.098225 2015] [proxy:debug] [pid 23014] proxy_util.c(2598): AH00962: WS: connection complete to 127.0.0.1:8088 (127.0.0.1) Verified with DR1 build. |