Hi,
I have a strange problem, I have 3 RHEL 5.4 servers that are clones of each other, I have install the SDK on all 3 of them, version:
I have installed VMware-vSphere-SDK-for-Perl-4.0.0-161974
and on 2 servers whith connect.pl it works great:
/usr/lib/vmware-vcli/apps/general/connect.pl --server 1.1.1.1 --username XXX --password XX
Connection Successful
Server Time : 2009-11-04T11:53:30.449415Z
On the third server it doesn't work:
/usr/lib/vmware-vcli/apps/general/connect.pl --server 1.1.1.1 --username XXX --password XX
Error: Server version unavailable at 'https://1.1.1.1/sdk/vimService.wsdl'
I am connecting to a VC with esx 3.5, on the third server I can access the url 'https://1.1.1.1/sdk/vimService.wsdl' with no problems
Any idea what can be the problem ?
Thnx
You don't need to edit anything.
export PERL_LWP_SSL_VERIFY_HOSTNAME=0 in your shell.
Run VMware SDK command.
e.g.
$ /opt/vmware/lib/vmware-vcli/apps/general/connect.pl
I ran into the same problem when trying to run vmwarevSphereHealthCheck.pl from cron on a vma. It worked great from a shell, but not from cron evidently, instead I got the error:
Server version unavailable at 'https://<my_vscerver>:443/sdk/vimService.wsdl' at /usr/lib/perl5/5.10.0/VMware/VICommon.pm line 545.
I fixed it by including the .profile to set the environment variables properly, like this:
this problem can happen if you installed vmware perl SDK in a system with vmware cli , both will stop working and you'll need to deinstall both and install vmware-cli (vsphere cli bundle), as stated in Release notes.
Try adding this to your script:
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
Make sure these ENV variables are unset:
unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy
Brgds.
-Real
I was having a similar problem on RHEL/CentOS. Solution for me was to install the 'perl-LWP-Protocol-https' RPM, which I presume contains the part of LWP that implement HTTPS connections.
EDIT: Apparently, I had also done a 'export PERL_LWP_SSL_VERIFY_HOSTNAME=0' as well.