Nagios XI database was not setup properly error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Berto
Posts: 162
Joined: Tue Jul 01, 2014 6:12 pm

Re: Nagios XI database was not setup properly error

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI database was not setup properly error

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Berto
Posts: 162
Joined: Tue Jul 01, 2014 6:12 pm

Re: Nagios XI database was not setup properly error

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios XI database was not setup properly error

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Berto
Posts: 162
Joined: Tue Jul 01, 2014 6:12 pm

Re: Nagios XI database was not setup properly error

Post 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
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Nagios XI database was not setup properly error

Post 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?
Berto
Posts: 162
Joined: Tue Jul 01, 2014 6:12 pm

Re: Nagios XI database was not setup properly error

Post 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.
Locked