NagiosXI Update to 2011R2.0

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
mikew
Posts: 243
Joined: Sun Feb 05, 2012 7:05 pm

NagiosXI Update to 2011R2.0

Post by mikew »

This was an upgrade from 2011R1.7 (that may make a difference) to 2011R2.0. Install went fine except for sourceguardian failed.

At this point I have no access to PHP for nagiosxi. However, if I do ip_address/nagios I can see and manage the Core pages.

Tried with PHP 5.1 and failed, then removed 5.1 and upgraded to PHP 5.3 and failed.

Removed all of /tmp/nagiosxi folder and created it again and tried upgrade again, same failure.

/var/log/httpd/error_log says " PHP Fatal error: Call to undefined function dl() in /usr/local/nagiosci/html/includes/dbl.inc.php which of course is a reference to soureguardian.
Mike Weber

Nagios Training/Consulting
asbjorn
Posts: 1
Joined: Thu Feb 02, 2012 6:13 am

Re: NagiosXI Update to 2011R2.0

Post by asbjorn »

I think I had the same issue happen for me, and after some digging around, it looks like the upgrade script for whatever reason decided that it should unzip and install the 32-bit SourceGuardian module on my 64-bit OS/server. My logs were being "spammed" with the exact same dl() error as you are getting.

If you want to check if this is the case, SSH to the machine, and run this command:

Code: Select all

file /usr/lib64/php/modules/ixed5.3.lin
This will tell you the file type of the file, and if you have the same issue as me, the output will be as below

Code: Select all

ixed.5.3.lin: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
This shows that the library is a 32-bit LSB shared object, all wrong for our 64-bit OS.

What I did was simply just unzip the supplied zip files and manually replace the library.

Code: Select all

cd /tmp
unzip /tmp/nagiosxi/sourceguardian/ixed4.lin.x86-64.zip
cp ixed.5.3.lin /usr/lib64/php/modules/ixed.5.3.lin
apachectl restart
If you now run the 'file' command snippet above, you should see a message similar to the one below.

Code: Select all

ixed.5.3.lin: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
As far as I can tell from some very quick debugging, this boils down to some problems with the /tmp/nagiosxi/upgrade script. This script executes some sub-scripts, one of which is the install-sourceguardian-extension.sh. The SG install scripts relies on some variables that are being set by init.sh, however, init.sh is never run by the upgrade script as far as I can tell, it seems to only be run by the install script, thus causes the issues with the SourceGuardian library.

The problematic bit is this part of the "install-sourceguardian-extension.sh", because $arch isn't being set before the script is run, and thus defaulting to extracting the 32-bit zipfile.

Code: Select all

if [ "$arch" = "x86_64" ]; then
   zipfile="sourceguardian/ixed4.lin.x86-64.zip"
else
   zipfile="sourceguardian/ixed4.lin.x86-32.zip"
fi
Hope this will fix the issue for you as well,

Regards,
- Asbjørn
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXI Update to 2011R2.0

Post by scottwilkerson »

Asbjørn,

Thank you for digging into this.

I will be passing this on to our development team.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked