[collectd] Perl interpreter does not load plugin (MyPlugin.pm)

Sebastian Harl sh at tokkee.org
Wed Sep 10 18:41:49 CEST 2008


Hi Ulf,

On Wed, Sep 10, 2008 at 06:00:00PM +0200, Ulf Kreutzberg wrote:
> Starting statistics collection and monitoring daemon:
> collectd/usr/sbin/collectd: symbol lookup error:
> /usr/lib/perl/5.8/auto/IO/IO.so: undefined symbol: Perl_Tstack_sp_ptr

This is a known issue - see [1].

[reordered the original E-mail as the answer makes more sense this way ;-)]
> If I enable 'EnableDebugger ""' in collectd.conf, it is saying (perhaps
> a different issue):
> 
> I have used MyPlugin.pm (and put it in /usr/lib/collectd), just for testing.
> collectd is compiled with --enable-debug, and during startup it is logging:
> 
> 2008-09-10 16:39:43] type = perl
> [2008-09-10 16:39:43] file = /usr/lib/collectd/perl.so
> [2008-09-10 16:39:43] perl: perl_config: Setting plugin basename to
> "Collectd::Plugin"
> [2008-09-10 16:39:43] perl: Initializing Perl interpreter...
> [2008-09-10 16:39:43] perl: argv[0] = ""
> [2008-09-10 16:39:43] perl: argv[1] = "-MCollectd"
> [2008-09-10 16:39:43] perl: argv[2] = "-e"
> [2008-09-10 16:39:43] perl: argv[3] = "1"
> [2008-09-10 16:39:43] perl: argv[4] = "-I/usr/lib/collectd"
> [2008-09-10 16:39:43] perl: init_pi: Unable to bootstrap Collectd.
> (then collectd is running without that plugin enabled).

This is the same issue. However, the problem is that Perl reports the
error that appears in the debugger session on stdout/err only, so it
does not show up when you're running in daemon mode (with stdout/err
redirected to /dev/null). I'm not sure how to solve that. I'll check if
the error message is available through $@, so I can dispatch it to the
collectd logging mechanism. If that does not work, I guess, all I can do
is to tell people to run collectd using the -f command line options so
the error will show up.

Anyway, you might still not be able to load that Perl plugin. Note the
"BaseName" config option which tells collectd to load the module
Collectd::Plugin::MyPlugin (in this case) instead of MyPlugin - see the
collectd-perl(5) manpage for details. To fix that, install MyPlugin.pm
in /usr/lib/collectd/Collectd/MyPlugin or remove that config option.

HTH,
Sebastian

[1] http://mailman.verplant.org/pipermail/collectd/2008-May/001816.html

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080910/aa7f20c1/attachment.pgp 


More information about the collectd mailing list