解决 openstack中虚拟机的novnc控制台连接出现错误:INFO nova.console.websocketproxy,code 400, message Client must support ‘binary’ or ‘base64’ protocol 。

INFO nova.console.websocketproxy,code 400, message Client must support ‘binary‘ or ‘base64‘ protocol_novnc

查看错误类似如下:

[root@controller ~(keystone_admin)]# tail -300f /var/log/nova/nova-novncproxy.log

2024-08-14 09:12:46.075 41782 INFO nova.console.websocketproxy [-] WebSocket server settings:
2024-08-14 09:12:46.075 41782 INFO nova.console.websocketproxy [-] - Listen on 0.0.0.0:6080
2024-08-14 09:12:46.075 41782 INFO nova.console.websocketproxy [-] - Flash security policy server
2024-08-14 09:12:46.076 41782 INFO nova.console.websocketproxy [-] - Web server (no directory listings). Web root: /usr/share/novnc
2024-08-14 09:12:46.076 41782 INFO nova.console.websocketproxy [-] - No SSL/TLS support (no cert file)
2024-08-14 09:12:46.076 41782 INFO nova.console.websocketproxy [-] - proxying from 0.0.0.0:6080 to None:None
2024-08-23 15:57:46.509 33996 INFO nova.console.websocketproxy [-] 192.168.100.4 - - [23/Aug/2024 15:57:46] code 400, message Client must support ‘binary’ or ‘base64’ protocol
2024-08-23 15:57:46.546 33997 INFO nova.console.websocketproxy [-] 192.168.100.4 - - [23/Aug/2024 15:57:46] code 404, message File not found
2024-08-23 15:59:35.567 34615 INFO nova.console.websocketproxy [-] 192.168.100.4 - - [23/Aug/2024 15:59:35] code 400, message Client must support ‘binary’ or ‘base64’ protocol


解决方法:

修改并重启服务之后,在浏览器记得 按 F12 ,或者 右击浏览器页面空白处,选择“检查”;

然后右击“刷新”图标,选择“清空缓存并硬性重新加载” 即可,再打开“控制台”即可正常连接。

INFO nova.console.websocketproxy,code 400, message Client must support ‘binary‘ or ‘base64‘ protocol_openstack_02