Project

General

Profile

Actions

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.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Compute resources - VMware
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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

Related issues 2 (1 open1 closed)

Related to Foreman - Feature #20649: Support VMWare WebMKS ConsoleNew08/18/2017Actions
Related to Foreman - Feature #22062: Support VMWare VMRC ConsoleClosed12/22/2017Actions
Actions #1

Updated by Peter Pakos almost 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
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

Actions #2

Updated by Ohad Levy almost 8 years ago

thanks, do you have any error in your foreman production logs? might to enable debug logging for more info.

Actions #3

Updated by Dominic Cleal almost 8 years ago

  • Category set to Compute resources - VMware
Actions #4

Updated by Peter Pakos almost 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?

Actions #5

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.

Actions #6

Updated by Ger Apeldoorn over 7 years ago

Can confirm on Foreman 1.14.1 and esx 6.5.0.

Actions #7

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

Actions #8

Updated by Timo Goebel over 7 years ago

Actions #9

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.

https://github.com/ManageIQ/manageiq/issues/13798

Actions #10

Updated by metal cated almost 7 years ago

Is this still an ongoing issue or has it been fixed?

Thanks

Actions #11

Updated by Gael Queri almost 7 years ago

Actions #12

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

Actions #13

Updated by Marek Hulán almost 7 years ago

  • Status changed from New to Resolved

thanks, marking as resolved in that case

Actions

Also available in: Atom PDF