https://bz.apache.org/bugzilla/show_bug.cgi?id=65432

            Bug ID: 65432
           Summary: Websocket is closed
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy_wstunnel
          Assignee: bugs@httpd.apache.org
          Reporter: nizar.ben.mans...@gmail.com
  Target Milestone: ---

Hello,

I'm stack since 4 days in an issue with Apache2 websocket. I have deployed a
sockjs websocket on Apache Tomcat 10 that connects to a Spring boot application
. Here is the code of sockJs deployed on Tomcat.

   var urlToCall='http://192.168.50.130:8082/MyWebsocket';
            console.log('calling '+urlToCall);
           websocket = new SockJS(urlToCall);
The sockjs application is hosted under dc folder so when i access
http://192.168.50.130:8080/dc/ .Connection with websocket is well established.

Now i configured Apache2 to forward all requested to the tomcat one:

Here is the configuration of Apache2 (000-default.conf)

<VirtualHost *:80> 
  ProxyPreserveHost On 

ProxyRequests Off
   ProxyPass /  http://192.168.50.130:8080/dc/ nocanon
     ProxyPassReverse /   http://192.168.50.130:8080/dc/

ProxyPass "/ws/"  "ws://192.168.50.130:8082/"
ProxyPass "/wss/"  "wss://192.168.50.130:8082/"

</VirtualHost>
Unfortunately it said always "cannot connect to the server".
Here is the full log of apache2 server

[Sun Jul 04 11:49:33.851557 2021] [authz_core:debug] [pid 39624:tid
139862925604608] mod_authz_core.c(845): [client 192.168.50.1:59050] AH01628:
authorization result: granted (no directives)
[Sun Jul 04 11:49:33.851650 2021] [proxy:debug] [pid 39624:tid 139862925604608]
mod_proxy.c(1253): [client 192.168.50.1:59050] AH01143: Running scheme http
handler (attempt 0)
[Sun Jul 04 11:49:33.851659 2021] [proxy_ajp:debug] [pid 39624:tid
139862925604608] mod_proxy_ajp.c(743): [client 192.168.50.1:59050] AH00894:
declining URL http://192.168.50.130:8080/dc/
[Sun Jul 04 11:49:33.851665 2021] [proxy:debug] [pid 39624:tid 139862925604608]
proxy_util.c(2325): AH00942: HTTP: has acquired connection for (192.168.50.130)
[Sun Jul 04 11:49:33.851670 2021] [proxy:debug] [pid 39624:tid 139862925604608]
proxy_util.c(2379): [client 192.168.50.1:59050] AH00944: connecting
http://192.168.50.130:8080/dc/ to 192.168.50.130:8080
[Sun Jul 04 11:49:33.851675 2021] [proxy:debug] [pid 39624:tid 139862925604608]
proxy_util.c(2588): [client 192.168.50.1:59050] AH00947: connected /dc/ to
192.168.50.130:8080
[Sun Jul 04 11:49:33.851715 2021] [proxy:debug] [pid 39624:tid 139862925604608]
proxy_util.c(2889): AH00951: HTTP: backend socket is disconnected.
[Sun Jul 04 11:49:33.851820 2021] [proxy:debug] [pid 39624:tid 139862925604608]
proxy_util.c(3054): AH02824: HTTP: connection established with
192.168.50.130:8080 (192.168.50.130)
[Sun Jul 04 11:49:33.851831 2021] [proxy:debug] [pid 39624:tid 139862925604608]
proxy_util.c(3240): AH00962: HTTP: connection complete to 192.168.50.130:8080
(192.168.50.130)
[Sun Jul 04 11:49:33.853253 2021] [proxy:debug] [pid 39624:tid 139862925604608]
proxy_util.c(2340): AH00943: http: has released connection for (192.168.50.130)
[Sun Jul 04 11:49:33.853450 2021] [deflate:debug] [pid 39624:tid
139862925604608] mod_deflate.c(854): [client 192.168.50.1:59050] AH01384: Zlib:
Compressed 747 to 323 : URL /
[Sun Jul 04 11:49:34.041340 2021] [authz_core:debug] [pid 39624:tid
139863076226816] mod_authz_core.c(845): [client 192.168.50.1:59050] AH01628:
authorization result: granted (no directives)
[Sun Jul 04 11:49:34.041987 2021] [proxy:debug] [pid 39624:tid 139863076226816]
mod_proxy.c(1253): [client 192.168.50.1:59050] AH01143: Running scheme http
handler (attempt 0)
[Sun Jul 04 11:49:34.042029 2021] [proxy_ajp:debug] [pid 39624:tid
139863076226816] mod_proxy_ajp.c(743): [client 192.168.50.1:59050] AH00894:
declining URL http://192.168.50.130:8080/dc/jsterm/js/sockjs.js.map
[Sun Jul 04 11:49:34.042039 2021] [proxy:debug] [pid 39624:tid 139863076226816]
proxy_util.c(2325): AH00942: HTTP: has acquired connection for (192.168.50.130)
[Sun Jul 04 11:49:34.042046 2021] [proxy:debug] [pid 39624:tid 139863076226816]
proxy_util.c(2379): [client 192.168.50.1:59050] AH00944: connecting
http://192.168.50.130:8080/dc/jsterm/js/sockjs.js.map to 192.168.50.130:8080
[Sun Jul 04 11:49:34.042053 2021] [proxy:debug] [pid 39624:tid 139863076226816]
proxy_util.c(2588): [client 192.168.50.1:59050] AH00947: connected
/dc/jsterm/js/sockjs.js.map to 192.168.50.130:8080
[Sun Jul 04 11:49:34.053306 2021] [proxy:debug] [pid 39624:tid 139863076226816]
proxy_util.c(2340): AH00943: http: has released connection for (192.168.50.130)
[Sun Jul 04 11:49:34.054368 2021] [deflate:debug] [pid 39624:tid
139863076226816] mod_deflate.c(854): [client 192.168.50.1:59050] AH01384: Zlib:
Compressed 214061 to 46910 : URL /jsterm/js/sockjs.js.map

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscr...@httpd.apache.org
For additional commands, e-mail: bugs-h...@httpd.apache.org

Reply via email to