VMware {code} Community
bhut201110141
Contributor
Contributor

VMRC 5.5 connect problem

Trying to migrate my web-based code using vCloud Director API from vmrc 1.5 to vmrc 5.5.

Followed instructions from vCloud API (5.5) programming Guide in conjuction with VMware Remote Console SDK (5.5) documentation.

connect error is: An error occurred that affected the security of the connection

Anyone had success at this? Any help?   Thanks...

Environment:

vCloud Director 5.5
vSphere 5.5

Using javascript methods from VRMC sdk (vmrc-embed-example.js)

getVersion();
isReadyToStart();
init();
startup();
connect();

xx.xx.xx.xx is the vCD console proxy server IP

I can successfully get a remote console if I use the vmrc-embed-example.html  example
with:
    - MSK mode: +
    - Hostname is: IP (my vCenter)
    - Allow SSL errors: checked
    -Ticket: obtained by AcquireCloneTicket (invoked method from browser)
- vmid: vm-xxxx


It does NOT work on my webpage using  javascript methods
with:

- MSK mode: +
- Advanced config: usebrowserproxy=true;tunnelmks=true
- Hostname is: IP of my vCloud Director console proxy server
-Ticket: obtained by vCloudDirector java api acquireTicket()
  -unencoded format:  mks://xx.xx.xx.xx/vm-6511?ticket=cst-JsCiMd…
-  xx.  is vCloud Director console proxy server IP

   - Allow SSL errors: false   - vmid: vm-xxxx

Browser results from connection attempt:
-getVersion returned "5.5.0.1280474"
-isReadyToStart returned "true"
-starting VMRC instance: modes: 2, messages: 1
  VMRC using advanced config "usebrowserproxy=true;tunnelmks=true"
-startup returned "vmrc-np-t-{BCBF8A88-DF7D-4893-A23B-F926A29B96C6}"
-connect succeeded
onConnectionStateChange - connectionState: 1, host: 214.46.236.184, datacenter: , vmId: vm-6511, userRequested: true, reason: An error occurred that affected the security of the connection

0 Kudos
2 Replies
bhut201110141
Contributor
Contributor

The vmrc is now working from the web page. Long story short...had to change "allowSSLErrors" to true. When this is set to false as recommended in

the vmrc API/SDK documentation I receive the following error in the vCD server vcloud-container-debug.log:

   Exception during handshake: javax.net.ssl.SSLException: Received fatal alert: certificate_unknown

(my vCD certificates are selfsigned)

Also had to make sure I was sending only the ticket from the vCloud Director API aquireTicket method.

0 Kudos
IvanMalinin
Contributor
Contributor

Necropost

Check proxy in your browser.

0 Kudos