Bug #17727
closed"Failed to connect to server" - VNC Console not working with VMware 6.5
Description
I have Foreman 1.13.2 running on CentOS 7.3 which I normally access via Google Chrome 55 on OSX 10.12.2.
Everything seems to be OK apart from the VNC Console functionality to VMware ESXi 6.5 host. When trying to connect I get "Failed to connect to server" error.
It worked fine with ESXi 6.0u2. I'm not sure what changed but it no longer works with the newest version of ESXi.
I have Foreman's CA cert added to Keychain.
VNC rule is enabled in ESXi's firewall:
[root@esxi01:~] cat /etc/vmware/firewall/vnc.xml <ConfigRoot> <service id='0032'> <id>VNC</id> <rule id = '0000'> <direction>inbound</direction> <protocol>tcp</protocol> <porttype>dst</porttype> <port> <begin>5901</begin> <end>5964</end> </port> </rule> <enabled>true</enabled> </service> </ConfigRoot> [root@esxi01:~] esxcli network firewall ruleset list | grep VNC VNC true
Updated by Peter Pakos about 8 years ago
Not sure if it helps, but here's the log from the Developer Console in Chrome:
util-eb14147….js:8 New state 'loaded', was 'disconnected'. Msg: noVNC ready: native WebSockets, canvas rendering
Util.Warn util-eb14147….js:8
rfb-597fd9e….js:11
c
t rfb-597fd9e….js:11
rfb-597fd9e….js:11
RFB
(anonymous) noVNC-0992001….js:1
application-7451e25….js:14
(anonymous)
dispatch bundle-d65c367….js:25
bundle-d65c367….js:24
m.handle
trigger bundle-d65c367….js:25
bundle-d65c367….js:25
(anonymous)
each bundle-d65c367….js:14
bundle-d65c367….js:14
each
trigger bundle-d65c367….js:25
application-7451e25….js:14
onLoad
u bundle-d65c367….js:24
bundle-d65c367….js:24
fireWith
ready bundle-d65c367….js:24
bundle-d65c367….js:14
f
util-eb14147….js:8 New state 'connect', was 'loaded'.
Util.Warn util-eb14147….js:8
rfb-597fd9e….js:11
c
RFB.x.connect rfb-597fd9e….js:11
noVNC-0992001….js:1
(anonymous)
(anonymous) application-7451e25….js:14
bundle-d65c367….js:25
dispatch
m.handle bundle-d65c367….js:24
bundle-d65c367….js:25
trigger
(anonymous) bundle-d65c367….js:25
bundle-d65c367….js:14
each
each bundle-d65c367….js:14
bundle-d65c367….js:25
trigger
onLoad application-7451e25….js:14
bundle-d65c367….js:24
u
fireWith bundle-d65c367….js:24
bundle-d65c367….js:24
ready
f bundle-d65c367….js:14
util-eb14147….js:8
util-eb14147….js:8 New state 'ProtocolVersion', was 'connect'. Msg: Starting VNC handshake
Util.Warn
c rfb-597fd9e….js:11
rfb-597fd9e….js:11
(anonymous)
y.onopen websock-d558544….js:16
util-eb14147….js:8
util-eb14147….js:8 New state 'failed', was 'ProtocolVersion'. Msg: Failed to connect to server
Util.Error
c rfb-597fd9e….js:11
rfb-597fd9e….js:11
a
(anonymous) rfb-597fd9e….js:11
websock-d558544….js:16
y.onclose
util-eb14147….js:8 New state 'failed', was 'failed'.
Util.Warn util-eb14147….js:8
rfb-597fd9e….js:11
c
(anonymous) @ rfb-597fd9e….js:11
Updated by Ohad Levy about 8 years ago
thanks, do you have any error in your foreman production logs? might to enable debug logging for more info.
Updated by Dominic Cleal about 8 years ago
- Category set to Compute resources - VMware
Updated by Peter Pakos about 8 years ago
I can't see any errors in the production.log.
Here's the snippet from the log straight after pressing the Console button:
2016-12-19 10:56:05 1836eae3 [app] [I] Started GET "/hosts/test01.vm.barn.pakos.uk/console" for 10.69.5.201 at 2016-12-19 10:56:05 +0000 2016-12-19 10:56:05 1836eae3 [app] [I] Processing by HostsController#console as HTML 2016-12-19 10:56:05 1836eae3 [app] [I] Parameters: {"id"=>"test01.vm.barn.pakos.uk"} 2016-12-19 10:56:06 1836eae3 [app] [I] Rendered hosts/console/vnc.html.erb within layouts/application (9.4ms) 2016-12-19 10:56:06 1836eae3 [app] [I] Rendered layouts/_application_content.html.erb (1.1ms) 2016-12-19 10:56:06 1836eae3 [app] [I] Rendered home/_user_dropdown.html.erb (21.0ms) 2016-12-19 10:56:06 1836eae3 [app] [I] Read fragment views/tabs_and_title_records-4 (0.2ms) 2016-12-19 10:56:06 1836eae3 [app] [I] Rendered home/_topbar.html.erb (29.8ms) 2016-12-19 10:56:06 1836eae3 [app] [I] Rendered layouts/base.html.erb (34.0ms) 2016-12-19 10:56:06 1836eae3 [app] [I] Completed 200 OK in 869ms (Views: 50.4ms | ActiveRecord: 4.0ms) 2016-12-19 10:56:06 1836eae3 [app] [I] Started GET "/hosts/test01.vm.barn.pakos.uk/console" for 10.69.5.201 at 2016-12-19 10:56:06 +0000 2016-12-19 10:56:06 1836eae3 [app] [I] Processing by HostsController#console as HTML 2016-12-19 10:56:06 1836eae3 [app] [I] Parameters: {"id"=>"test01.vm.barn.pakos.uk"} 2016-12-19 10:56:07 1836eae3 [app] [I] Rendered hosts/console/vnc.html.erb within layouts/application (5.3ms) 2016-12-19 10:56:07 1836eae3 [app] [I] Rendered layouts/_application_content.html.erb (0.9ms) 2016-12-19 10:56:07 1836eae3 [app] [I] Rendered home/_user_dropdown.html.erb (2.6ms) 2016-12-19 10:56:07 1836eae3 [app] [I] Read fragment views/tabs_and_title_records-4 (0.2ms) 2016-12-19 10:56:07 1836eae3 [app] [I] Rendered home/_topbar.html.erb (7.7ms) 2016-12-19 10:56:07 1836eae3 [app] [I] Rendered layouts/base.html.erb (11.2ms) 2016-12-19 10:56:07 1836eae3 [app] [I] Completed 200 OK in 500ms (Views: 20.3ms | ActiveRecord: 1.7ms)
Do you still want me to enable debug logging?
Updated by Gael Queri over 7 years ago
Hello
I can confirm we have the same issue with our new ESXi 6.5 environments.
Actually Foreman manages to set the vnc settings to the VMs:
RemoteDisplay.vnc.port: 59xx
RemoteDisplay.vnc.enabled: true
RemoteDisplay.vnc.password: xxxxx
But then we realise that the setting is not taken into account, but it works if we reboot the VM.
After a reboot we are able to setup a VNC connection to the previous opened port
So I don't know if vmware has some kind of signal to 'reload' the console settings that we could use, or if updating these settings live is not done anymore by vmware.
Updated by Ger Apeldoorn over 7 years ago
Can confirm on Foreman 1.14.1 and esx 6.5.0.
Updated by Timo Goebel over 7 years ago
I guess, the correct "fix" for this would be do ditch the VNC console altogether. VMWare has a webmks framework to get similar functionality as in their vSphere client. ManageIQ has already adapter this. [1]
I'll try to come up with a implementation for Foreman.
[1] https://github.com/ManageIQ/manageiq-ui-classic/commit/84e2c75ca564c1db9c52f4393e4503796ad145c9
Updated by Timo Goebel over 7 years ago
- Related to Feature #20649: Support VMWare WebMKS Console added
Updated by Timo Goebel over 7 years ago
According to this [1] ManageIQ issue, VNC is unsupported as of vSphere 6.5. We should add a warning message to let users know.
Updated by metal cated almost 7 years ago
Is this still an ongoing issue or has it been fixed?
Thanks
Updated by Gael Queri almost 7 years ago
- Related to Feature #22062: Support VMWare VMRC Console added
Updated by Gael Queri almost 7 years ago
I can see that Foreman 1.17 will have support for VMRC console as written in http://projects.theforeman.org/issues/22062 so it should solve the issue
Updated by Marek Hulán almost 7 years ago
- Status changed from New to Resolved
thanks, marking as resolved in that case