Page 2 of 2

Re: OK - Current BW in: 0Mbps Out: 0Mbps ???

Posted: Wed May 13, 2015 10:17 am
by pchenry
No sir it doesnt apply ..... the mrtg patch applied but the SNMP_Session.pm one does not .... my version already had the changes .....

and I had already made the mrtg changes ... still getting the error


Daniel

Re: OK - Current BW in: 0Mbps Out: 0Mbps ???

Posted: Wed May 13, 2015 4:16 pm
by tgriep
Try installing the missing perl module by running this.

Code: Select all

 yum install perl-Exporter -y

Re: OK - Current BW in: 0Mbps Out: 0Mbps ???

Posted: Fri Dec 04, 2015 8:55 am
by giant69
I have the same problem on a EL7 system - details below.
The nagiosXI version is the offline one: 5.2.0

Error message:

Subroutine SNMP_Session::pack_sockaddr_in6 redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66.
at /usr/bin/../lib/mrtg2/SNMP_Session.pm line 149.
Subroutine SNMP_Session::unpack_sockaddr_in6 redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66.
at /usr/bin/../lib/mrtg2/SNMP_Session.pm line 149.
Subroutine SNMPv1_Session::pack_sockaddr_in6 redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66.
at /usr/bin/../lib/mrtg2/SNMP_Session.pm line 604.
Subroutine SNMPv1_Session::unpack_sockaddr_in6 redefined at /usr/share/perl5/vendor_perl/Exporter.pm line 66.
at /usr/bin/../lib/mrtg2/SNMP_Session.pm line 604.


Following your requests and suggestions:

[root@lab01 tmp]# yum install perl-Exporter -y
Loaded plugins: rhnplugin
This system is receiving updates from RHN Classic or Red Hat Satellite.
repository_oiz7_x86_64 | 1.0 kB 00:00:00
repository_puppet7_x86_64 | 1.0 kB 00:00:00
repository_puppet7_x86_64_dependencies | 1.0 kB 00:00:00
rhel-x86_64-server-7 | 1.5 kB 00:00:00
rhel-x86_64-server-optional-7 | 1.3 kB 00:00:00
rhel-x86_64-server-rh-common-7 | 1.3 kB 00:00:00
rhel-x86_64-server-supplementary-7 | 1.5 kB 00:00:00
rhn-tools-rhel-x86_64-server-7 | 1.3 kB 00:00:00
Package perl-Exporter-5.68-3.el7.noarch already installed and latest version
Nothing to do

[root@lab01 tmp]# yum list installed|grep mrtg
nagiosxi-mrtg.x86_64 5-2.0.el7 @/nagiosxi-mrtg-5-2.0.el7.x86_64
[root@lab01 tmp]# yum list installed|grep snmp
net-snmp.x86_64 1:5.7.2-20.el7_1.1 @rhel-x86_64-server-7
net-snmp-agent-libs.x86_64 1:5.7.2-20.el7_1.1 @rhel-x86_64-server-7
net-snmp-devel.x86_64 1:5.7.2-20.el7_1.1 @rhel-x86_64-server-7
net-snmp-libs.x86_64 1:5.7.2-20.el7_1.1 @rhel-x86_64-server-7
net-snmp-utils.x86_64 1:5.7.2-20.el7_1.1 @rhel-x86_64-server-7
php-snmp.x86_64 5.4.16-36.el7_1 @rhel-x86_64-server-optional-7
[root@lab01 tmp]# yum list installed|grep Exporter
perl-Exporter.noarch 5.68-3.el7 @rhel-x86_64-server-7

[root@lab01 tmp]# uname -a
Linux lab01.tstglobal.tst.loc 3.10.0-229.el7.x86_64 #1 SMP Thu Jan 29 18:37:38 EST 2015 x86_64 x86_64 x86_64 GNU/Linux

[root@lab01 tmp]# cat /etc/*release*
NAME="Red Hat Enterprise Linux Server"
VERSION="7.1 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.1"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.1 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.1:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.1
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.1"
Red Hat Enterprise Linux Server release 7.1 (Maipo)
Red Hat Enterprise Linux Server release 7.1 (Maipo)
cpe:/o:redhat:enterprise_linux:7.1:ga:server

Re: OK - Current BW in: 0Mbps Out: 0Mbps ???

Posted: Fri Dec 04, 2015 2:51 pm
by rkennedy
This issue came up in the past here with a pretty in depth explanation - https://support.nagios.com/forum/viewto ... 10#p157999

I believe the final fix was changing these two lines, could you try making two changes to your SNMP_Session.pm -

Code: Select all

Line 149

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

Line 604

Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo));
Replace both of them with -

Code: Select all

Socket6->import(qw(inet_pton getaddrinfo inet_ntop));
This may work for you. Let us know the result.

Re: OK - Current BW in: 0Mbps Out: 0Mbps ???

Posted: Mon Dec 07, 2015 9:41 am
by giant69
Thank you for the link. I was investigating in this issue, but didn't found the thread you mentioned.
Based on this link and your information, I finally was able to fix it.
Thanks!

Re: OK - Current BW in: 0Mbps Out: 0Mbps ???

Posted: Mon Dec 07, 2015 11:23 am
by bwallace
Glad we were able to help. We'll lock this thread now and feel free to open another should you require assistance with anything else.