Problem staring nagios
Stanley Hopcroft
Stanley.Hopcroft at IPAustralia.Gov.AU
Wed Dec 11 09:57:13 CET 2002
Dear Sir,
I am forwarding the back trace to the list, hoping that others will
correct my mistakes or have better ideas.
On Wed, Dec 11, 2002 at 04:37:04PM +1000, Gawain Osborne wrote:
> Hi Stanley,
>
> I did not get a core file, so I tried the below witout the -c switcc and this is what I got:
>
> [root at pa-linux-01 nagios]# gdb /usr/local/nagios/bin/nagios
> GNU gdb 5.2.1-2mdk (Mandrake Linux)
> Copyright 2002 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "i586-mandrake-linux-gnu"...
> (no debugging symbols found)...
> (gdb) set args -v /usr/local/nagios/etc/nagios.cfg
> (gdb) r
> Starting program: /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
> (no debugging symbols found)...(no debugging symbols found)...
> (no debugging symbols found)...(no debugging symbols found)...
> (no debugging symbols found)...(no debugging symbols found)...
> (no debugging symbols found)...(no debugging symbols found)...
> Program received signal SIGSEGV, Segmentation fault.
> 0x4010638f in PerlIO_stdoutf ()
> from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so
> (gdb) bt
> #0 0x4010638f in PerlIO_stdoutf ()
> from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so
> #1 0x08051285 in main ()
> #2 0x401a2082 in __libc_start_main () from /lib/i686/libc.so.6
> (gdb) quit
> The program is running. Exit anyway? (y or n) n
> Not confirmed.
> (gdb) quit
> The program is running. Exit anyway? (y or n) y
>
> This is how I tried to start nagios and the report i got:
> [root at pa-linux-01 nagios]# /etc/rc.d/init.d/nagios start
> Starting network monitor: nagios
> No lock file found in /usr/local/nagios/var/nagios.lock
>
> I got the same as below in the log file, any help???
>
> Cheers,
>
> Gawain ;-)
>
My interpretation of the back trace is
1 Your Nagios has not been compiled with debugging symbols.
This is not the case for mine. Yours may well have been compiled
differently since I think CFLAGS="-g -O2" is the default (in configure).
==> This Nagios may have originated from an RPM or package since it was
built differently than what is usually the case if built from source.
(Sorry this is wrong. Did you build from source ?)
That being the case, it may have been compiled with Perl support.
2 The fault occured in libperl.so, the standard Perl shared library.
This was apparently called from the Nagios main() function (after it was
loaded by libc.so.6)
Why this was called is a big mystery to me.
Please would you post any output from (as root) :-
/usr/local/nagios/bin/nagios -m
(Here's mine
tsitc# /usr/local/nagios/bin/nagios -m
Nagios 1.0
Copyright (c) 1999-2002 Ethan Galstad (nagios at nagios.org)
Last Modified: 11-24-2002
License: GPL
External Data I/O
-----------------
Object Data: TEMPLATE
Status Data: DEFAULT
Retention Data: DEFAULT
Comment Data: DEFAULT
Downtime Data: DEFAULT
Performance Data: DEFAULT
Options
-------
* Embedded Perl compiler (With caching)
tsitc#
This Nagios uses Perl.)
If yours shows 'Embedded Perl compiler', please consider
1 Download the source from http://www.Nagios.ORG
2 Build it as documented and install the binary only. My understanding
is that you have __no__ functional Nagios in /usr/local/nagios/bin.
If that's not the case, then proceed at your own risk and exercise due
diligence - if I suggest cd / && rm -rF *, don't do it.
(ie ./configure (making sure that messages show that the gd libraries
and headers are found)
make all
Then, __manually__ install the base/nagios binary (cp base/nagios
/usr/local/nagios/bin/ or something like it.
This means that the debugging symbols are not stripped.)
3 Try starting it manually - forget /etc/rc/nagios.init or whatever.
Try /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg.
If it works, replace -v with -d.
Otherwise, post the backtrace again.
If your Nagios does __not__ show a Perl option, then I cannot offer any
more help.
Does perl work on your system (eg perl -e 'print "Hello world.\n"') ?
If not, then you probably should deal with it. If Netsaint is built
without it, it should be functional but lots of other things won't (on a
FreeBSD system Perl is used to in the rebuild the kernel process).
Lstly, Nagios works well. There is something unfortunate about your
situation that is causing this problem. All it needs is finding it.
Yours sincerely.
--
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------
'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'
from Meditation 17, J Donne.
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
More information about the Users
mailing list