NRPE install failing on firewall [CentOS 7]

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

NRPE install failing on firewall [CentOS 7]

Post by eloyd »

Customer is trying to put the NRPE client onto CentOS 7 boxes and getting this:

Code: Select all

Running './4-firewall'...
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
FirewallD is not running
RESULT=252
 
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
 
If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.
 
The script that failed was: './4-firewall'
Install steps were:

Code: Select all

yum -y install wget openssl-devel
cd /tmp 
wget http://assets.nagios.com/downloads/nagiosxi/agents/linux-nrpe-agent.tar.gz 
tar xzf linux-nrpe-agent.tar.gz 
cd linux-nrpe-agent 
./fullinstall 
There is no firewall running on this server.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: NRPE install failing on firewall [CentOS 7]

Post by rkennedy »

If no firewall is on the server, then that could be the reasoning. Try modifying the fullinstall script and removing this line -

Code: Select all

run_sub ./4-firewall
Re-run it, and let us know the results.
Former Nagios Employee
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: NRPE install failing on firewall [CentOS 7]

Post by eloyd »

I can confirm that it is due to no iptables installed. Iptables is deprecated on CentOS 7 so the install script should be updated to detect the absence of iptables rather than failing.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: NRPE install failing on firewall [CentOS 7]

Post by hsmith »

If you turn on firewalld, does it complete? I think this may have happened when I was installing on one of my VPS.
Former Nagios Employee.
me.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: NRPE install failing on firewall [CentOS 7]

Post by eloyd »

It works if one installs iptables. I consider this a failure of the install script that it fails to detect a system that does not have firewall software installed and then aborts the install. In this particular case, our customer is running embedded Linux on hardware controllers for things like commercial freezers and conveyor belt systems. VERY limited memory space and firewalls are simply not required. I would rather see the install script probe for firewalld and/or iptables and just continue if they're not installed. That would make more sense.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: NRPE install failing on firewall [CentOS 7]

Post by hsmith »

I'll do some testing versus this, and then get a bug report over to John if I can reproduce it. You're saying the script doesn't behave if there is no iptables, even if firewalld is present?
Former Nagios Employee.
me.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: NRPE install failing on firewall [CentOS 7]

Post by eloyd »

My testing indicated that iptables needed to be installed, but I am out of the office today. I can check on Monday.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: NRPE install failing on firewall [CentOS 7]

Post by hsmith »

I just did yum remove iptables on my new machine. I believe that removes firewalld as well, since it's just a frontend for iptables. I just want to make sure I get all the relevant information before I submit anything.
Former Nagios Employee.
me.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: NRPE install failing on firewall [CentOS 7]

Post by hsmith »

Reproduced, internal bug report submitted. The workaround is just touch installed.firewall, but there should be no need for a workaround :)
Former Nagios Employee.
me.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: NRPE install failing on firewall [CentOS 7]

Post by eloyd »

Thanks. As soon as our test box finishes getting upgraded VMware management, I'll double check that that's do-able for our customer.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Locked