VMware {code} Community
VinzenzUhr
Contributor
Contributor
Jump to solution

"Possible precedence issue with control flow operator"

Hi guys

I have following Problem:

Yesterday I made a distribution update from debian wheezy to debian jessie.

Since then I got a problem with a plugin which I'm using for Icinga a monitoring system.

When I run it, I got the error that there is an "Undefined subroutine".

I read on google that I can fix it, with reinstalling the vsphere SDK, but the installation stuck at "CPAN is downloading and installing pre-requisite Perl module "SOAP::Lite"".

I can skip this step with Ctrl+C and at the end it says "This installer has successfully installed...".


But when I run the Plugin I get the error message "Possible precedence issue with control flow operator at /usr/share/perl/5.20/VMware/VICommon.pm line 2147." and the whole plugin stucks.

I tried the following step which I found in this forum and the error message doesn't appear, but the plugin still stucks...

Re: VMware-vSphere-Perl-SDK-5.5.0-1384587 broken with perl 5.20

I have also Perl 5.20.2...

Can you guys help me?

Vinzenz

Tags (2)
Reply
0 Kudos
1 Solution

Accepted Solutions
VinzenzUhr
Contributor
Contributor
Jump to solution

Ok I could fix it...

I changed the line 2147 to

"

return (defined $user_agent->cookie_jar and

                  $user_agent->cookie_jar->as_string ne '');

"

And this time I waited for a long time and I get a error message that there is a problem with SOAP.

The solution was to downgrade Net-HTTP and libwww-perl with following commands:

perl -MCPAN -e shell

o conf urllist push http://backpan.perl.org

install GAAS/Net-HTTP-6.03.tar.gz

install GAAS/libwww-perl-6.03-tar.gz


The second Command loads older releases to the urllist.


Thx for your help and I hope I could help others with the same problem.


Vinzenz

View solution in original post

Reply
0 Kudos
5 Replies
natxoasenjo
Enthusiast
Enthusiast
Jump to solution

By far the easiest way to install the Perl sdk is to download the tarball, extract it and copy vmware-vsphere-cli-distrib/lib/VMware/share/VMware to a path in your @INC (for a fedora installation the standard Perl has this for @INC:   @INC:     /usr/local/lib64/perl5     /usr/local/share/perl5     /usr/lib64/perl5/vendor_perl     /usr/share/perl5/vendor_perl     /usr/lib64/perl5     /usr/share/perl5 So pasting the folder vmware-vsphere-cli-distrib/lib/VMware/share/VMware to any of those paths makes it available to any user in that system. You can find your @INC running perl -V (usually at the end of the long output).

VinzenzUhr
Contributor
Contributor
Jump to solution

I still get the error message...

Reply
0 Kudos
VinzenzUhr
Contributor
Contributor
Jump to solution

Ok I could fix it...

I changed the line 2147 to

"

return (defined $user_agent->cookie_jar and

                  $user_agent->cookie_jar->as_string ne '');

"

And this time I waited for a long time and I get a error message that there is a problem with SOAP.

The solution was to downgrade Net-HTTP and libwww-perl with following commands:

perl -MCPAN -e shell

o conf urllist push http://backpan.perl.org

install GAAS/Net-HTTP-6.03.tar.gz

install GAAS/libwww-perl-6.03-tar.gz


The second Command loads older releases to the urllist.


Thx for your help and I hope I could help others with the same problem.


Vinzenz

Reply
0 Kudos
itsplio
Contributor
Contributor
Jump to solution


Hi, 


sorry, but I've the same problem and I try to fix it


This is the error message : 


"CHECK_ESX3.PL CRITICAL - Server version unavailable at 'https://:443/sdk/vimService.wsdl' at /usr/share/perl/5.20/VMware/VICommon.pm line 545"


Perl Version : v5.20.2


OS Server : Debian


SDK used : VMware-vSphere-Perl-SDK-5.5.0-2043780.x86_64


I already modified VICommon.pm on line 2147 and followed this command : 

perl -MCPAN -e shell

o conf urllist push [http://backpan.perl.org | http://backpan.perl.org/]

install GAAS/Net-HTTP-6.03.tar.gz

install GAAS/libwww-perl-6.03-tar.gz


Do you have an idea of what's wrong please ? 


Thanks


 

Reply
0 Kudos
stumpr
Virtuoso
Virtuoso
Jump to solution

In your url, you're missing the host portion of the URI.  Looks like something isn't being passed into the script parameters (or your ENV vars are not set properly).

https://:443/sdk/vimService.wsdl

Maybe double check you have the right host information set in nagios.

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