vesontio vesontio - 1 year ago 195
Java Question

VMWare SDK Java samples cannot connect to vCenter

I've a Windows 2008 virtual machine whose IP address is, on which I have installed the vCenter Server. As I am not expert on vSphere, I have just done a Simple Install. Then on my laptop whose IP is, I can open the Web Client in my browser.

Both machines can ping each other, so I think the network connection is OK.

However when I tried to run the Java samples of SDK package, they can't connect to the vCenter.

run.bat com.vmware.general.SimpleClient --url --username Administrator@vsphere.local --password blablabla --ignorecert ignorecert

I got an error message:

WARNING: Java is now set to trust all SSL certificates.
-- VMware samples in Java --
The server at did not respond as expec
ted. Is this a valid URL?Note: SSO connections only work on vCenter SSO enabled
Use the --basic-connection switch if you know this is an ESX host.
See the file for more instructions.
No valid connection available. Exiting now.

I have tried to run the samples in the virtual machine, same problem.

Any idea please ?

Answer Source

Well, I've solved the program by following the tutorial Getting Started With the vSphere Management SDK. I can finally connect to my vCenter by using its code. It turns out to be a certificate verification issue. I don't know why the option --ignorecert of the SDK samples doesn't work.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download