Fullinstall script failing
Fullinstall script failing
Hello,
I have a project to evaluate Nagios as a possible replacement of the monitoring tool that is currently in use in our Linux/Solaris environment. I download the source install from here; http://library.nagios.com/library/produ ... loads/main
and read the documentation related to Nagios XI here; http://assets.nagios.com/downloads/nagi ... ctions.pdf. I built a fresh RHEL 6.4 server and all seemed to go good until I got this error;
Sorry, user root is not allowed to execute '/usr/bin/psql -c create user nagiosxi with password 'n@gweb';' as postgres on 'server'.
Sorry, user root is not allowed to execute '/usr/bin/psql -c create database nagiosxi owner nagiosxi;' as postgres on 'server'.
Not sure what to do next since I'm not very familiar with postgres.
Thanks,
Alberto
I have a project to evaluate Nagios as a possible replacement of the monitoring tool that is currently in use in our Linux/Solaris environment. I download the source install from here; http://library.nagios.com/library/produ ... loads/main
and read the documentation related to Nagios XI here; http://assets.nagios.com/downloads/nagi ... ctions.pdf. I built a fresh RHEL 6.4 server and all seemed to go good until I got this error;
Sorry, user root is not allowed to execute '/usr/bin/psql -c create user nagiosxi with password 'n@gweb';' as postgres on 'server'.
Sorry, user root is not allowed to execute '/usr/bin/psql -c create database nagiosxi owner nagiosxi;' as postgres on 'server'.
Not sure what to do next since I'm not very familiar with postgres.
Thanks,
Alberto
You do not have the required permissions to view the files attached to this post.
Re: Fullinstall script failing
Good morning Berto,
Did you run the installer as root? It might not be able to write the useradd and groupadd section as you can see repeated in your install.log:
Did you run the installer as root? It might not be able to write the useradd and groupadd section as you can see repeated in your install.log:
Code: Select all
Complete!
Fixing php-mcrypt bug...
Prerequisites installed OK
Adding users and groups...
useradd: cannot create directory /home/nagios
groupadd: group 'nagcmd' already exists
usermod: user 'nagios' does not exist
usermod: user 'nagios' does not exist
ERROR: User 'nagios' was not created - exiting.
Nagios XI Installation Log
==========================
DATE: Wed Oct 29 20:43:22 EDT 2014
DISTRO INFO:
RedHatEnterpriseServer
6.4
x86_64
THIS IS A NEW INSTALL!
INSTALLING:
full=2014R1.5
major=2014
minor=R1.5
releasedate=2014-10-01
release=408
Yum already configured - exiting.
Prereqs already installed - skipping...
Note: If you want to update the RPMs installed on this system, run 'yum update'
Adding users and groups...
useradd: cannot create directory /home/nagios
groupadd: group 'nagios' already exists
usermod: user 'nagios' does not exist
usermod: user 'nagios' does not exist
ERROR: User 'nagios' was not created - exiting.
Nagios XI Installation Log
==========================
DATE: Wed Oct 29 20:48:54 EDT 2014
DISTRO INFO:
RedHatEnterpriseServer
6.4
x86_64
THIS IS A NEW INSTALL!
INSTALLING:
full=2014R1.5
major=2014
minor=R1.5
releasedate=2014-10-01
release=408
Yum already configured - exiting.
Prereqs already installed - skipping...
Note: If you want to update the RPMs installed on this system, run 'yum update'
Adding users and groups...
useradd: cannot create directory /home/nagios
groupadd: group 'nagios' already exists
groupadd: group 'nagcmd' already exists
usermod: user 'nagios' does not exist
usermod: user 'nagios' does not exist
ERROR: User 'nagios' was not created - exiting.
/Luke
Re: Fullinstall script failing
Hello,
Thank you for the quick response and yes, I'm running the script as root. As you can see in the error it does say "Sorry, user root is not allowed to execute '/usr/bin/psql -c create user nagiosxi with password 'n@gweb';' as postgres on lnsvr0620
Thank you for the quick response and yes, I'm running the script as root. As you can see in the error it does say "Sorry, user root is not allowed to execute '/usr/bin/psql -c create user nagiosxi with password 'n@gweb';' as postgres on lnsvr0620
Re: Fullinstall script failing
Can you run this and include the command when you respond:
It is possible that the CentOS 6.4 install you are using may have already had postgres installed and configured already. Is this install of CentOS an enterprise image with some pre-configured packages?
Code: Select all
groups postgres | cut -d':' -f2/Luke
Re: Fullinstall script failing
Hello,
I ran what you requested and this is what I got returned;
[root@lnsvr0620 nagiosxi]# groups postgres | cut -d':' -f2
postgres
This was a fresh build of RHEL 6.4 and it has pretty much the standard packages like sendmail, virt-manager, etc as we don't install all the packages that come with RHEL 6.4, so postgres package wouldn't have even been part of our kickstart. There are no pre-configured packages and i doubled check my kickstart file to make sure that was still valid.
I ran what you requested and this is what I got returned;
[root@lnsvr0620 nagiosxi]# groups postgres | cut -d':' -f2
postgres
This was a fresh build of RHEL 6.4 and it has pretty much the standard packages like sendmail, virt-manager, etc as we don't install all the packages that come with RHEL 6.4, so postgres package wouldn't have even been part of our kickstart. There are no pre-configured packages and i doubled check my kickstart file to make sure that was still valid.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Fullinstall script failing
The only two lines that would cause this are in nagiosxi/create_postgres.sh. They look like:
Since it is attempting to run as root, we likely have an issue with the postgres user.
Code: Select all
sudo -u postgres psql -c "create user nagiosxi with password 'n@gweb';"
sudo -u postgres psql -c "create database nagiosxi owner nagiosxi;"Code: Select all
grep -i 'nag' /etc/group
grep -i 'posgres' /etc/group
grep -i 'posgres' /etc/passwdNagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Fullinstall script failing
Berto,
I would definitely try this again on your system from the beginning. If you run the fullinstall and there errors and you keep running the install and or upgrade script on top of everything that has been done it won't be a dependable installation. Until you can run the fullinstall without any errrors the whole way through these kind of user and group writing problems surface.
Use your install log that you provided and check each stage where you had to make a change to get a section to run successfully. These changes should be done prior to running the install so that the install can run cleanly at one time.
I run a full installation of Nagios XI on CentOS 6.5 at least every other week for testing. The CentOS package I use is the minimal ISO file from the CentOS website and the installer runs cleanly every time on VM workstation. Running a VM to test the your install is very convenient with the ability to snapshot a VM and revert back to it before the installation ran so you can deal with issues.
Once you try this again come back and post your results and we make sure you get it installed and running- then monitor whatever you desire!
Good Luck,
Luke
I would definitely try this again on your system from the beginning. If you run the fullinstall and there errors and you keep running the install and or upgrade script on top of everything that has been done it won't be a dependable installation. Until you can run the fullinstall without any errrors the whole way through these kind of user and group writing problems surface.
Use your install log that you provided and check each stage where you had to make a change to get a section to run successfully. These changes should be done prior to running the install so that the install can run cleanly at one time.
I run a full installation of Nagios XI on CentOS 6.5 at least every other week for testing. The CentOS package I use is the minimal ISO file from the CentOS website and the installer runs cleanly every time on VM workstation. Running a VM to test the your install is very convenient with the ability to snapshot a VM and revert back to it before the installation ran so you can deal with issues.
Once you try this again come back and post your results and we make sure you get it installed and running- then monitor whatever you desire!
Good Luck,
Luke
/Luke
Re: Fullinstall script failing
I will try again the fullinstall on a clean system again and let you guys know what happens.
Re: Fullinstall script failing
Great, keep us posted.
Re: Fullinstall script failing
Hello,
Well I was able to successfully run the fullinstall script! I decided to build a new server with RHEL6.5 (in our environment RHEL6.4 is our "standard") and after just getting an error about not being in the proper channel, i placed the server in the proper channel and the script went through with no hitches and was able to see the completion.
Berto
Well I was able to successfully run the fullinstall script! I decided to build a new server with RHEL6.5 (in our environment RHEL6.4 is our "standard") and after just getting an error about not being in the proper channel, i placed the server in the proper channel and the script went through with no hitches and was able to see the completion.
Berto