Installed this on our test box a few weeks ago no problem, but I'm running into some issues on the production server. Not sure what the issue is. Don't know if any of this info will help, but here is the end of the installation script (it was failing when upgrading in the GUI so I did it the old fashioned way. I also don't appear to be able to download a profile, so that's a bit of an issue.
*** Main program, CGIs and HTML files installed ***
You can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):
make install-init
- This installs the init script in /etc/init.d
make install-commandmode
- This installs and configures permissions on the
directory for holding the external command file
make install-config
- This installs sample config files in /usr/local/nagios/etc
make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/nagioscore/nagios-4.4.2'
Stopping nagios: ..........................................................................................
Warning - nagios did not exit in a timely manner - Killing it!
Stopping nagios: No lock file found in /var/run/nagios.lock
Starting nagios: touch: cannot touch `/usr/local/nagios/var/nagios.configtest': Permission denied
ERROR: Could not create or update '/usr/local/nagios/var/nagios.configtest'
Last edited by snapon_admin on Thu Oct 04, 2018 3:27 pm, edited 1 time in total.
sestatus
umask
ls -lad /usr/local/nagios /usr/local/nagios/var/
grep nagios.lock /etc/init.d/nagios /usr/local/nagios/etc/nagios.cfg
grep gearman /usr/local/nagios/etc/nagios.cfg
service nagios stop
killall nagios
service nagios start
service nagios status
Be sure to check out our Knowledgebase for helpful articles and solutions!
Also, with it being near the end of business today I am content with not installing the update for now and just getting this back up and working. It's critical that I get this back to normal at minimum as soon as possible.
What is the backup that you tried to restore to? Are you sure that this was a "good" backup, and was not corrupted? It looks like it failed to restore...
Try fixing the mismatch in the path to the nagios.lock file. Open the "/etc/init.d/nagios" in a text editor and change this:
Restoring Nagvis backups...
Restoring MySQL databases...
ERROR 1010 (HY000) at line 22: Error dropping database (can't rmdir './nagios/', errno: 17)
Error restoring MySQL database 'nagios' - check the password in this script!
We haven't changed any passwords though so I have no idea how to fix this.
Edited the files and followed your instructions, this is what I get:
[root@lisl-ngos-01-pv nagiosxi]# service nagios start
Starting nagios: done.
[root@lisl-ngos-01-pv nagiosxi]# service nagios status
nagios is not running
Nah, I'm working on what you put there. I'm ok with updating either the ticket or this thread, whichever is easier. I just need to make sure this is fixed quickly, that's the only reason I opened both. Sort of a "open both and see which gets a response quickest" kind of thing. For the sake of efficiency, though, I think it'd be best to stick with one or the other. I'll just reply to the ticket when this current backup restore attempt is finished.
Check the root password in the /root/scripts/automysqlbackup file - is this the one that you are using? Can you log in the db with this password?
Example: