VMware {code} Community
likid000
Contributor
Contributor

Error: Server version unavailable at 'https://1.1.1.1/sdk/vimService.wsdl' when connecting to virtual center with connect.pl

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:

  1. /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:

  1. /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

25 Replies
phips
Contributor
Contributor

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

Server version unavailable at 'https://hostname:443/sdk/vimService.wsdl' at /usr/lib/perl5/5.8.8/VMware/VICommon.pm line 545.
$ export PERL_LWP_SSL_VERIFY_HOSTNAME=0
$ /opt/vmware/lib/vmware-vcli/apps/general/connect.pl
Connection Successful
Server Time : 2011-11-17T15:06:10.183924Z
0 Kudos
NigelGibbs
Contributor
Contributor

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:

0 0 * * *  . /home/vi-admin/.profile ; /home/vi-admin/bin/vmwarevSphereHealthCheck.pl --conf /home/vi-admin/bin/healthCheck.conf --server <my_vcserver> --username <my_admin> --password <my_password> --type vcenter --email yes >/home/vi-admin/logs/healthCheck.log 2>&1
I hope this helps.
0 Kudos
CarlosMario
Contributor
Contributor

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.

vSphere Command-Line Interface Release Notes

0 Kudos
adam9098
Contributor
Contributor

Try adding this to your script:

$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;

realmelancon
Contributor
Contributor

Make sure these ENV variables are unset:

unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy

Brgds.

-Real

0 Kudos
jcmcken
Contributor
Contributor

​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.

0 Kudos