Page 1 of 1
XI5.4.0, snmptt won't start
Posted: Tue Mar 07, 2017 3:49 pm
by gormank
snmptt fails to start after setting up as defined in the pdf below.
https://assets.nagios.com/downloads/nag ... ios_XI.pdf
Code: Select all
# systemctl start snmptt; systemctl status snmptt -l
Failed to start snmptt.service: Unit not found.
● snmptt.service
Loaded: not-found (Reason: No such file or directory)
Active: failed (Result: exit-code) since Tue 2017-03-07 20:30:26 UTC; 13min ago
Mar 07 20:30:26 sbiotlnxi001.iotsc.sand.box snmptt[11420]: Can't locate SNMP.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 14) line 1.
Mar 07 20:30:26 sbiotlnxi001.iotsc.sand.box snmptt[11420]: died at /usr/sbin/snmptt line 426.
Mar 07 20:30:26 sbiotlnxi001.iotsc.sand.box snmptt[11420]: Could not load the Perl module SNMP! If net_snmp_perl_enable is
Mar 07 20:30:26 sbiotlnxi001.iotsc.sand.box snmptt[11420]: enabled then the SNMP module is required. Please see snmptt.html
Mar 07 20:30:26 sbiotlnxi001.iotsc.sand.box snmptt[11420]: for system requirements. Note: SNMPTT uses the Net-SNMP package's
Mar 07 20:30:26 sbiotlnxi001.iotsc.sand.box snmptt[11420]: SNMP module, NOT the CPAN Net::SNMP module!
Mar 07 20:30:26 sbiotlnxi001.iotsc.sand.box systemd[1]: snmptt.service: control process exited, code=exited status=2
Mar 07 20:30:26 sbiotlnxi001.iotsc.sand.box systemd[1]: Failed to start SNMP Trap Translator (SNMPTT).
Mar 07 20:30:26 sbiotlnxi001.iotsc.sand.box systemd[1]: Unit snmptt.service entered failed state.
Mar 07 20:30:26 sbiotlnxi001.iotsc.sand.box systemd[1]: snmptt.service failed.
I seem to have the right package:
# yum list net-snmp
Loaded plugins: package_upload, product-id, search-disabled-repos, subscription-manager
Installed Packages
net-snmp.x86_64 1:5.7.2-24.el7_2.1 @rhel-7-server-rpms
As you can see it says SNMP.pm isn't in the @INC list of dirs. But if I look at the list of dirs in @INC and the location of SNMP.pm, it should be ok, since /usr/share/perl5/vendor_perl is in @INC...
# find / -name SNMP.pm
/usr/share/perl5/vendor_perl/Net/SNMP.pm
Any hints?
Re: XI5.4.0, snmptt won't start
Posted: Tue Mar 07, 2017 4:52 pm
by ssax
Re: XI5.4.0, snmptt won't start
Posted: Tue Mar 07, 2017 7:07 pm
by gormank
Unfortunately, that package isn't available to me and CPAN says it doesn't exist.
cpan[7]> install Net::SNMP::Perl
Warning: Cannot install Net::SNMP::Perl, don't know what it is.
Try the command
i /Net::SNMP::Perl/
to find objects with matching identifiers.
I do see net-snmp-perl on other Nagios systems...
Re: XI5.4.0, snmptt won't start
Posted: Tue Mar 07, 2017 9:37 pm
by dwhitfield
Can it be made available, with yum install epel-release?
Re: XI5.4.0, snmptt won't start
Posted: Tue Mar 07, 2017 9:54 pm
by gormank
Since we use satellite, its a bit complicated.
In RH6 its here.
net-snmp-perl.x86_64 1:5.5-57.el6 @rhel-6-server-rpms
The above tells me it may be under rhel-7-server-rpms not under epel7, both of which are under the control of satellite.
I've been toying w/ the idea of allowing epel via fedora in the proxy (as defined by nagios xi install repo script), or registering to redhat and bypassing satellite, which will make me unpopular. :)
I have to look into it more, but I'm curious why I didn't see something to tell me I needed to install it, or a message it failed to install. Its sort of a trivia question I guess.
Re: XI5.4.0, snmptt won't start
Posted: Wed Mar 08, 2017 10:48 am
by dwhitfield
What's the output of
yum repolist?
Aside from it being in EPEL,
Code: Select all
[root@sender tmp]# yum provides '*/Net/SNMP.pm'
perl-Net-SNMP-6.0.1-7.el7.noarch : Object oriented interface to SNMP
Repo : nagiosxi-deps
Matched from:
Filename : /usr/share/perl5/vendor_perl/Net/SNMP.pm
That's a different package that the one
@ssax gave you, so it's possible that one will install fine and resolve the issue.
That said, it looks as though that package should have been installed when you installed snmptt:
Code: Select all
[root@sender tmp]# yum install snmptt
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.tzulo.com
* epel: mirror.nexcess.net
* extras: mirror.cs.uwp.edu
* updates: pubmirrors.dal.corespace.com
Resolving Dependencies
--> Running transaction check
---> Package snmptt.noarch 0:1.4-0.9.beta2.el7 will be installed
--> Processing Dependency: perl-Net-SNMP for package: snmptt-1.4-0.9.beta2.el7.noarch
--> Running transaction check
---> Package perl-Net-SNMP.noarch 0:6.0.1-7.el7 will be installed
snmptt is installed in the script, but perhaps snmptt was installed from another source which did not require that dependency for some reason.
Code: Select all
echo "========================================"
echo "Nagios XI SNMP Trap Support Installation"
echo "========================================"
echo ""
echo ""
echo "Installing Prerequisites"
echo ""
# Install Prereqs
yum install snmptt net-snmp-perl -y
That all said, I did file bug report 11287 to add perl-Net-SNMP to the install line. It should be getting installed, so it seems harmless to add it directly to the script, which should lead to more informative error messages.
Re: XI5.4.0, snmptt won't start
Posted: Wed Mar 08, 2017 11:58 am
by gormank
Sorry,
My response to why not install epel was unclear. I can't install it because it sends yum off to sites that the proxy doesn't allow access to. That's why I started rambling about the proxy and registering to redhat rather than Satellite, etc.
I removed and reinstalled snmptt, among various other changes. Now it starts, and the alert cleared. A yum list perl-Net-SNMP-perl still shows it not istalled, but as long as snmptt is happy, so am I... Strange.
Code: Select all
# yum repolist
Loaded plugins: package_upload, product-id, search-disabled-repos, subscription-manager
repo id repo name status
!Chiu_Crew_EPEL_7_EPEL_7 EPEL 7 11,283
!Chiu_Crew_Nagios_XI_5_RHEL_7_Nagios_XI_5_RHEL_7 Nagios XI 5 RHEL 7 79
!rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPMs) 14,020
repolist: 25,382
Code: Select all
# yum install snmptt
Loaded plugins: package_upload, product-id, search-disabled-repos, subscription-manager
Chiu_Crew_EPEL_7_EPEL_7 | 2.1 kB 00:00:00
Chiu_Crew_Nagios_XI_5_RHEL_7_Nagios_XI_5_RHEL_7 | 2.1 kB 00:00:00
rhel-7-server-rpms | 2.0 kB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package snmptt.noarch 0:1.4-0.9.beta2.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================
Installing:
snmptt noarch 1.4-0.9.beta2.el7 Chiu_Crew_EPEL_7_EPEL_7 127 k
Transaction Summary
==============================================================================================================================
Install 1 Package
Total download size: 127 k
Installed size: 558 k
Is this ok [y/d/N]: y
Downloading packages:
snmptt-1.4-0.9.beta2.el7.noarch.rpm | 127 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : snmptt-1.4-0.9.beta2.el7.noarch 1/1
Uploading Package Profile
Verifying : snmptt-1.4-0.9.beta2.el7.noarch 1/1
Installed:
snmptt.noarch 0:1.4-0.9.beta2.el7
Complete!
Code: Select all
# yum list perl-Net-SNMP
Loaded plugins: package_upload, product-id, search-disabled-repos, subscription-manager
Installed Packages
perl-Net-SNMP.noarch 6.0.1-7.el7 @Chiu_Crew_EPEL_7_EPEL_7
Hmm, somewhere in fooling around with it, it got fixed.
Code: Select all
# systemctl restart snmptt
# echo $?
0
[root@sbiotlnxi001 ~]# systemctl status snmptt
● snmptt.service - SNMP Trap Translator (SNMPTT)
Loaded: loaded (/usr/lib/systemd/system/snmptt.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2017-03-08 16:51:17 UTC; 18s ago
Process: 14481 ExecStart=/usr/sbin/snmptt --daemon (code=exited, status=0/SUCCESS)
Main PID: 14486 (snmptt)
CGroup: /system.slice/snmptt.service
├─14485 /usr/bin/perl /usr/sbin/snmptt --daemon
└─14486 /usr/bin/perl /usr/sbin/snmptt --daemon
Mar 08 16:51:17 sbiotlnxi001.iotsc.sand.box systemd[1]: Starting SNMP Trap Translator (SNMPTT)...
Mar 08 16:51:17 sbiotlnxi001.iotsc.sand.box snmptt-sys[14481]: SNMPTT v1.4beta2 started
Mar 08 16:51:17 sbiotlnxi001.iotsc.sand.box snmptt-sys[14481]: Loading /etc/snmp/snmptt.conf
Mar 08 16:51:17 sbiotlnxi001.iotsc.sand.box snmptt-sys[14481]: Finished loading 64 lines from /etc/snmp/snmptt.conf
Mar 08 16:51:17 sbiotlnxi001.iotsc.sand.box snmptt-sys[14486]: Changing to UID: snmptt (994)
Mar 08 16:51:17 sbiotlnxi001.iotsc.sand.box systemd[1]: snmptt.service: Supervising process 14486 which is not our chil...its.
Mar 08 16:51:17 sbiotlnxi001.iotsc.sand.box systemd[1]: Started SNMP Trap Translator (SNMPTT).
Hint: Some lines were ellipsized, use -l to show in full.
Re: XI5.4.0, snmptt won't start
Posted: Wed Mar 08, 2017 12:26 pm
by dwhitfield
gormank wrote: I can't install it because it sends yum off to sites that the proxy doesn't allow access to.
I understood, but wasn't clear either why I left that yum provides.
Repo : nagiosxi-deps is the interesting bit to me. If you were hosting things internally, I'd assume our repos were one of the available repos. Also, I'd have assumed the script bailed if the dependency wasn't installed, but since it doesn't, that's why I filed the bug report to make it explicit.
That all said, it sounds like we are ready to lock this up. Correct?
Re: XI5.4.0, snmptt won't start
Posted: Wed Mar 08, 2017 12:35 pm
by gormank
I whitelisted fedora.com and nagios.com, enabled (as in copied the files back) the epel and Nagios repo files in /etc/yum.repos.d and ran a repolist with success. that should resolve a few more issues, as well as this one.
Yes, close this. Thanks!