Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140211 - net-analyzer/nagios-nsca init script problem
Summary: net-analyzer/nagios-nsca init script problem
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Other
: High minor (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 172480
  Show dependency tree
 
Reported: 2006-07-13 03:38 UTC by Matteo Contri
Modified: 2007-08-17 01:16 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matteo Contri 2006-07-13 03:38:07 UTC
Hi,
i got a problem with version 2.5 of nsca (the bug was the author) and i decided to bump version.
I wonder that gentoo got the 2.6 version and the nagios mainstream only 2.5.2, but this is not the point.
When i launch the init script i receive an exit error (type 2), after some tries i discover that the problem was the option: "-c nagios:nagios" in the start part.
I don't use xinetd or similar to start this daemon then i set the uid:gid in the configuration (nsca.cfg):

# NSCA USER
# This determines the effective user that the NSCA daemon should run as.
# You can either supply a username or a UID.
#
# NOTE: This option is ignored if NSCA is running under either inetd or xinetd

nsca_user=nagios

# NSCA GROUP
# This determines the effective group that the NSCA daemon should run as.
# You can either supply a group name or a GID.
#
# NOTE: This option is ignored if NSCA is running under either inetd or xinetd

nsca_group=nagios

then i comment out the -c option in start-stop-daemon.
In this way the process start and take the right privileges:

nagios   11131     1  0 12:19 ?        00:00:00 /usr/nagios/bin/nsca -c /etc/nagios/nsca.cfg --daemon


Probably this daemon needs to start as root and only after execution drops the superuser privileges. But, sincerely i'm not a programmer or developer :-)



As usual, emerge --info:

Portage 2203-svn (default-linux/x86/2006.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.15.1 i686)
=================================================================
System uname: 2.6.15.1 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz
Gentoo Base System version 1.6.14
ccache version 2.3 [enabled]
dev-lang/python:     2.4.2
dev-python/pycrypto: [Not Present]
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -mtune=pentium4 -mmmx -msse -msse2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -mtune=pentium4 -mmmx -msse -msse2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks fixpackages parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.heanet.ie/pub/gentoo/                 http://gentoo.kems.net          http://194.117.143.71"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 alsa apache2 apm arts avi berkdb bitmap-fonts bzip2 cli crypt cups curl dri eds emboss encode esd expat foomaticdb fortran gd gdbm gif gmp gstreamer idn imlib iproute2 isdnlog jpeg libg++ libwww mad mikmod mmx motif mp3 mpeg ncurses nls nptl nptlonly ogg opengl oss pam pcre pdflib perl php png pppd python quicktime readline reflection sdl session snmp spell spl sse ssl threads truetype truetype-fonts type1-fonts udev unicode utf8 vorbis xml xml2 xmms xorg xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  CTARGET, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS, PORTDIR_OVERLAY
Comment 1 Matteo Contri 2006-07-13 03:47:24 UTC
> I wonder that gentoo got the 2.6 version and the nagios mainstream only 2.5.2,
> but this is not the point.

Forgive me for this poitn. I read wrong :-)
Sorry i'm too tired!
Comment 2 Tobias Scherbaum (RETIRED) gentoo-dev 2007-08-17 01:16:47 UTC
Please test with nagios-nsca-2.6 and/or 2.7.2, feel free to reopen if this problem is still present.