(SOLVED) Problem installing Nagios Plugins

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

(SOLVED) Problem installing Nagios Plugins

Postby nstoyanov » Thu May 18, 2017 10:56 am

Hello dear Nagios community,

I am working on installing Nagios Core on Ubuntu Server 16.04 LTS. Everything was going great (following the install guide) until I reached the point of installing nagios-plugins-release-2.2.1. I get an "access denied" error when I do "sudo make install" :

Code: Select all
Making install in po
make[1]: Entering directory '/tmp/nagios-plugins-release-2.2.1/po'
/usr/local/nagios/share
make[1]: execvp: /usr/local/nagios/share: Permission denied
Makefile:257: recipe for target 'install-data-yes' failed
make[1]: *** [install-data-yes] Error 127
make[1]: Leaving directory '/tmp/nagios-plugins-release-2.2.1/po'
Makefile:1541: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1


Any ideas why permissions would be denied even though the command is run with sudo? I do not see any errors up to this point in the compile and install process for the plugins.

Any help is greatly appreciated!

Thank you!
Last edited by nstoyanov on Fri May 19, 2017 8:44 am, edited 1 time in total.
nstoyanov
 
Posts: 4
Joined: Wed Apr 05, 2017 9:27 am

Re: Problem installing Nagios Plugins

Postby dwhitfield » Thu May 18, 2017 3:33 pm

What is the output of the two following commands? Please put the output in a code block. The button is the fifth from the left on the post input screen (between Quote and List).

Code: Select all
ls -la /usr/local/nagios/share
sestatus
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
dwhitfield
The Doctor
 
Posts: 3486
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC

Re: Problem installing Nagios Plugins

Postby blackrino9 » Thu May 18, 2017 3:34 pm

A good place to start would be to check the permissions are on the destination folder.

ls -lh /usr/local/nagios

see who the user and group owners are on that destination and what permissions they have.
blackrino9
 
Posts: 2
Joined: Wed Apr 12, 2017 7:19 pm

Re: Problem installing Nagios Plugins

Postby dwhitfield » Thu May 18, 2017 3:37 pm

blackrino9 wrote:
ls -lh /usr/local/nagios


This could be useful if you get other permissions errors. You can add it to another code block with the output of the commands I suggested too.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
dwhitfield
The Doctor
 
Posts: 3486
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC

Re: Problem installing Nagios Plugins

Postby nstoyanov » Fri May 19, 2017 8:44 am

Gentlemen, thank you for the prompt reply!

Because I had followed the instructions literally, I was working on the nagios plugins in the tmp folder. I had to reboot, which erased my progress, so I had to start installing the plugins from scratch. This time everything went through! The problem has been resolved.

Again, thank you for the prompt reply. Hopefully I will not have to bug you again :).
nstoyanov
 
Posts: 4
Joined: Wed Apr 05, 2017 9:27 am

Re: Problem installing Nagios Plugins

Postby dwhitfield » Fri May 19, 2017 9:05 am

nstoyanov wrote:Because I had followed the instructions literally


Which instructions? Not all distros clear tmp on reboot, but we can make a note that that's a possibility.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
dwhitfield
The Doctor
 
Posts: 3486
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC

Re: Problem installing Nagios Plugins

Postby nstoyanov » Mon May 22, 2017 10:14 am

dwhitfield wrote:
nstoyanov wrote:Because I had followed the instructions literally


Which instructions? Not all distros clear tmp on reboot, but we can make a note that that's a possibility.


The installation instructions for Ubuntu:

https://support.nagios.com/kb/article/n ... tml#Ubuntu

Compiling is done in /tmp, and upon reboot the OS (Ubuntu Server 16.04 LTS) cleared it.

Thank you.
nstoyanov
 
Posts: 4
Joined: Wed Apr 05, 2017 9:27 am

Re: (SOLVED) Problem installing Nagios Plugins

Postby dwhitfield » Mon May 22, 2017 10:25 am

The compile should install things to /usr/local. You can see that in your original error message:

Code: Select all
make[1]: execvp: /usr/local/nagios/share: Permission denied


Our instructions don't say to reboot, so I'm a little confused about what actually happened. Did you get a message during compile that said you needed to reboot? Maybe that's something that should be changed in the code itself, rather than the instructions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
dwhitfield
The Doctor
 
Posts: 3486
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC

Re: (SOLVED) Problem installing Nagios Plugins

Postby nstoyanov » Mon May 22, 2017 10:42 am

dwhitfield wrote:The compile should install things to /usr/local. You can see that in your original error message:

Code: Select all
make[1]: execvp: /usr/local/nagios/share: Permission denied


Our instructions don't say to reboot, so I'm a little confused about what actually happened. Did you get a message during compile that said you needed to reboot? Maybe that's something that should be changed in the code itself, rather than the instructions.


My apologies, I did not mean to cause confusion. My machine rebooted inadvertently while working on installing Nagios Core, and when I tried installing the nagios plugins again after the reboot, the process actually worked. The instructions did not ask for a reboot, just to download, compile, and install, from the /tmp folder. Because I rebooted, the /tmp had gotten cleared and I had to start the installation process for the nagios plugins from scratch, just to discover that the problem had gone away. :D 8-)
nstoyanov
 
Posts: 4
Joined: Wed Apr 05, 2017 9:27 am

Re: (SOLVED) Problem installing Nagios Plugins

Postby dwhitfield » Mon May 22, 2017 11:06 am

Thank you! This makes a lot of sense now. I mentioned this to our documentation team. I am not sure what they will do since we've long used /tmp for installs, but seems like a note about rebooting would be easy enough.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
dwhitfield
The Doctor
 
Posts: 3486
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 6 guests