Hello,
I'm having issues updating our nagios to the latest version.
Version being used is 5.2.9 and here is the output:
---- Starting Nagios XI Upgrade ----
Cleaning up temp directory...
No entry for terminal type "unknown";
using dumb terminal settings.
No entry for terminal type "unknown";
using dumb terminal settings.
Log says:
Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Fixing php-mcrypt bug...
No entry for terminal type "unknown";
using dumb terminal settings.
==================
UPGRADE COMPLETED!
==================
This is what TERM variable is set to:
# echo $TERM
xterm-256color
so I changed that by executing the script manually:
[06:47:35] root@nagios:/usr/local/nagiosxi/scripts
# TERM=dumb bash upgrade_to_latest.sh
TL,DR: it failed again:
http://pastebin.com/tqDvn6qy
It appears there's an issue with column key.
ERROR 1060 (42S21) at line 5: Duplicate column name 'api_key'
P.S - we have an enterprise license so I'm not sure if this is something you can correct for us?
Thank you.
Upgrade issues
Re: Upgrade issues
It looks like because you failed out of the upgrade for whatever reason, you'll need to run it manually from the cmdline and edit the main config file.
Download the latest tarball -
Once you're inside that directory, remove lines 820-828 from the upgrade file in order to run the upgrade script once more - your MySQL has already been updated which is causing it to error out before finishing the upgrade. This should let us see what the real problem is with the upgrade.
Download the latest tarball -
Code: Select all
cd /tmp
rm -rf xi-*.tar.gz nagiosxi
wget https://assets.nagios.com/downloads/nagiosxi/5/xi-5.3.0.tar.gz
tar xf xi-5.3.0.tar.gz
cd nagiosxi
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
developerx9
- Posts: 20
- Joined: Sun Jun 05, 2016 9:07 am
Re: Upgrade issues
Hello,
After removing said line, installation fails on:
"Attempting to read global hard/soft nofile limits failed. Check /etc/security/limits.conf and try again!"
The issue is with the ./subcomponents/mrtg/increase_open_file_limits.sh script which incorrectly parses limits on CentOS 7 based installations. (Or at least in our case)
Here's the problem:
Since our limits is configured as:
The above code won't work as it'll return multiple values and not match an integer.
Changing the global_hard and global_soft variable resolved the issue:
Upgrade has finished and is working correctly now. I don't believe I'll be the only one with said problem so you might want to see if there's a more "stable" check for this.
Example:
should be just fine.
Thank you.
After removing said line, installation fails on:
"Attempting to read global hard/soft nofile limits failed. Check /etc/security/limits.conf and try again!"
The issue is with the ./subcomponents/mrtg/increase_open_file_limits.sh script which incorrectly parses limits on CentOS 7 based installations. (Or at least in our case)
Here's the problem:
Code: Select all
# check if global hard/soft limits are defined
if grep -q "^\*\s*hard" $limitfile && grep -q "^\*\s*soft" $limitfile; then
# if they are, we need to get their current values and increase them!
global_hard=$(grep "^\*\s*hard" $limitfile | awk '{ print $4 }')
global_soft=$(grep "^\*\s*soft" $limitfile | awk '{ print $4 }')
# make sure we got sane [numeric] values
if ! [[ $global_hard =~ $numcheck && $global_soft =~ $numcheck ]]; then
echo "Attempting to read global hard/soft nofile limits failed. Check $limitfile and try again!" >&2
exit 1
fiCode: Select all
root soft nofile 100000
root hard nofile 100000
* soft sigpending 14791
* hard sigpending 14791
* soft stack 10240
* hard stack 10240
* soft nproc 14791
* hard nproc 14791
Changing the global_hard and global_soft variable resolved the issue:
Code: Select all
global_hard=$(grep -E 'root|nofile' $limitfile | grep hard| grep -ve "\*" -ve "#" | awk '{print $4}')
global_soft=$(grep -E 'root|nofile' $limitfile | grep soft| grep -ve "\*" -ve "#" | awk '{print $4}')Example:
Code: Select all
global_hard=$(ulimit -Hn) Thank you.
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Upgrade issues
developerx9,
The issue has been fixed from our end. Thanks for taking the time to delve into this. Are we good to close this thread now?
The issue has been fixed from our end. Thanks for taking the time to delve into this. Are we good to close this thread now?
Previous Nagios employee
-
developerx9
- Posts: 20
- Joined: Sun Jun 05, 2016 9:07 am
Re: Upgrade issues
Hey avandemore,
We're good. Thank you
We're good. Thank you