Page 2 of 2

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Posted: Tue Aug 25, 2015 4:00 am
by helloworld304423
Hmm, the folder in tmp was already deleted, but I've recompiled and installed it over the current install - still those three files are not updated.
I've tried to pull the three files out of the tar and renamed it from trends.c to trends.cgi and moved it into the /sbin folder, but that didn't worked as well. In apache.log I get the error below:

Code: Select all

apache2/error.log
[Tue Aug 25 10:39:41 2015] [error] [client 10.215.21.152] (8)Exec format error: exec of '/usr/local/nagios/sbin/trends.cgi' failed, referer: http://10.215.10.16/nagios/side.php
[Tue Aug 25 10:39:41 2015] [error] [client 10.215.21.152] Premature end of script headers: trends.cgi, referer: http://10.215.10.16/nagios/side.php

Code: Select all

config.log
69 gcc: error: unrecognized option '-V'
70 gcc: fatal error: no input files
112 conftest.c:8:28: fatal error: ac_nonexistent.h: No such file or directory
128 conftest.c:8:28: fatal error: ac_nonexistent.h: No such file or directory
348 conftest.c:68:20: fatal error: socket.h: No such file or directory
423 conftest.c:35:20: fatal error: socket.h: No such file or directory
587 conftest.c:84:17: fatal error: uio.h: No such file or directory
678 conftest.c:51:17: fatal error: uio.h: No such file or directory
775 conftest.c:92:21: error: expected expression before ')' token
880 conftest.c:92:20: error: expected expression before ')' token
985 conftest.c:92:21: error: expected expression before ')' token
1088 conftest.c:62:1: error: void value not ignored as it ought to be
1716 conftest.c:105:18: fatal error: ltdl.h: No such file or directory
1828 conftest.c:72:18: fatal error: ltdl.h: No such file or directory

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Posted: Tue Aug 25, 2015 12:02 pm
by tgriep
Copying the .c files over won't work. They need to be compiled.
Try going through the instructions in this link to see if you can recompile Nagios and the 3 cgi scripts are updated.
http://geekpeek.net/install-nagios-core-4-on-ubuntu/

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Posted: Wed Aug 26, 2015 9:31 am
by helloworld304423
Re-compiling on another machine didn’t do the trick. I digged around in mail-archive and read something about trying to run the cgi from the console and a more specific error came around.
But libgd2 is installed on that machine :(

Code: Select all

./trends.cgi: error while loading shared libraries: libgd.so.3: cannot open shared object file: No such file or directory

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Posted: Wed Aug 26, 2015 5:04 pm
by ssax
Please recompile and attach the full output so that we can dig through it.

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Posted: Thu Aug 27, 2015 2:39 am
by helloworld304423
Ha.
I've recompiled it Nagios on the Nagios host and now it is working.
The only difference I have made is instead using the nagios account (not in sudoers) I've used our normal Linux account with sudo. Now it's working.

Thanks!

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Posted: Thu Aug 27, 2015 9:09 am
by hsmith
helloworld304423 wrote:Ha.
I've recompiled it Nagios on the Nagios host and now it is working.
The only difference I have made is instead using the nagios account (not in sudoers) I've used our normal Linux account with sudo. Now it's working.

Thanks!
Glad to hear it worked, and will definitely keep an eye out for this in the future. Am I all right to mark this one resolved and close it?

Re: Upgrade from 3.x to 4.0.8 - maps/trends not working

Posted: Thu Aug 27, 2015 9:13 am
by helloworld304423
Thanks for all your help with this one!
You can mark this one as resolved.