Page 2 of 4
Re: Report fetching error
Posted: Tue Feb 18, 2020 8:27 am
by progressive.nagiosXI
Hi
we use same documentation for nagios core and mod-gearman upgrade but getting below error
Stopping nagios: No lock file found in /run/nagios.lock {cd subcomponents/nagioscore ==> ./upgrade}
ERROR {./ModGearmanInstall.sh --type=server}
Found references to Mod Gearman 2 in /usr/local/nagios/etc/nagios.cfg
we used below commands
==================>>
Server Installation – Upgrade (2 => 3)
# Remove Mod Gearman 2
cp /etc/mod_gearman2/* /tmp/
yum remove gearmand gearmand-server gearmand-debuginfo gearmand-devel mod_gearman2 -y
sed -i 's/^broker\(.*\)gearman2\(.*\)/#broker\1gearman2\2/' /usr/local/nagios/etc/nagios.cfg
# Upgrade Nagios Core
cd /tmp
rm -rf nagiosxi xi* ModGearmanInstall.sh
wget
https://assets.nagios.com/downloads/nag ... est.tar.gz
tar xzf xi-latest.tar.gz
cd nagiosxi
./init.sh
cd subcomponents/nagioscore
./upgrade
# Download and install Mod Gearman 3
cd /tmp
wget
https://assets.nagios.com/downloads/nag ... Install.sh
chmod +x ModGearmanInstall.sh
./ModGearmanInstall.sh --type=server
Re: Report fetching error
Posted: Tue Feb 18, 2020 10:08 am
by tgriep
The output of the script has the details needed to fix the issue when upgrading Mod Gearman.
Edit the /usr/local/nagios/etc/nagios.cfg file and delete the Mod Gearman broker line from the file.
Don't just comment is out, completely remove it.
Then Rerun this script without the --upgrade option.
Code: Select all
./ModGearmanInstall.sh --type=server
The nagios.lock file message.
THe nagios.cfg file has the location of the lock file set to the following.
Check the nagios init script
and verify that this is set to the following
Code: Select all
NagiosRunFile=/var/run/nagios.lock
Re: Report fetching error
Posted: Thu Feb 20, 2020 12:29 pm
by progressive.nagiosXI
Hi
NOTE:- we take 2 success apply configuration before performing below update activity and their is no error in configuration.
====================>>
getting below php error when run init .sh
[root@monitoring-nagiosxi tmp]# tar xzf xi-latest.tar.gz
[root@monitoring-nagiosxi tmp]# cd nagiosxi
[root@monitoring-nagiosxi nagiosxi]# ./init.sh
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/newrelic.so' - /usr/lib64/php/modules/newrelic.so: cannot open shared object file: No such file or directory in Unknown on line 0
still lock file issue not resolved unable to update core
Stopping nagios: No lock file found in /run/nagios.lock
Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.
After error we checked lock files
[root@monitoring-nagiosxi tmp]#
grep nagios.lock /etc/init.d/nagios
NagiosRunFile=/var/run/nagios.lock
[root@monitoring-nagiosxi tmp]#
grep nagios.lock /usr/local/nagios/etc/nagios.cfg
lock_file=/var/run/nagios.lock
[root@monitoring-nagiosxi tmp]#
service nagios status
No lock file found in /var/run/nagios.lock
Thanks
Re: Report fetching error
Posted: Thu Feb 20, 2020 5:52 pm
by tgriep
This error is for some missing PHP module that is not needed and is not part of an Nagios install.
Unable to load dynamic library '/usr/lib64/php/modules/newrelic.so'
You can remove the php module config file from the syste,
run this as root
What ever file shows up, delete it.
Restart nagios by running the following as root
If it does not start, look in the bottom of the /usr/local/nagios/var/nagios.log and the /var/log/messages file to see why it did not start up and post the error here.
Re: Report fetching error
Posted: Wed Feb 26, 2020 10:37 am
by progressive.nagiosXI
Hi
NOTE:- we take success apply configuration before performing below update activity and their is no error in apply configuration.
Please find attached requested log file after nagios core update error
When updating mod gearman we are getting configuration error (log2.txt) but apply config given no any error
@Team for this activity we need to create new VM from fresh Nagiosxi snapshot in cloud which is costly we don't do this everyday.
Please help to resolve this earliest
installation and error log shared in PM ==> tgriep
Thanks
Re: Report fetching error
Posted: Wed Feb 26, 2020 3:03 pm
by tgriep
The objects in the Core Config Manager are not in sync with the running config and there is a configuration error which is causing the Nagios process from starting.
Look in the log2.txt file on line 591 and you will see a configuration error for a service group.
That has to be fixed before the upgrade can complete.
That will also cause Nagios from starting up.
To fix that, login to the XI GUI and go to the Core Config Manager
Under "Tools", click "Write Config Files" or if you are running a newer versions of XI, The menu is called "Config File Management"
Click on the "Write" button, then the "Delete" button then click the "Write" button and then the "Verify" button.
If you get any errors, resolve them and click on the "Delete" button, "Write", "Verify" until all of the errors are resolved.
Click the Apply Configuration link and click the "Apply Configuration" button after ALL of the errors are resolved.
Re: Report fetching error
Posted: Thu Feb 27, 2020 2:22 pm
by progressive.nagiosXI
Hi
As we already write in above trail blog we don't get any apply configuration fail error before nagios core update of such type.
we also check with below command before core update and found not any error
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
[/i]
we check and find whatever error its showing is fake
its showing error again and again randomly which was actually not.
in last
==>>we delete all service group,all hostgroup ,all host ,all services in nagiosxi
==>>then add one dummy host and its related service
==>> run apply configuration .
here apply configuration runs successfully
all System Component Status showing ok.PFA
Now we check nagios service status and found its not running and give lock file not found error
we create lock file via touch command in same location and nagios user,group permission but that also doesn't help
Note:- we only able to run service nagios restart command if we create lock file via manually otherwise it gives error lock file not found.
Thanks
Re: Report fetching error
Posted: Thu Feb 27, 2020 2:43 pm
by tgriep
You should never have to create the nagios.lock file manually, the nagios process should do it unless the permissions are set so it cannot do so.
Get this file from the nagios server and post it.
Run the following in a shell and post the output.
Code: Select all
ps -ef --cols=300 |grep nagios.cfg
systemctl status nagios
chage -l nagios
grep nag /etc/group
ls -l /
ls -l /var
ls -l /var/run
umask
su - nagios
umask
One thing, your server is running Redhat 7 and when you run service restart nagios, it will not update the status correctly in the GUI and it will show that the engine is not running.
Use the systemctl commands for starting, stopping, which should show the status in the GUI correctly.
Code: Select all
systemctl stop nagios
systemctl start nagios
systemctl status nagios
Re: Report fetching error
Posted: Mon Mar 02, 2020 11:48 am
by progressive.nagiosXI
Hi
Today we successfully upgrade nagios core to 4.4.5 and mod-gearman to version 3 with all running.
but we are still getting report authentication error when updating nagiosxi version from 5.6.8 to latest 5.6.12
initially when we update nagios core we are on nagiosxi version 5.6.8 here we are not facing any issue in any user.but after nagiosxi update we are getting autherization error.
Note:- if we downgrade to 5.6.8 everything is fine not facing any authentication issue(we do this practically today).
download :-
https://assets.nagios.com/downloads/nag ... 6.8.tar.gz
and execute update
error snapshots and latest profile shared in PM ==> tgriep
in user dashboard service graph icon also not showing
Thanks
Re: Report fetching error
Posted: Mon Mar 02, 2020 2:06 pm
by tgriep
Login as the user in question and go to the Reports menu, in the Legacy Reports section, can you run the Legacy version of the Availability report?
I am guessing that you are accessing the server through some sort of device as the IP address in the Program and External URL is different that the IP address of the server.
Can you see if that is blocking the report?
I do see a use account issue, the welcompack account has a space on the end of the username, edit the username and remove the space from the end.
Also, get the following file and PM it to me.
Code: Select all
/usr/local/nagiosxi/etc/htpasswd.users