Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 375733 - app-admin/collectd-5.0.0-r1: iptables plugin cannot be loaded
Summary: app-admin/collectd-5.0.0-r1: iptables plugin cannot be loaded
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andreas K. Hüttel
URL:
Whiteboard:
Keywords:
Depends on: 334503
Blocks:
  Show dependency tree
 
Reported: 2011-07-20 08:21 UTC by Conrad Kostecki
Modified: 2012-04-01 15:09 UTC (History)
3 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 Conrad Kostecki gentoo-dev 2011-07-20 08:21:49 UTC
I've compiled collectd with the iptables, but I am unable to load it:
At startup, i get:

[2011-07-20 10:17:52] lt_dlopen ("/usr/lib/collectd/iptables.so") failed: file not found. The most common cause for this problem are missing dependencies. Use ldd(1) to check the dependencies of the plugin / shared object.
ERROR: lt_dlopen ("/usr/lib/collectd/iptables.so") failed: file not found. The most common cause for this problem are missing dependencies. Use ldd(1) to check the dependencies of the plugin / shared object.
Unable to load plugin iptables.
[2011-07-20 10:17:52] Found a configuration for the `iptables' plugin, but the plugin isn't loaded or didn't register a configuration callback.         [ ok ]


Reproducible: Always




emerge --info:
Portage 2.1.10.7 (default/linux/x86/10.0/server, gcc-4.6.1, glibc-2.13-r4, 2.6.39-gentoo-r2 i686)
=================================================================
System uname: Linux-2.6.39-gentoo-r2-i686-Intel-R-_Atom-TM-_CPU_N270_@_1.60GHz-with-gentoo-2.0.3
Timestamp of tree: Wed, 20 Jul 2011 06:15:01 +0000
ccache version 3.1.5 [enabled]
app-shells/bash:          4.2_p10
dev-lang/python:          2.7.2, 3.2
dev-util/ccache:          3.1.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.6.1
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 galactica
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA dlj-1.1"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=atom -O3 -mmmx -msse -msse2 -msse3 -mssse3 -mmovbe -msahf -pipe -fomit-frame-pointer -mfpmath=sse"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /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=atom -O3 -mmmx -msse -msse2 -msse3 -mssse3 -mmovbe -msahf -pipe -fomit-frame-pointer -mfpmath=sse -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
FEATURES="assume-digests binpkg-logs ccache distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://de-mirror.org/distro/gentoo/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,now"
LINGUAS="de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="gzip"
PORTAGE_COMPRESS_FLAGS="-f9"
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="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="adns apache2 bash-completion bzip2 cracklib ftp gd iconv idn ipv6 javascript jpeg lzma lzo mmx ncurses nls nntp nptl offensive pam perl png readline slang spell sse2 ssl svg symlink tcpd threads truetype unicode vim-syntax x86 xml zeroconf zlib" ALSA_PCM_PLUGINS="*" APACHE2_MODULES="alias auth_basic authn_file authz_host authz_user autoindex cache cgi cgid deflate dir disk_cache file_cache filter include info log_config logio mem_cache mime mime_magic negotiation rewrite status unique_id vhost_alias" APACHE2_MPMS="worker" COLLECTD_PLUGINS="apache apcups contextswitch conntrack cpu cpufreq df disk dns entropy exec filecount hddtemp interface iptables irq load logfile memory netlink nfs ntpd ping processes protocols rrdcached rrdtool sensors serial swap syslog tcpconns thermal uptime users wireless" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LINGUAS="de" PHP_TARGETS="php5-3" USERLAND="GNU" VIDEO_CARDS="amd" 
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Johan Bergström 2011-08-23 09:14:19 UTC
Hello and sorry for the late response :( 

Could you make sure you're building the iptables plugin by looking at the output from configure? In style with:

[ebuild   R   ~] app-admin/collectd-5.0.0-r1  USE="-contrib -debug -perl -static-libs" COLLECTD_PLUGINS="cpu curl_json df disk fscache interface load memcached memory mysql nginx ping processes python rrdtool syslog tail -apache -apcups -ascent -battery -bind -conntrack -contextswitch -cpufreq -csv -curl -curl_xml -dbi -dns -email -entropy -exec -filecount -gmond -hddtemp -ipmi -iptables -irq -java -libvirt -logfile -madwifi -match_empty_counter -match_hashed -match_regex -match_timediff -match_value -mbmon -memcachec -multimeter -netlink -network -nfs -notify_desktop -notify_email -ntpd -nut -olsrd -onewire -openvpn -oracle -perl -postgresql -powerdns -protocols -rrdcached -sensors -serial -snmp -swap -table -target_notification -target_replace -target_scale -target_set -tcpconns -teamspeak2 -ted -thermal -tokyotyrant -unixsock -uptime -users -uuid -vmem -vserver -wireless -write_http" 1,341 kB

<snip>

  Modules:
    amqp    . . . . . . . no (disabled on command line)
    apache  . . . . . . . no (disabled on command line)
    apcups  . . . . . . . no (disabled on command line)
    apple_sensors . . . . no (disabled on command line)
    ascent  . . . . . . . no (disabled on command line)
    battery . . . . . . . no (disabled on command line)
    bind  . . . . . . . . no (disabled on command line)
    conntrack . . . . . . no (disabled on command line)
    contextswitch . . . . no (disabled on command line)
    cpu . . . . . . . . . yes
    cpufreq . . . . . . . no (disabled on command line)
    csv . . . . . . . . . no (disabled on command line)
    curl  . . . . . . . . no (disabled on command line)
    curl_json . . . . . . yes
    curl_xml  . . . . . . no (disabled on command line)
    dbi . . . . . . . . . no (disabled on command line)
    df  . . . . . . . . . yes
    disk  . . . . . . . . yes
    dns . . . . . . . . . no (disabled on command line)
    email . . . . . . . . no (disabled on command line)
    entropy . . . . . . . no (disabled on command line)
    exec  . . . . . . . . no (disabled on command line)
    filecount . . . . . . no (disabled on command line)
    fscache . . . . . . . yes
    gmond . . . . . . . . no (disabled on command line)
    hddtemp . . . . . . . no (disabled on command line)
    interface . . . . . . yes
    ipmi  . . . . . . . . no (disabled on command line)
    iptables  . . . . . . no (disabled on command line)
    ipvs  . . . . . . . . no (disabled on command line) (ip_vs.h not found)
    irq . . . . . . . . . no (disabled on command line)
    java  . . . . . . . . no (disabled on command line)
    libvirt . . . . . . . no (disabled on command line)
    load  . . . . . . . . yes
    logfile . . . . . . . no (disabled on command line)
    lpar... . . . . . . . no (disabled on command line)
    madwifi . . . . . . . no (disabled on command line)
    match_empty_counter . no (disabled on command line)
    match_hashed  . . . . no (disabled on command line)
    match_regex . . . . . no (disabled on command line)
    match_timediff  . . . no (disabled on command line)
    match_value . . . . . no (disabled on command line)
    mbmon . . . . . . . . no (disabled on command line)
    memcachec . . . . . . no (disabled on command line)
    memcached . . . . . . yes
    memory  . . . . . . . yes
    modbus  . . . . . . . no (disabled on command line)
    multimeter  . . . . . no (disabled on command line)
    mysql . . . . . . . . yes
    netapp  . . . . . . . no (disabled on command line)
    netlink . . . . . . . no (disabled on command line)
    network . . . . . . . no (disabled on command line)
    nfs . . . . . . . . . no (disabled on command line)
    nginx . . . . . . . . yes
    notify_desktop  . . . no (disabled on command line)
    notify_email  . . . . no (disabled on command line)
    ntpd  . . . . . . . . no (disabled on command line)
    nut . . . . . . . . . no (disabled on command line)
    olsrd . . . . . . . . no (disabled on command line)
    onewire . . . . . . . no (disabled on command line)
    openvpn . . . . . . . no (disabled on command line)
    oracle  . . . . . . . no (disabled on command line)
    perl  . . . . . . . . no (disabled on command line)
    pinba . . . . . . . . no (disabled on command line)
    ping  . . . . . . . . yes
    postgresql  . . . . . no (disabled on command line)
    powerdns  . . . . . . no (disabled on command line)
    processes . . . . . . yes
    protocols . . . . . . no (disabled on command line)
    python  . . . . . . . yes
    redis . . . . . . . . no (disabled on command line)
    routeros  . . . . . . no (disabled on command line)
    rrdcached . . . . . . no (disabled on command line)
    rrdtool . . . . . . . yes
    sensors . . . . . . . no (disabled on command line)
    serial  . . . . . . . no (disabled on command line)
    snmp  . . . . . . . . no (disabled on command line)
    swap  . . . . . . . . no (disabled on command line)
    syslog  . . . . . . . yes
    table . . . . . . . . no (disabled on command line)
    tail  . . . . . . . . yes
    tape  . . . . . . . . no (disabled on command line)
    target_notification . no (disabled on command line)
    target_replace  . . . no (disabled on command line)
    target_scale  . . . . no (disabled on command line)
    target_set  . . . . . no (disabled on command line)
    target_v5upgrade  . . yes
    tcpconns  . . . . . . no (disabled on command line)
    teamspeak2  . . . . . no (disabled on command line)
    ted . . . . . . . . . no (disabled on command line)
    thermal . . . . . . . no (disabled on command line)
    threshold . . . . . . no (disabled on command line)
    tokyotyrant . . . . . no (disabled on command line)
    unixsock  . . . . . . no (disabled on command line)
    uptime  . . . . . . . no (disabled on command line)
    users . . . . . . . . no (disabled on command line)
    uuid  . . . . . . . . no (disabled on command line)
    varnish . . . . . . . no (disabled on command line)
    vmem  . . . . . . . . no (disabled on command line)
    vserver . . . . . . . no (disabled on command line)
    wireless  . . . . . . no (disabled on command line)
    write_http  . . . . . no (disabled on command line)
    write_redis . . . . . no (disabled on command line)
    xmms  . . . . . . . . no (disabled on command line)
    zfs_arc . . . . . . . no (disabled on command line)
Comment 2 Johan Bergström 2011-10-19 10:01:36 UTC
I'm inclined to close this with MOREINFO.
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2011-10-22 17:37:45 UTC
(In reply to comment #2)
> I'm inclined to close this with MOREINFO.

Right.
Comment 4 Conrad Kostecki gentoo-dev 2011-10-22 21:09:37 UTC
Hello and sorry for the late response :( (:D)
Strange, I didn't got any email-notification, so I didn't saw your answer!

I've now emerged with this:
[ebuild   R    ] app-admin/collectd-5.0.0-r2  USE="contrib perl -debug -static-libs" COLLECTD_PLUGINS="apache apcups conntrack contextswitch cpu cpufreq df disk dns entropy exec filecount hddtemp interface iptables irq load logfile memory netlink nfs ntpd ping processes protocols rrdtool sensors serial swap syslog tcpconns thermal uptime users wireless -ascent -battery -bind -csv -curl -curl_json -curl_xml -dbi -email -fscache -gmond -ipmi -java -libvirt -madwifi -match_empty_counter -match_hashed -match_regex -match_timediff -match_value -mbmon -memcachec -memcached -multimeter -mysql -network -nginx -notify_desktop -notify_email -nut -olsrd -onewire -openvpn -oracle -perl -postgresql -powerdns -python -rrdcached -snmp -table -tail -target_notification -target_replace -target_scale -target_set -teamspeak2 -ted -tokyotyrant -unixsock -uuid -varnish -vmem -vserver -write_http" 0 kB

This is my output from configure:
./configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --config-cache --without-included-ltdl --disable-static --localstatedir=/var --disable-debug --disable-netapp --disable-pinba --disable-xmms --disable-ipvs --disable-apple_sensors --disable-routeros --disable-tape --disable-zfs_arc --disable-modbus --disable-amqp --disable-genericjmx --disable-lpar --disable-redis --disable-threshold --disable-write_redis --disable-v5upgrade --enable-apache --enable-apcups --disable-ascent --disable-battery --disable-bind --enable-conntrack --enable-contextswitch --enable-cpu --enable-cpufreq --disable-curl --disable-curl_json --disable-curl_xml --disable-dbi --enable-df --enable-disk --enable-dns --disable-email --enable-entropy --enable-exec --enable-filecount --disable-fscache --disable-gmond --enable-hddtemp --enable-interface --disable-ipmi --enable-iptables --enable-irq --disable-java --disable-libvirt --enable-load --disable-madwifi --disable-mbmon --disable-memcachec --disable-memcached --enable-memory --disable-multimeter --disable-mysql --enable-netlink --disable-network --enable-nfs --disable-nginx --enable-ntpd --disable-nut --disable-olsrd --disable-onewire --disable-openvpn --disable-perl --enable-ping --disable-postgresql --disable-powerdns --enable-processes --enable-protocols --disable-python --disable-rrdcached --enable-sensors --enable-serial --disable-snmp --enable-swap --disable-table --disable-tail --enable-tcpconns --disable-teamspeak2 --disable-ted --enable-thermal --disable-tokyotyrant --enable-uptime --enable-users --disable-varnish --disable-vmem --disable-vserver --enable-wireless --disable-csv --enable-exec --enable-logfile --disable-network --disable-notify_desktop --disable-notify_email --disable-oracle --disable-perl --disable-python --disable-rrdcached --enable-rrdtool --enable-syslog --disable-unixsock --disable-write_http --disable-match_empty_counter --disable-match_hashed --disable-match_regex --disable-match_timediff --disable-match_value --disable-target_notification --disable-target_replace --disable-target_scale --disable-target_set --disable-uuid --with-perl-bindings

Galactica ppp # /etc/init.d/collectd start
 * Use of the opts variable is deprecated and will be
 * removed in the future.
 * Please use extra_commands or extra_started_commands.
 * Starting collectd ...
[2011-10-22 23:07:53] lt_dlopen ("/usr/lib/collectd/iptables.so") failed: file not found. The most common cause for this problem are missing dependencies. Use ldd(1) to check the dependencies of the plugin / shared object.
ERROR: lt_dlopen ("/usr/lib/collectd/iptables.so") failed: file not found. The most common cause for this problem are missing dependencies. Use ldd(1) to check the dependencies of the plugin / shared object.
Unable to load plugin iptables.
[2011-10-22 23:07:53] Found a configuration for the `iptables' plugin, but the plugin isn't loaded or didn't register a configuration callback.                                         [ ok ]

