unable to start Nagios service

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
admin
Site Admin
Posts: 256
Joined: Mon Oct 12, 2009 8:21 am

Re: unable to start Nagios service

Post by admin »

It sounds like the Nagios XI Postgres database didn't get initialized. This should have been accomplished in the following step:

Code: Select all

./B-installxi
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Ethan Galstad
President
ericsson_att
Posts: 23
Joined: Mon Nov 01, 2010 11:07 am

Re: unable to start Nagios service

Post by ericsson_att »

[m]0;root@ltenav1:~/nagios/nagiosxi[root@ltenav1 nagiosxi]# ./B-installxi
Creating product directory...
Adding password for user nagiosadmin
-bash: /root/nagios/nagiosxi/nagiosxi/create_postgres_db.sh: Permission denied
Stopping postgresql service: [60G[[0;32m OK [0;39m]

Starting postgresql service: [60G[[0;32m OK [0;39m]

psql: FATAL: database "nagiosxi" does not exist
psql: FATAL: database "nagiosxi" does not exist
You can usually ignore SQL import error/warning messages.
Step completed.
ericsson_att
Posts: 23
Joined: Mon Nov 01, 2010 11:07 am

Re: unable to start Nagios service

Post by ericsson_att »

I see this error-

-bash: /root/nagios/nagiosxi/nagiosxi/create_postgres_db.sh: Permission denied

Do you think I can manually execute this step to initialize the nagiosxi database?
ericsson_att
Posts: 23
Joined: Mon Nov 01, 2010 11:07 am

Re: unable to start Nagios service

Post by ericsson_att »

I see that the B-installxi scripts has the following cmd-

su - postgres -c create_postgres_db.sh

But Nagiosxi has been installed as root, hence the create_postgres_db.sh file is owned by root.

Should we re-run B-installxi by giving appropriate permission to postgres user? or do you suggest running the create_postgres_db.sh as root.
User avatar
admin
Site Admin
Posts: 256
Joined: Mon Oct 12, 2009 8:21 am

Re: unable to start Nagios service

Post by admin »

Did you run the installer scripts as root, or as a non-root user? All scripts have to be run as root to ensure things get installed properly.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Ethan Galstad
President
ericsson_att
Posts: 23
Joined: Mon Nov 01, 2010 11:07 am

Re: unable to start Nagios service

Post by ericsson_att »

install scripts were run as root
ericsson_att
Posts: 23
Joined: Mon Nov 01, 2010 11:07 am

Re: unable to start Nagios service

Post by ericsson_att »

Is this something normal while executing ./E-importnagiosql?


CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/verify.php --post-data 'writeAdditional=Go' -O nagiosql.export.additional
OUTPUT:
Nagios Core 3.2.2
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 09-01-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Error: Cannot open config file '/usr/local/nagios/etc/contacttemplates.cfg' for reading: No such file or directory
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
RET: 254
/usr/local/nagiosxi/nom/checkpoints/nagioscore/errors ~/nagios/nagiosxi/nagiosxi/basedir/scripts
tar: Removing leading `/' from member names
~/nagios/nagiosxi/nagiosxi/basedir/scripts
ls: /usr/local/nagiosxi/nom/checkpoints/nagioscore/*.gz: No such file or directory
NO NOM SNAPSHOT FOUND!
~/nagios/nagiosxi
User avatar
admin
Site Admin
Posts: 256
Joined: Mon Oct 12, 2009 8:21 am

Re: unable to start Nagios service

Post by admin »

It sounds like several things went wrong along the way earlier in the install process. Not sure why things failed, but it looks like Postgres never got initialized, for one. Config import failed, and maybe other stuff too. If you can, it might be easier to either use the pre-configured VMware image that we have available for download, or setup a new CentOS instance and either we or you can attempt a fresh install.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Ethan Galstad
President
ericsson_att
Posts: 23
Joined: Mon Nov 01, 2010 11:07 am

Re: unable to start Nagios service

Post by ericsson_att »

Our team could somehow made Nagios XI work (by creating postgres db by running ./B script changing permissions and owner as desired and by creating all cfg files necessary that are missing manually and by editing with the required info). Not sure if that would suffice, but then, nothing works in the config tab on the right pane, all others seem to be working fine. This is of great concern at this time.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: unable to start Nagios service

Post by mguthrie »

It appears that you're running the install scripts from your /root directory. Copy the nagiosxi folder to your /tmp directory. The postgres table creation should work then. I'm testing the manual install on CentOS 5.5 as we speak.
Locked