Thread: [Nagios-db-devel] Segfault
Status: Beta
Brought to you by:
bench23
From: Kevin M. <km...@te...> - 2005-07-11 21:35:42
|
Im currently using a redhat ES 4 box with Nagios 2.0 beta 3 with Nagios-db-0.91 =20 I have nagios up and running perfectly. Ive unpacked and modified the make file and inserter.c with the correct information Everything compiles without error Ive put the inserter.o into /usr/local/nagios/neb and modified the nagios.cfg to point to this this. When I start up nagios it segfaults and in the nagios log I have the following =20 [1121118074] Nagios 2.0b3 starting... (PID=3D1825) [1121118074] LOG VERSION: 2.0 [1121118074] initializing nagios-db postgres inserter... [1121118074] nagios-db: inserter locked into db [1121118074] Event broker module '/usr/local/nagios/neb/inserter.o' initialized successfully. [1121118074] nagios-db: couldn't clear config info () [1121118074] nagios-db: couldn't configure host using 'nagios-db: couldn't configure host using 'nagios-db: couldn't configure host usi' () [1121118074] nagios-db: configured 1 hosts [1121118074] nagios-db: couldn't configure hostgroup using 'nagios-db: couldn't configure hostgroup using 'nagios-db: couldn't configure hostgroup using 'nagios-db: couldn't configure ho' () [1121118074] Caught SIGSEGV, shutting down... =20 =20 Ive tried the current version from CVS and during the compile i receieve =20 =20 In file included from pgwrapper.c:7: /install/nagios-2.0b3/include/../include/common.h:310:1: warning: "TRUE" redefined In file included from /usr/lib/glib-2.0/include/glibconfig.h:9, from /usr/include/glib-2.0/glib/gtypes.h:30, from /usr/include/glib-2.0/glib/galloca.h:30, from /usr/include/glib-2.0/glib.h:30, from pgwrapper.h:4, from pgwrapper.c:5: /usr/include/glib-2.0/glib/gmacros.h:147:1: warning: this is the location of the previous definition In file included from pgwrapper.c:7: /install/nagios-2.0b3/include/../include/common.h:311:1: warning: "FALSE" redefined In file included from /usr/lib/glib-2.0/include/glibconfig.h:9, from /usr/include/glib-2.0/glib/gtypes.h:30, from /usr/include/glib-2.0/glib/galloca.h:30, from /usr/include/glib-2.0/glib.h:30, from pgwrapper.h:4, from pgwrapper.c:5: /usr/include/glib-2.0/glib/gmacros.h:143:1: warning: this is the location of the previous definition In file included from /install/nagios-2.0b3/include/../include/objects.h:31, from /install/nagios-2.0b3/include/../include/nebstructs.h:30, from inserter.c:11: /install/nagios-2.0b3/include/../include/common.h:310:1: warning: "TRUE" redefined In file included from /usr/lib/glib-2.0/include/glibconfig.h:9, from /usr/include/glib-2.0/glib/gtypes.h:30, from /usr/include/glib-2.0/glib/galloca.h:30, from /usr/include/glib-2.0/glib.h:30, from pgwrapper.h:4, from inserter.c:6: /usr/include/glib-2.0/glib/gmacros.h:147:1: warning: this is the location of the previous definition In file included from /install/nagios-2.0b3/include/../include/objects.h:31, from /install/nagios-2.0b3/include/../include/nebstructs.h:30, from inserter.c:11: /install/nagios-2.0b3/include/../include/common.h:311:1: warning: "FALSE" redefined In file included from /usr/lib/glib-2.0/include/glibconfig.h:9, from /usr/include/glib-2.0/glib/gtypes.h:30, from /usr/include/glib-2.0/glib/galloca.h:30, from /usr/include/glib-2.0/glib.h:30, from pgwrapper.h:4, from inserter.c:6: /usr/include/glib-2.0/glib/gmacros.h:143:1: warning: this is the location of the previous definition It looks like it compiles fine however this causes nagios to SegFault right away =20 Any support for either of these versions would be greatly appreciated. =20 |
From: Ben <be...@si...> - 2005-07-11 23:37:58
|
Ah, yes, this problem. I knew there were some good fixes in CVS that weren't in a released version. I recall that Ethan "recently" made a checkin to nagios which fixed the compile warnings you're seeing. I don't honestly remember what else it fixed. Do you have a recent version of Nagios? Do you have a recent cvs version of nagios? On Mon, 11 Jul 2005, Kevin Mau wrote: > Im currently using a redhat ES 4 box with Nagios 2.0 beta 3 with > Nagios-db-0.91 > > I have nagios up and running perfectly. > Ive unpacked and modified the make file and inserter.c with the correct > information > Everything compiles without error > Ive put the inserter.o into /usr/local/nagios/neb and modified the > nagios.cfg to point to this this. > When I start up nagios it segfaults and in the nagios log I have the > following > > [1121118074] Nagios 2.0b3 starting... (PID=1825) > [1121118074] LOG VERSION: 2.0 > [1121118074] initializing nagios-db postgres inserter... > [1121118074] nagios-db: inserter locked into db > [1121118074] Event broker module '/usr/local/nagios/neb/inserter.o' > initialized successfully. > [1121118074] nagios-db: couldn't clear config info () > [1121118074] nagios-db: couldn't configure host using 'nagios-db: > couldn't configure host using 'nagios-db: couldn't configure host usi' > () > [1121118074] nagios-db: configured 1 hosts > [1121118074] nagios-db: couldn't configure hostgroup using 'nagios-db: > couldn't configure hostgroup using 'nagios-db: couldn't configure > hostgroup using 'nagios-db: couldn't configure ho' () > [1121118074] Caught SIGSEGV, shutting down... > > > Ive tried the current version from CVS and during the compile i receieve > > > In file included from pgwrapper.c:7: > /install/nagios-2.0b3/include/../include/common.h:310:1: warning: "TRUE" > redefined > In file included from /usr/lib/glib-2.0/include/glibconfig.h:9, > from /usr/include/glib-2.0/glib/gtypes.h:30, > from /usr/include/glib-2.0/glib/galloca.h:30, > from /usr/include/glib-2.0/glib.h:30, > from pgwrapper.h:4, > from pgwrapper.c:5: > /usr/include/glib-2.0/glib/gmacros.h:147:1: warning: this is the > location of the previous definition > In file included from pgwrapper.c:7: > /install/nagios-2.0b3/include/../include/common.h:311:1: warning: > "FALSE" redefined > In file included from /usr/lib/glib-2.0/include/glibconfig.h:9, > from /usr/include/glib-2.0/glib/gtypes.h:30, > from /usr/include/glib-2.0/glib/galloca.h:30, > from /usr/include/glib-2.0/glib.h:30, > from pgwrapper.h:4, > from pgwrapper.c:5: > /usr/include/glib-2.0/glib/gmacros.h:143:1: warning: this is the > location of the previous definition > In file included from > /install/nagios-2.0b3/include/../include/objects.h:31, > from > /install/nagios-2.0b3/include/../include/nebstructs.h:30, > from inserter.c:11: > /install/nagios-2.0b3/include/../include/common.h:310:1: warning: "TRUE" > redefined > In file included from /usr/lib/glib-2.0/include/glibconfig.h:9, > from /usr/include/glib-2.0/glib/gtypes.h:30, > from /usr/include/glib-2.0/glib/galloca.h:30, > from /usr/include/glib-2.0/glib.h:30, > from pgwrapper.h:4, > from inserter.c:6: > /usr/include/glib-2.0/glib/gmacros.h:147:1: warning: this is the > location of the previous definition > In file included from > /install/nagios-2.0b3/include/../include/objects.h:31, > from > /install/nagios-2.0b3/include/../include/nebstructs.h:30, > from inserter.c:11: > /install/nagios-2.0b3/include/../include/common.h:311:1: warning: > "FALSE" redefined > In file included from /usr/lib/glib-2.0/include/glibconfig.h:9, > from /usr/include/glib-2.0/glib/gtypes.h:30, > from /usr/include/glib-2.0/glib/galloca.h:30, > from /usr/include/glib-2.0/glib.h:30, > from pgwrapper.h:4, > from inserter.c:6: > /usr/include/glib-2.0/glib/gmacros.h:143:1: warning: this is the > location of the previous definition > > It looks like it compiles fine however this causes nagios to SegFault > right away > > Any support for either of these versions would be greatly appreciated. > > |
From: Lindsay W. <li...@ul...> - 2005-07-11 23:47:42
|
I'm not sure about the seg fault but I certainly got the same error message when I had not altered inerter.c to use the correct host, port number and DB username. After doing that and recompiling it started to work. Search for 'connect' or 'Connect' in inserter.c. I couldn't find a way to add a password (I'm sure it's possible, just need to better understand PQConnect?) so I just set up a passwordless DB account. The above instructions are for the 0.9.1 release. CVS does things completely differently and I believe you provide arguments in the nagios.cfg when calling the inserter.o to authenticate to the DB, though I've not had time to test that out yet. Hope that helps. Lindsay Kevin Mau wrote: > Im currently using a redhat ES 4 box with Nagios 2.0 beta 3 with > Nagios-db-0.91 > > I have nagios up and running perfectly. > Ive unpacked and modified the make file and inserter.c with the correct > information > Everything compiles without error > Ive put the inserter.o into /usr/local/nagios/neb and modified the > nagios.cfg to point to this this. > When I start up nagios it segfaults and in the nagios log I have the > following > > [1121118074] Nagios 2.0b3 starting... (PID=1825) > [1121118074] LOG VERSION: 2.0 > [1121118074] initializing nagios-db postgres inserter... > [1121118074] nagios-db: inserter locked into db > [1121118074] Event broker module '/usr/local/nagios/neb/inserter.o' > initialized successfully. > [1121118074] nagios-db: couldn't clear config info () > [1121118074] nagios-db: couldn't configure host using 'nagios-db: > couldn't configure host using 'nagios-db: couldn't configure host usi' () > [1121118074] nagios-db: configured 1 hosts > [1121118074] nagios-db: couldn't configure hostgroup using 'nagios-db: > couldn't configure hostgroup using 'nagios-db: couldn't configure > hostgroup using 'nagios-db: couldn't configure ho' () > [1121118074] Caught SIGSEGV, shutting down... > > > Ive tried the current version from CVS and during the compile i receieve > > > In file included from pgwrapper.c:7: > /install/nagios-2.0b3/include/../include/common.h:310:1: warning: "TRUE" > redefined > In file included from /usr/lib/glib-2.0/include/glibconfig.h:9, > from /usr/include/glib-2.0/glib/gtypes.h:30, > from /usr/include/glib-2.0/glib/galloca.h:30, > from /usr/include/glib-2.0/glib.h:30, > from pgwrapper.h:4, > from pgwrapper.c:5: > /usr/include/glib-2.0/glib/gmacros.h:147:1: warning: this is the > location of the previous definition > In file included from pgwrapper.c:7: > /install/nagios-2.0b3/include/../include/common.h:311:1: warning: > "FALSE" redefined > In file included from /usr/lib/glib-2.0/include/glibconfig.h:9, > from /usr/include/glib-2.0/glib/gtypes.h:30, > from /usr/include/glib-2.0/glib/galloca.h:30, > from /usr/include/glib-2.0/glib.h:30, > from pgwrapper.h:4, > from pgwrapper.c:5: > /usr/include/glib-2.0/glib/gmacros.h:143:1: warning: this is the > location of the previous definition > In file included from /install/nagios-2.0b3/include/../include/objects.h:31, > from > /install/nagios-2.0b3/include/../include/nebstructs.h:30, > from inserter.c:11: > /install/nagios-2.0b3/include/../include/common.h:310:1: warning: "TRUE" > redefined > In file included from /usr/lib/glib-2.0/include/glibconfig.h:9, > from /usr/include/glib-2.0/glib/gtypes.h:30, > from /usr/include/glib-2.0/glib/galloca.h:30, > from /usr/include/glib-2.0/glib.h:30, > from pgwrapper.h:4, > from inserter.c:6: > /usr/include/glib-2.0/glib/gmacros.h:147:1: warning: this is the > location of the previous definition > In file included from /install/nagios-2.0b3/include/../include/objects.h:31, > from > /install/nagios-2.0b3/include/../include/nebstructs.h:30, > from inserter.c:11: > /install/nagios-2.0b3/include/../include/common.h:311:1: warning: > "FALSE" redefined > In file included from /usr/lib/glib-2.0/include/glibconfig.h:9, > from /usr/include/glib-2.0/glib/gtypes.h:30, > from /usr/include/glib-2.0/glib/galloca.h:30, > from /usr/include/glib-2.0/glib.h:30, > from pgwrapper.h:4, > from inserter.c:6: > /usr/include/glib-2.0/glib/gmacros.h:143:1: warning: this is the > location of the previous definition > It looks like it compiles fine however this causes nagios to SegFault > right away > > Any support for either of these versions would be greatly appreciated. > |