Galactica ppp # ldd "/usr/lib/collectd/iptables.so"
        linux-gate.so.1 =>  (0x77720000)
        libiptc.so.0 => /lib/libiptc.so.0 (0x77712000)
        libip4tc.so.0 => /lib/libip4tc.so.0 (0x77709000)
        libdl.so.2 => /lib/libdl.so.2 (0x77704000)
        libperl.so.5.12 => /usr/lib/libperl.so.5.12 (0x77581000)
        libc.so.6 => /lib/libc.so.6 (0x77407000)
        /lib/ld-linux.so.2 (0x77721000)
        libm.so.6 => /lib/libm.so.6 (0x773dd000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x773ac000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x77391000)
Comment 5 Johan Bergström 2011-12-01 16:28:35 UTC
This is weird. The file exists but collectd doesn't think so? Did 5.0.1 fix anything?
Comment 6 Romain Riviere 2011-12-28 15:01:16 UTC
I would like to confirm this bug with 5.0.1. on (~)x86.
Configure output confirms that iptables is built, and the file is there. ldd output :
└─# ldd /usr/lib/collectd/iptables.so 
        linux-gate.so.1 =>  (0xffffe000)
        libc.so.6 => /lib/libc.so.6 (0xb7645000)
        /lib/ld-linux.so.2 (0xb77b5000)
