Page 3 of 3

Re: Nagios XI database was not setup properly error

Posted: Tue Aug 04, 2015 12:55 pm
by Berto
Well after fixing the previous correction the installation continued and I got this error.

Sorry, user root is not allowed to execute '/tmp/nagiosxi/nagiosxi/basedir/scripts/manage_services.sh restart nagios' as root on lnsvr0615.
RESULT=1

--Berto

Re: Nagios XI database was not setup properly error

Posted: Tue Aug 04, 2015 2:30 pm
by lmiltchev
Also, our environment uses LDAP for sudo so if your needing any of those files please let me know.
Can you show us the sanitized version of the LDAP files? Probably these settings override the ones in sudoers... I am not even sure if this is going to be a "supported" environment. If you cannot run "./manage_services.sh restart nagios", this is going to be a problem even after Nagios XI is installed... I read a few posts about people that "fixed" the "Sorry, user root is not allowed to execute..." errors by changing the following line in sudoers from this:

Code: Select all

root    ALL=(ALL) ALL
tho this:

Code: Select all

root    ALL=(ALL:ALL) ALL
I haven't tried this and I am not sure if it is going to help though.

Re: Nagios XI database was not setup properly error

Posted: Thu Aug 06, 2015 2:18 pm
by Berto
Hello,

Sorry for a late response but I believe I fixed my issue with sudo. I created an LDAP account called nagios and the group nagcmd also and then added the nagios account to our LDAP sudoers list. I did a fresh install of RHEL 6.6 again to try the fullinstall script again and except for a few minor errors dealing with wget in two scripts (our environment uses a proxy corp server so I needed to add the --no-check-certifcate) all seemed well. After edit the B-installxi to add the --no-check-certificate for the wget and re-running the fullinstall script I received this error:

Running './B-installxi'...
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Building latest perms binary...
Checking PostgresQL status...
PostgresQL running - continuing...
Creating role and database...
ERROR: role "nagiosxi" already exists
ERROR: database "nagiosxi" already exists
ERROR: Nagios XI database was not setup properly - exiting.
RESULT=1

Could it be since it saw that the role and database was already created, it failed?

--Berto

Re: Nagios XI database was not setup properly error

Posted: Thu Aug 06, 2015 4:50 pm
by tgriep
Can you start with a clean version of RHEL 6.6, add the modifications that you did to get your LDAP credentials to work and then run the fullinstall?
Normally you would run the fullinstall once but I am guessing that you ran it a few times and that is causing the issues you are having.
Either that, could you install Nagios XI first and then edit your system for LDAP?

Re: Nagios XI database was not setup properly error

Posted: Sat Aug 08, 2015 10:59 am
by Berto
Hello,

I finally got Nagios XI installed! I did another fresh install of RHEL 6.6 and prior to running the fullinstall script tweaked a few scripts that needed the --no-check-certificate for wget since there's a proxy server in our environment. Plus with some minor tweaks to LDAP for the sudoers I finally got the install to go all the way through without any errors.

Thanks very much for your guys assistance, much appreciated!

--Berto

Re: Nagios XI database was not setup properly error

Posted: Sun Aug 09, 2015 10:23 am
by jdalrymple
Berto - sorry for all the trouble. I'm going to go ahead and change the topic of this to more closely reflect the actual issues you ran into then lock it up. I think this one will make for good reference. Is that OK with you?

Re: Nagios XI database was not setup properly error

Posted: Fri Aug 28, 2015 3:38 pm
by Berto
Sorry for the very late reply, but yes that's okay and a very good idea for others that might one day run into the same issue.