You are here

Update to 3.20131016.0 causes NMIS to fail - Fixed

6 posts / 0 new
Last post
ian.yates@bto.org
ian.yates@bto.org's picture
Update to 3.20131016.0 causes NMIS to fail - Fixed

We have just updated from OpsView core 3.20130903 to 3.20131016.0 and the NMIS module stopped working with a 500 error.

When trying to run the nmiscgi.pl from the command line I was seeing:

"Undefined subroutine &SNMP_Session::pack_sockaddr_in6 called at /usr/local/nagios/perl/lib/SNMP_Session.pm line 150."

On looking at the Opsview version of SNMP_Session module it would appear that you're trying to use the pack_sockaddr_in6 without including it in the previous line.

Enclosed patch:

--- /usr/local/nagios/perl/lib/SNMP_Session.pm.orig     2013-10-18 12:16:32.360817927 +0100 +++ /usr/local/nagios/perl/lib/SNMP_Session.pm  2013-10-18 13:12:56.377458154 +0100 @@ -146,7 +146,7 @@        if (eval {local $SIG{__DIE__};require Socket6;} &&         eval {local $SIG{__DIE__};require IO::Socket::INET6; IO::Socket::INET6->VERSION("1.26");}) { -       Socket6->import(qw(inet_pton getaddrinfo)); +       Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo));         $ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), "::1")));         $SNMP_Session::ipv6available = 1;      }    

 

tvoon
tvoon's picture
Re: Update to 3.20131016.0 causes NMIS to fail - Fixed

Good spot. We'll look into that - thanks for the report.

Ton

hollatz
hollatz's picture
Re: Update to 3.20131016.0 causes NMIS to fail - Fixed

I'm having the same issue, please let us know when we can expect a patch for this problem. Or can we workaround this issue?

smarsh
smarsh's picture
Re: Update to 3.20131016.0 causes NMIS to fail - Fixed

It looks like there is a patch in the original post. 

ian.yates@bto.org
ian.yates@bto.org's picture
Re: Update to 3.20131016.0 causes NMIS to fail - Fixed

This is true, what I submitted is a patch but I'm guessing from his question that he's looking for a more user friendly patch from OpsView ;)

In the mean time... Hollatz, if you edit the file /usr/local/nagios/perl/lib/SNMP_Session.pm

Change line 149 from:

Socket6->import(qw(inet_pton getaddrinfo));

TO

Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo));   That should solve your problem. 
AndyCanty
AndyCanty's picture
Re: Update to 3.20131016.0 causes NMIS to fail - Fixed

Hi,

Trailling Opsview Core with a view to upgrading if i get everything working and this was stumping me.
You fix solved the missing graphs on my MRTG stats pages
still no data, but i'm not sure when it starts collection information though.
From this point in time or will it collate historical data?

thanks again for the fix....means i can move forward  :)

Andy.