Still, starting collectd yields this:
ERROR: lt_dlopen ("/usr/lib/collectd/iptables.so") failed: file not found. The most common cause for this problem are missing dependencies. Use ldd(1) to check the dependencies of the plugin / shared object.
Unable to load plugin iptables.
Comment 7 Romain Riviere 2012-01-02 13:38:23 UTC
I did a few additional tests.
Compiling collectd from source on a gentoo host, versions 4.10.4 and 5.0.1, resulted in the same error. However, compiling from source in a debian chroot results in a working version.
So the problem lies somewhere in Gentoo, but I am not sure how to help further pinpoint the issue. Enabling all sorts of debug options didn't yield anything interesting.
Comment 8 Romain Riviere 2012-01-02 16:58:55 UTC
After building from source (without the patches) and exporting LD_DEBUG=all, I found this in the output:
/opt/collectd/lib/collectd/iptables.so: error: symbol lookup error: undefined symbol: ip6tc_first_rule (fatal)
It appears that iptables.so isn't linked to libip6tc as it should be. The libiptc patch provided with the ebuild fixes the problem for libip6tc, but not for libip4tc, which is also required (in this case iptc_next_rule is the first undefined symbol to trigger an error).
Comment 9 Conrad Kostecki gentoo-dev 2012-01-24 07:11:19 UTC
This Bug seems to be fixed at least for me?

