VMware {code} Community
DucSoup
Contributor
Contributor
Jump to solution

"Server Version Unavailable" When using connect.pl from CentOS 6

I'm installing a new Nagios Plugin that's basically a Perl script that connects back to an ESXi host. I've been having issues getting it to connect and I'm wondering what's going on.

I've tried connecting to the host using the connect.pl from my CentOS 6 box, and I keep receiving the following error...

"Server version unavailable at https://<ip address>/sdk/vimService.wsdl"

I can manually navigate to this address, but I cannot seem to connect using the Perl script.

I've seen many suggestions about adding $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; at the beginning of your scripts, but this does not seem to be working.

I've also tried typing in export PERL_LWP_SSL_VERIFY_HOSTNAME=0 into the shell, and this doesn't fix anything. Not sure what's going on.

Perl v5.10.1

LWP Version: 6.05

Crypt::SSLeay Version 0.57

Reply
0 Kudos
1 Solution

Accepted Solutions
stumpr
Virtuoso
Virtuoso
Jump to solution

The issue could be with the environment in the Nagios setup (perhaps the value is getting overwritten or not picked up in a later stage).

Try upgrading Crypt::SSLeay.  There were a few versions were some changes were added to change handling of self-signed certs (hence all the posts about using PERL_LWP_SSL_VERIFY_HOSTNAME).  I haven't seen the issue with more recent versions of the modules.

For example, Crypt::SSLeay::VERSION = 0.57 is a bit old (~2007).  In OSX, I'm running version 0.64 and no longer need the PERL_LWP_SSL_VERIFY_HOSTNAME when running any VMware Perl SDK tools.  I also haven't seen it on more recent Perl install versions (5.16 for example).  0.64 seems to be the current production release and I would guess that upgrading it might solve the problem.

Reuben Stump | http://www.virtuin.com | @ReubenStump

View solution in original post

Reply
0 Kudos
4 Replies
DucSoup
Contributor
Contributor
Jump to solution

Any takers?

Reply
0 Kudos
stumpr
Virtuoso
Virtuoso
Jump to solution

The issue could be with the environment in the Nagios setup (perhaps the value is getting overwritten or not picked up in a later stage).

Try upgrading Crypt::SSLeay.  There were a few versions were some changes were added to change handling of self-signed certs (hence all the posts about using PERL_LWP_SSL_VERIFY_HOSTNAME).  I haven't seen the issue with more recent versions of the modules.

For example, Crypt::SSLeay::VERSION = 0.57 is a bit old (~2007).  In OSX, I'm running version 0.64 and no longer need the PERL_LWP_SSL_VERIFY_HOSTNAME when running any VMware Perl SDK tools.  I also haven't seen it on more recent Perl install versions (5.16 for example).  0.64 seems to be the current production release and I would guess that upgrading it might solve the problem.

Reuben Stump | http://www.virtuin.com | @ReubenStump
Reply
0 Kudos
DucSoup
Contributor
Contributor
Jump to solution

Well I'll be darned, that was it. Thank you so much for your help. Once I got it to 0.64 the connections started going through.

Reply
0 Kudos
stumpr
Virtuoso
Virtuoso
Jump to solution

No worries, spent part of a year dealing with that issue off an on.  Was glad when it was finally fixed/changed.

Reuben Stump | http://www.virtuin.com | @ReubenStump
Reply
0 Kudos