Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 375777

Summary: app-admin/ulogd-2.0.0_beta4 should warn about needed config changes
Product: Gentoo Linux Reporter: Paul Hartman <paul.hartman>
Component: Current packagesAssignee: Coacher <itumaykin+gentoo>
Status: RESOLVED FIXED    
Severity: trivial CC: proxy-maint, upendra.gandhi
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 426868    
Bug Blocks:    

Description Paul Hartman 2011-07-20 16:13:12 UTC
I installed app-admin/ulogd-2.0.0_beta4 for the first time. It compiled with no errors. I had all of the necessary kernel options enabled. When I tried to run it, however, it failed every time with this strange message:

not even a single working plugin stack

After spending some time checking permissions, verifying plugin files exist, re-emerging with every combination of USE flags, using strace, googling the error, and finally reading the code where the error occurs, I figured out the very (embarrassingly) simple reason: at least one "stack" line in ulogd.conf must exist. By default, in the file installed by portage, all are commented out. 

I suggest a message should be displayed to the user during emerge, warning them that (if it's not an upgrade) they must uncomment or add a "stack" line to /etc/ulogd.conf before it can be used. Hopefully that will save the next person's time in case they also needed to figure it out.


Reproducible: Always

Steps to Reproduce:
1. emerge ulogd
2. /etc/init.d/ulogd start
3.
Actual Results:  
Failure to start, this in log:

Wed Jul 20 09:51:16 2011 <5> ulogd.c:372 registering plugin `NFLOG'
Wed Jul 20 09:51:16 2011 <5> ulogd.c:372 registering plugin `NFCT'
Wed Jul 20 09:51:16 2011 <5> ulogd.c:372 registering plugin `IFINDEX'
Wed Jul 20 09:51:16 2011 <5> ulogd.c:372 registering plugin `IP2STR'
Wed Jul 20 09:51:16 2011 <5> ulogd.c:372 registering plugin `IP2BIN'
Wed Jul 20 09:51:16 2011 <5> ulogd.c:372 registering plugin `PRINTPKT'
Wed Jul 20 09:51:16 2011 <5> ulogd.c:372 registering plugin `HWHDR'
Wed Jul 20 09:51:16 2011 <5> ulogd.c:372 registering plugin `PRINTFLOW'
Wed Jul 20 09:51:16 2011 <5> ulogd.c:372 registering plugin `LOGEMU'
Wed Jul 20 09:51:16 2011 <5> ulogd.c:372 registering plugin `SYSLOG'
Wed Jul 20 09:51:16 2011 <5> ulogd.c:372 registering plugin `XML'
Wed Jul 20 09:51:16 2011 <5> ulogd.c:372 registering plugin `BASE'
Wed Jul 20 09:51:16 2011 <8> ulogd.c:1179 not even a single working plugin stack

Expected Results:  
Worked or warned me

Portage 2.2.0_alpha46 (default/linux/amd64/10.0, gcc-4.5.2, glibc-2.13-r4, 2.6.34-xen-r4-vr.org x86_64)
=================================================================
System uname: Linux-2.6.34-xen-r4-vr.org-x86_64-Intel-R-_Xeon-R-_CPU_E5506_@_2.13GHz-with-gentoo-2.0.3
Timestamp of tree: Wed, 20 Jul 2011 04:45:01 +0000
app-shells/bash:          4.2_p10
dev-lang/python:          2.7.2, 3.2
dev-util/cmake:           2.8.5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1-r1
sys-devel/binutils:       2.21.1
sys-devel/gcc:            4.5.2
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.38 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo mysql
Installed sets:
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs buildsyspkg distlocks ebuild-locks fixlafiles fixpackages news nostrip parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ rsync://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,--as-needed"
LINGUAS="en en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/mysql"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv imap ipv6 libwww maildir mmx modules mudflap multilib ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline sasl session slang sse sse2 ssl sysfs tcpd unicode xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Pacho Ramos gentoo-dev 2012-09-16 09:14:21 UTC
This package needs a proxy maintainer for this and libnetfilter_acct:
http://www.gentoo.org/proj/en/qa/proxy-maintainers/
Comment 2 upendra 2012-12-04 17:25:34 UTC
Same here. I uncommented all stack lines in /etc/ulogd.conf and started ulogd successfully. Before it was throwing same error as reported by Paul.

[I] app-admin/ulogd
     Available versions:  1.23-r1 ~1.24-r2 (~)2.0.0_beta4 {{doc mysql pcap postgres sqlite}}
     Installed versions:  2.0.0_beta4(11:14:16 AM 12/04/2012)(pcap -doc -mysql -postgres)

Portage 2.1.11.31 (default/linux/amd64/10.0, gcc-4.5.4, glibc-2.16.0, 3.5.7-gentoo x86_64)
=================================================================
System uname: Linux-3.5.7-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_860_@_2.80GHz-with-gentoo-2.1
Timestamp of tree: Tue, 04 Dec 2012 15:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
ccache version 3.1.8 [enabled]
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.5.4-r4, 2.7.3-r2, 3.1.5, 3.2.3
dev-util/ccache:          3.1.8
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          9999
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.4.7, 4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo bleeding-edge
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-2.2/conf /usr/share/maven-bin-3.0/conf /var/lib/hsqldb /var/spool/munin-async/.ssh"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.mcs.anl.gov/pub/gentoo/ rsync://mirror.mcs.anl.gov/gentoo/ ftp://mirror.mcs.anl.gov/pub/gentoo/ ftp://gentoo.mirrors.tds.net/gentoo rsync://gentoo.mirrors.tds.net/gentoo http://gentoo.mirrors.tds.net/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8 -l16"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=50"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/bleeding-edge"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 aspell berkdb bzip2 cli consolekit cracklib crypt cups cxx dbus dri gdbm gpm gstreamer gtk hal iconv ipv6 jpeg ldap mmx modules mudflap multilib ncurses nls nptl nptlonly nsplugin openmp pam pcre pppd readline session sse sse2 ssl svg tcpd unicode zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias cgi cgid" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 3 upendra 2012-12-04 17:37:14 UTC
In addition to that, I am getting a message "Tue Dec  4 11:34:28 2012 <7> ulogd.c:1213 Could not nice process: Operation not permitted" in ulogd.log

Not sure what this means. 

Log snippet.

Tue Dec  4 11:34:28 2012 <1> ulogd.c:733 assigning `orig.ip.daddr(?)' as source for IP2STR(orig.ip.daddr)
Tue Dec  4 11:34:28 2012 <1> ulogd.c:627 ct1(NFCT)
Tue Dec  4 11:34:28 2012 <1> ulogd.c:733 assigning `reply.ip.saddr(?)' as source for IP2STR(reply.ip.saddr)
Tue Dec  4 11:34:28 2012 <1> ulogd.c:627 ct1(NFCT)
Tue Dec  4 11:34:28 2012 <1> ulogd.c:733 assigning `reply.ip.daddr(?)' as source for IP2STR(reply.ip.daddr)
Tue Dec  4 11:34:28 2012 <1> ulogd.c:670 traversing plugin `NFCT'
Tue Dec  4 11:34:28 2012 <3> ulogd.c:755 ct1 instance already loaded
Tue Dec  4 11:34:28 2012 <5> ulogd.c:1184 Changing UID / GID
Tue Dec  4 11:34:28 2012 <7> ulogd.c:1213 Could not nice process: Operation not permitted
Tue Dec  4 11:34:28 2012 <3> ulogd.c:1236 initialization finished, entering main loop
Comment 4 Coacher 2013-03-05 01:44:29 UTC
Appropriate warnings added in ebuilds for ulogd-2.* you can find here:
https://bugs.gentoo.org/show_bug.cgi?id=426868

Also since 2.0.2 version ulogd itself checks for enabled stack in configuration on startup.
Comment 5 Sergey Popov gentoo-dev 2013-03-20 08:40:59 UTC
Fixed in 2.0.2