[ebuild   R    ] net-firewall/iptables-1.4.12.1-r1
[ebuild   R    ] app-admin/collectd-5.0.1

Collectd does not report any more the iptables error.
Comment 10 Romain Riviere 2012-01-24 08:09:49 UTC
Same versions here, but iptables plugin still won't load. Is your iptables still compiled with USE="ipv6"? Mine is, and I believe that is part of the problem.
Comment 11 Conrad Kostecki gentoo-dev 2012-01-25 09:34:24 UTC
Yes, my whole system is compiled with use flag ipv6.
Comment 12 Romain Riviere 2012-01-25 11:38:27 UTC
Problem still exists here.

└─# emerge --info
Portage 2.1.10.41 (hardened/linux/x86, gcc-4.3.4, glibc-2.11.3-r0, 2.6.38.7-vs2.3.0.37-rc15 i686)
=================================================================
System uname: Linux-2.6.38.7-vs2.3.0.37-rc15-i686-Intel-R-_Core-TM-2_Quad_CPU_Q9300_@_2.50GHz-with-gentoo-2.0.3
Timestamp of tree: Wed, 25 Jan 2012 10:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:          4.1_p7
dev-lang/python:          2.5.4-r4, 2.6.5-r3, 3.1.2-r4
dev-util/ccache:          2.4-r7
dev-util/cmake:           2.8.1-r2
dev-util/pkgconfig:       0.25-r2
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.3-r1
sys-devel/autoconf:       2.65-r1
sys-devel/automake:       1.9.6-r2, 1.10.2, 1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            3.4.6-r2, 4.3.4
sys-devel/gcc-config:     1.4.1
sys-devel/libtool:        2.2.10
sys-devel/make:           3.81-r2
sys-kernel/linux-headers: 2.6.30-r1 (virtual/os-headers)
sys-libs/glibc:           2.11.3
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs buildpkg ccache distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
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="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl bash-completion berkdb bzip2 cli cracklib crypt cxx dri gdbm hardened iconv ipv6 modules mudflap ncurses nls nptl nptlonly openmp pam pax_kernel pcre pic pppd readline session ssl sysfs tcpd threads unicode urandom x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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="kexi words flow plan 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" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 intel mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa via vmware nouveau" 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, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 13 Johan Bergström 2012-02-01 22:19:09 UTC
I would really like to dig into this but I don't have any ipv6 rig at the moment :( I think it's a matter of reading the iptables plugin code, looking at ifdefs and comparing to how iptables is built on your os. I consider this confirmed since its not a single person on a single os.
Comment 14 Andreis Vinogradovs ( slepnoga ) 2012-02-03 11:03:39 UTC
Hi. More[1] collectd plugin require root privilege.
If you run collectd with root user, iptables plugin work or not ?

