-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
ISSUE TYPE
- Bug Report
- Improvement Request
COMPONENT NAME
API
CLOUDSTACK VERSION
4.15.1
CONFIGURATION
Running ACS 4.15.1 with VMware vCenter 7 and ESXi 7 hosts.
OS / ENVIRONMENT
SUMMARY
When launching web console of a VM Instance, the window times out with "Failed to connect to server".
Initial web page launches to https://<ACS_Management_FQDN>:8443/client/console?cmd=access&vm=a61db944-89f3-4a64-8f40-558fb3c99510
Web browser has html code pointing to "https://10-x-xx-xx.<my_domain>/resource/noVNC/vnc.html?autoconnect=true&port=8080&token=jBwbg4-xBNLmwSZ7Je_aZxq4XsQ5v0AzSOl5d5UMosoUakpLAebY5DviBWz-ogCZMpy1ML7jVm6wPXwliwLmBfZdRt77MKPagjXTTC5FON3zxgimC6Y0Vvef6OUden8yKoiU9SyFz7qV1EzT4ESZ4Eb0TR2u_K3GyfPt4xTduTc8soUIf9u8VOqO31Upi8RFI4YXYenAiKWEyS3bMlIZiMdnkJNByXcuu3aHPpfvt4PKb5G_pcPWnFeqA11W0gss4slXd16ZfQU3bsxGSwMVuaO_P95aM72cexCovb6xAnIibCBTeHpW9iPOz-SGpnKwCFQwM8w-kxbcXTfzZpjsKvpetf2QzCpT23cgbSNX8aLwytiHLL245AB7F3AenXoQ&guest=windows"
Cloud.log error reports below:
2021-08-31 13:00:57,702 INFO [cloud.consoleproxy.ConsoleProxyResourceHandler] (Thread-108:null) Get resource request for /resource/noVNC/vnc.html
2021-08-31 13:00:57,706 INFO [cloud.consoleproxy.ConsoleProxyResourceHandler] (Thread-108:null) Sent file /resource/noVNC/vnc.html with content type text/html
2021-08-31 13:00:58,362 INFO [cloud.consoleproxy.ConsoleProxyNoVNCHandler] (qtp631791375-46:null) Get websocket connection request from remote IP : 10.X.X.X
2021-08-31 13:00:58,366 INFO [cloud.consoleproxy.ConsoleProxyNoVncClient] (Thread-109:null) Connect to VNC over websocket URL: wss://:443/ticket/a0155dcb1eaa3383
2021-08-31 13:00:58,383 ERROR [consoleproxy.websocket.WebSocketReverseProxy] (WebSocketConnectReadThread-154:null) Error on connection to websocket: No subject alternative names matching IP address found
2021-08-31 13:00:58,386 INFO [consoleproxy.websocket.WebSocketReverseProxy] (WebSocketWriteThread-155:null) Closing connection to websocket: reason= code=-1 remote=true
STEPS TO REPRODUCE
Launch VM instance console on instance hosted on VMware ESXi 7.
EXPECTED RESULTS
The web console for the VM instance would launch without issue.
I don't know why the websocket url is using IP address instead of FQDN. IPs change, FQDN rarely change.
The code in VirualMachineMO.java is using Summary.getHostIP - can it be changed so the url is created using FQDN?
https://github.com/apache/cloudstack/blob/4.15.1.0/vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java#L1137-L1154
ACTUAL RESULTS
When launching web console of a VM Instance, the window times out with "Failed to connect to server".