Symptoms

OACI VE console does not open for any virtual environment on a Virtuozzo 7.0.7 (or higher) node.

Session Closed. Please click on Reset Console

Browser console shows the error (Mozilla Firefox example):

Firefox can’t establish a connection to the server at wss://cp.example.com/oaciws/23/5701

VNC console works fine if tested by a VNC client with direct connection to the VZ node.

/var/log/httpd/oaci_error_log on the VZ node contains the messages:

[Mon Apr 16 11:56:00.481995 2018] [proxy:debug] [pid 1021216] proxy_util.c(2203): AH00942: WS: has acquired connection for (*)
[Mon Apr 16 11:56:00.482012 2018] [proxy:debug] [pid 1021216] proxy_util.c(2256): [client 192.0.2.3:47402] AH00944: connecting ws://192.0.2.2:5701/websockify to 192.0.2.2:5701
[Mon Apr 16 11:56:00.482098 2018] [proxy:debug] [pid 1021216] proxy_util.c(2422): [client 192.0.2.3:47402] AH00947: connected /websockify to 192.0.2.2:5701
[Mon Apr 16 11:56:00.482188 2018] [proxy:debug] [pid 1021216] proxy_util.c(2798): AH02824: WS: connection established with 192.0.2.2:5701 (*)
[Mon Apr 16 11:56:00.482209 2018] [proxy:debug] [pid 1021216] proxy_util.c(2938): AH00962: WS: connection complete to 192.0.2.2:5701 (192.0.2.2)
[Mon Apr 16 11:56:00.483454 2018] [proxy_wstunnel:debug] [pid 1021216] mod_proxy_wstunnel.c(257): [client 192.0.2.3:47402] AH02445: woke from poll(), i=1
[Mon Apr 16 11:56:00.483476 2018] [proxy_wstunnel:debug] [pid 1021216] mod_proxy_wstunnel.c(266): [client 192.0.2.3:47402] AH02446: sock was readable
[Mon Apr 16 11:56:00.483494 2018] [proxy_wstunnel:debug] [pid 1021216] mod_proxy_wstunnel.c(257): [client 192.0.2.3:47402] AH02445: woke from poll(), i=1
[Mon Apr 16 11:56:00.483502 2018] [proxy_wstunnel:debug] [pid 1021216] mod_proxy_wstunnel.c(266): [client 192.0.2.3:47402] AH02446: sock was readable
[Mon Apr 16 11:56:00.483510 2018] [proxy:debug] [pid 1021216] proxy_util.c(2218): AH00943: WS: has released connection for (*)

Cause

VE console transmitted over websockets does not work on Virtuozzo versions, starting from 7.0.7. The behavior is planned to be fixed in scope of internal request CCU-17812.

Resolution

Use the following workaround to fix VE console:

  • open /var/www/oaci/html/.htaccess for editing
  • remove the trailing word websockify from all lines, i.e. change:

    RewriteRule ^websocket/([^/]+) "ws://192.0.2.2:$1/websockify" [P]
    

    to:

    RewriteRule ^websocket/([^/]+) "ws://192.0.2.2:$1/" [P]
    
  • save the file

Internal content