Unfortunately, at present there are no other ways to run under another user.
There is only an idea[2]

[1]http://collectd.org/wiki/index.php/Category:Plugins_requiring_privileges

http://collectd.org/wiki/index.php/Roadmap#Drop_privileges
Comment 15 Johan Bergström 2012-02-04 22:04:26 UTC
Upstream (Florian) has commited a fix to git head.

Can you guys please apply this patch and rebuild collectd? (create your own ebuild in a local overlay and add this with epatch – look at how other patches in files/ are built)

http://git.verplant.org/?p=collectd.git;a=commitdiff;h=d1f72747955c107445b1d25235ba0f8b78d47f4b

@Andreis_Vinogradovs ( slepnoga ) : Yes, this is true – but not related to this bug.
Comment 16 Andreis Vinogradovs ( slepnoga ) 2012-02-04 22:32:08 UTC
(In reply to comment #15)
> Upstream (Florian) has commited a fix to git head.
> 
> Can you guys please apply this patch and rebuild collectd? (create your own
> ebuild in a local overlay and add this with epatch – look at how other patches
> in files/ are built)

This is not necessarily ;)
Ebuild use base_src_prepare call in prepare phase, it calls  ( from base eclass )
epatch_user ;
Put the patch in /etc/portage/patches/app-admin/collectd/ and rebuild collectd - patch  apply magically
Comment 17 Romain Riviere 2012-02-06 09:38:02 UTC
Sorry, the patch won't apply:

patching file configure.in
Hunk #1 FAILED at 1579.
Hunk #2 succeeded at 4868 (offset 338 lines).
1 out of 2 hunks FAILED -- saving rejects to file configure.in.rej

Is the git HEAD maybe too different from the configure.in in the ebuild?
Comment 18 Johan Bergström 2012-02-06 19:48:49 UTC
Sorry, the patch is for the 4.10 branch. If you are available to test 4.10, that would be helpful. A patch for 5.x will arrive shortly.
Comment 19 Romain Riviere 2012-02-07 08:44:59 UTC
4.10 isn't in portage anymore. I can try building from source if that would help with this particular bug.
Comment 20 Romain Riviere 2012-02-07 09:13:05 UTC
I cannot build the iptables plugin in 4.10, with or without your patch:

