- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
webconsole.html is the web page for displaying VM Web Console by vSphere Web Client. The javascript in webconsole.html will use "wss://vcenter_server_ip:9443/vsphere-client/webconsole/authd?..." to connect to vCenter Server.
What error you got in the web browser when connecting "wss://.../authd?..." ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
link created:
wss://192.168.3.128:9443/vsphere-client/webconsole/authd?vmId=vm-205&vmName=zs999&host=vcenter.yunhorn.com&sessionTicket=cst-VCT-5241dab7-1e0e-845f-be81-3d83f5a8b5a4--tp-AF-B5-66-D0-BA-4A-CF-A9-8E-73-50-8B-B1-62-D4-8D-7A-BD-0E-B8&thumbprint=AF:B5:66:D0:BA:4A:CF:A9:8E:73:50:8B:B1:62:D4:8D:7A:BD:0E:B8
console error info:
failed: WebSocket opening handshake was canceled
ps:
telnet 192.168.3.128 9443 is fine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
juanfont, any chance you could give us some sample code for generating your URL? I can get a ticket fine and I have all other details A-Okay, but there's a lot of conflicting information in this thread and the documentation is pretty vague about what to do. You seem to know what you're doing, so any information you could provide would be a big help.
Cheers in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The code should be like this:
var url = "wss://192.168.3.128:9443/vsphere-client/webconsole/authd?vmId=vm-205&vmName=zs999&host=192.168.3.128&sessionTicket=cst-VCT-5241dab7-1e0e-845f-be81-3d83f5a8b5a4--tp-AF-B5-66-D0-BA-4A-CF-A9-8E-73-50-8B-B1-62-D4-8D-7A-BD-0E-B8";
var wmks = WMKS.createWMKS("wmksContainer", {}).register(
WMKS.CONST.Events.CONNECTION_STATE_CHANGE,
function(event,data){
if(data.state == WMKS.CONST.ConnectionState.CONNECTED)
{
console.log("connection state change : connected");
}
});
wmks.connect(url);
Note:
1) The value of sessionTicket can be acquired by visiting "https://192.168.3.128/mob/?moid=SessionManager&method=acquireCloneTicket"
2) Make sure before opening the html page containing the javascript code above, use your web browser to visit "https://192.168.3.128:9443/vsphere-client/" once and accept the SSL certificate (no need to login vSphere Web Client).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
url:
wss://192.168.3.128:9443/vsphere-client/webconsole/authd/?vmId=vm-312&vmName=tableTest&host=192.168.3.128&sessionTicket=cst-VCT-52f9d70d-52ec-f4ab-47ba-cf8c2db9f2e0--tp-AF-B5-66-D0-BA-4A-CF-A9-8E-73-50-8B-B1-62-D4-8D-7A-BD-0E-B8
console output:
failed: Error during WebSocket handshake: Unexpected response code: 500
anyway,thank you for you replay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@zhongshun do not use '&' in the url.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK so now we have the certificate installed correctly on the server. We have SSL configured.
I am now getting these errors:
and
Can you explain what port I should be using and what the differences are? Not sure what we are missing at this point. Thanks for the help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not sure if you're still experiencing issues, but I've recently embarked upon the HTML5 console journey and happened across this thread. From your first image, it looks like you're using the wrong type of ticket in the URL, but then in your second image, it looks like you have the correct ticket, but you should try including the port with the host, like:
wss://srv-sdesx2.onbase.net:443/ticket/{ticket_string}
Actually, the AcquireTicket page should tell you what port to use.
The problem I'm having with all of this is that the wmks approach only seems to work with ESXhost IPs, and I am trying to expose the console to external parties, so ESXhost IPs are pointless. I investigated another method, whereby I emulate the URL that vSphere Web Client generates for the built-in web console, which are in the format:
https://{host}:9443/vsphere-client/webconsole.html?vmId={vm_moId}&vmName={vm_name}&serverGuid={server_guid}&locale=en_US&host={host}:443&sessionTicket={AcquireCloneTicket_output}&thumbprint={ssl_thumbprint_from_sessionTicket}
However, as of vSphere 6.0, it seems that the Single Sign On (SSO) page is forced in between, so while I am able to craft the URL perfectly, once you click on the link the SSO page jumps in front and you must login to get to the web console.
If anyone knows of another approach, I'd be much appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi sleeyuen,
Since we started testing with vSphere 6 we ran into the exact same problem. Your approach works perfectly in vSphere 5.5, but fails in vSphere 6, redirecting to the SSO-Page.
Have you found a solution yet? Or a workaround of some kind?
Regards,
Stephan