Bug #17727
closed
"Failed to connect to server" - VNC Console not working with VMware 6.5
Added by Peter Pakos almost 8 years ago.
Updated almost 7 years ago.
Category:
Compute resources - VMware
|
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
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
c
rfb-597fd9e….js:11
t rfb-597fd9e….js:11
RFB
rfb-597fd9e….js:11
(anonymous) noVNC-0992001….js:1
(anonymous)
application-7451e25….js:14
dispatch bundle-d65c367….js:25
m.handle
bundle-d65c367….js:24
trigger bundle-d65c367….js:25
(anonymous)
bundle-d65c367….js:25
each bundle-d65c367….js:14
each
bundle-d65c367….js:14
trigger bundle-d65c367….js:25
onLoad
application-7451e25….js:14
u bundle-d65c367….js:24
fireWith
bundle-d65c367….js:24
ready bundle-d65c367….js:24
f
bundle-d65c367….js:14
util-eb14147….js:8 New state 'connect', was 'loaded'.
Util.Warn util-eb14147….js:8
c
rfb-597fd9e….js:11
RFB.x.connect rfb-597fd9e….js:11
(anonymous)
noVNC-0992001….js:1
(anonymous) application-7451e25….js:14
dispatch
bundle-d65c367….js:25
m.handle bundle-d65c367….js:24
trigger
bundle-d65c367….js:25
(anonymous) bundle-d65c367….js:25
each
bundle-d65c367….js:14
each bundle-d65c367….js:14
trigger
bundle-d65c367….js:25
onLoad application-7451e25….js:14
u
bundle-d65c367….js:24
fireWith bundle-d65c367….js:24
ready
bundle-d65c367….js:24
f bundle-d65c367….js:14
util-eb14147….js:8 New state 'ProtocolVersion', was 'connect'. Msg: Starting VNC handshake
Util.Warn
util-eb14147….js:8
c rfb-597fd9e….js:11
(anonymous)
rfb-597fd9e….js:11
y.onopen websock-d558544….js:16
util-eb14147….js:8 New state 'failed', was 'ProtocolVersion'. Msg: Failed to connect to server
Util.Error
util-eb14147….js:8
c rfb-597fd9e….js:11
a
rfb-597fd9e….js:11
(anonymous) rfb-597fd9e….js:11
y.onclose
websock-d558544….js:16
util-eb14147….js:8 New state 'failed', was 'failed'.
Util.Warn util-eb14147….js:8
c
rfb-597fd9e….js:11
(anonymous) @ rfb-597fd9e….js:11
thanks, do you have any error in your foreman production logs? might to enable debug logging for more info.
- Category set to Compute resources - VMware
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?
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.
Can confirm on Foreman 1.14.1 and esx 6.5.0.
Is this still an ongoing issue or has it been fixed?
Thanks
- Status changed from New to Resolved
thanks, marking as resolved in that case
Also available in: Atom
PDF