checking libiptc/libiptc.h presence... yes
checking for libiptc/libiptc.h... yes
checking libiptc/libip6tc.h usability... yes
checking libiptc/libip6tc.h presence... yes
checking for libiptc/libip6tc.h... yes
checking for iptc_handle_t... no
checking for ip6tc_handle_t... no
checking for iptc_init in -liptc... no

I'm using iptables 1.4.12.1
Comment 21 Andreas K. Hüttel archtester gentoo-dev 2012-02-07 20:53:03 UTC
(In reply to comment #8)
> After building from source (without the patches) and exporting LD_DEBUG=all, I
> found this in the output:
> /opt/collectd/lib/collectd/iptables.so: error: symbol lookup error: undefined
> symbol: ip6tc_first_rule (fatal)
> It appears that iptables.so isn't linked to libip6tc as it should be. The
> libiptc patch provided with the ebuild fixes the problem for libip6tc, but not
> for libip4tc, which is also required (in this case iptc_next_rule is the first
> undefined symbol to trigger an error).

Right, this is maybe the best piece of information that we have so far. Romain, could you please paste from such^^ a build the output from the configure phase (the lines related to libip[46]tc)?!
Comment 22 Romain Riviere 2012-02-08 09:48:05 UTC
When compiling from source or from the ebuild, configure yields this:
checking libiptc/libiptc.h usability... yes
checking libiptc/libiptc.h presence... yes
checking for libiptc/libiptc.h... yes
checking libiptc/libip6tc.h usability... yes
checking libiptc/libip6tc.h presence... yes
checking for libiptc/libip6tc.h... yes
checking for iptc_handle_t... no
checking for ip6tc_handle_t... no
checking for library containing iptc_init... -liptc

BUT also this:
    libiptc . . . . . . . yes
In other words, I belive that we are not completely rid of this owniptc thing. I've done a quick search in the git repository, and it appears that the following commit might help:
http://git.verplant.org/?p=collectd.git;a=commit;h=99364c70a7039ed496dbe429fb86ee41e464fc76

As far as I can see, the Makefile.am part is done by the collectd-4.10.1-noowniptc.patch, but something has to be done about configure.in (hunk 3 fails, need to investigate that) and iptables.c (patch applies ok here). Oddly enough, 5.0.1 was bumped *after* this commit, but the source tarball for 5.0.1 seems ignorant of that fact. By contrast, a later commit regarding ip4tc and ip6tc *is* indeed merged in the source available in the tarball (http://git.verplant.org/?p=collectd.git;a=commit;h=b96e6dd0fe5583ca809b66b2519e74081c79e4f3).
Comment 23 Andrew Elwell 2012-02-26 23:18:34 UTC
Hi folks, 

I think I've just come across a similar case on Fedora - couldn't get 5.0.3 to ./configure --enable-iptables

turns out that the check for iptc_init was failing. Trivial patch submitted upstream on https://github.com/collectd/collectd/pull/35/files 

May be worth a check (also see debian bug 614439)
Comment 24 Romain Riviere 2012-02-27 04:13:35 UTC
This patch is actually one of those included by portage since 4.10.1. It helps building iptables, but the module still can't be loaded. Also:
└─# ldd /opt/collectd/lib/collectd/iptables.so
        linux-gate.so.1 =>  (0xffffe000)
        libiptc.so.0 => /lib/libiptc.so.0 (0xb77e4000)
        libip4tc.so.0 => /lib/libip4tc.so.0 (0xb77dc000)
        libdl.so.2 => /lib/libdl.so.2 (0xb77d8000)
        libc.so.6 => /lib/libc.so.6 (0xb7678000)
        /lib/ld-linux.so.2 (0xb77f3000)

ip6tc is still suspiciously missing.
Comment 25 Johan Bergström 2012-03-07 21:32:57 UTC
This is most likely the outcome of bug 334503. Thanks to Romain Riviere for his patience and extensive debugging.
Comment 26 Romain Riviere 2012-03-31 05:43:19 UTC
Latest iptables-1.4.13 fixes the libiptc bug, and collectd now loads the plugin correctly.
Comment 27 Andreas K. Hüttel archtester gentoo-dev 2012-04-01 15:09:39 UTC
(In reply to comment #26)
> Latest iptables-1.4.13 fixes the libiptc bug, and collectd now loads the
> plugin correctly.

Great, thanks. Added dependency on that version.