[collectd] Collectd on CentOS always broken?

Richard Shade rshade at rightscale.com
Mon Apr 23 19:37:16 CEST 2012


Have you tried adding LoadPlugin rrdtool, so that it will make rrd files?

On Mon, Apr 23, 2012 at 12:21 PM, O G <otis_junk at yahoo.com> wrote:

> Hi,
>
> I've removed LoadPlugin syslog just in case.  Yes, I can see Collectd is
> running with ps:
>
> # ps auxww| grep collectd
> root      1272  0.0  0.1  44464   740 ?        Ssl  17:06   0:00
> /opt/collectd/sbin/collectd -C /opt/collectd/etc/collectd.conf
>
> Also, when I kill this process I see this in the log (/tmp/collectd.log in
> my case), so I know Collectd really is running before I kill it:
>
> [2012-04-23 17:06:21] [info] Exiting normally.
> [2012-04-23 17:06:21] [info] collectd: Stopping 5 read threads.
>
> And when I start it, I see the following in /tmp/collectd.log:
>
> [2012-04-23 17:06:52] [info] Initialization complete, entering read-loop.
> [2012-04-23 17:06:52] [warning] plugin_dispatch_values: No write callback
> has been registered. Please load at least one output plugin, if you want
> the collected data to be stored.
> [2012-04-23 17:06:52] [info] Filter subsystem: Built-in target `write':
> Dispatching value to all write plugins failed with status 2 (ENOENT). Most
> likely this means you didn't load any write plugins.
> ... the last [info] line above keeps repeating as collectd is running ...
>
>
> So this "No write callback has been registered. Please load at least one
> output plugin, if you want the collected data to be stored" log
> message really looks weird.
> What "output plugin" is this referring to?  I do have "LoadPlugin cpu" and
> that should be writing CPU usage info to the log file under
> /opt/collectd/var/lib/collectd/.
>
> Here is a part of lsof output that shows cpu and logfile plugins are
> loaded.  There is also a reference to /opt/collectd/var/lib/collectd
> directory that should have files with Collectd data, but doesn't:
>
> # lsof | grep collectd
> collectd  1272     root  cwd       DIR      202,1     4096     133804
> /opt/collectd/var/lib/collectd
> collectd  1272     root  mem       REG      202,1    12814     133591
> /opt/collectd/lib/collectd/cpu.so
> collectd  1272     root  mem       REG      202,1    16189     133621
> /opt/collectd/lib/collectd/logfile.so
> ...
>
>
> As for strace output, here it is:
>
> execve("/opt/collectd/sbin/collectd", ["/opt/collectd/sbin/collectd",
> "-C", "/opt/collectd/etc/collectd.conf"], [/* 31 vars */]) = 0
> brk(0)                                  = 0x9f9a000
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> = 0xb77a9000
> access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
> directory)
> open("/etc/ld.so.cache", O_RDONLY)      = 3
> fstat64(3, {st_mode=S_IFREG|0644, st_size=18810, ...}) = 0
> mmap2(NULL, 18810, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77a4000
> close(3)                                = 0
> open("/lib/i686/nosegneg/librt.so.1", O_RDONLY) = 3
> read(3,
> "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\30\0\0004\0\0\0"...,
> 512) = 512
> fstat64(3, {st_mode=S_IFREG|0755, st_size=39676, ...}) = 0
> mmap2(NULL, 33332, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
> 0xb779b000
> mmap2(0xb77a2000, 8192, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb77a2000
> close(3)                                = 0
> open("/lib/libresolv.so.2", O_RDONLY)   = 3
> read(3,
> "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240&\0\0004\0\0\0"...,
> 512) = 512
> fstat64(3, {st_mode=S_IFREG|0755, st_size=103384, ...}) = 0
> mmap2(NULL, 104520, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)
> = 0xb7781000
> mprotect(0xb7796000, 4096, PROT_NONE)   = 0
> mmap2(0xb7797000, 8192, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15) = 0xb7797000
> mmap2(0xb7799000, 6216, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7799000
> close(3)                                = 0
> open("/lib/i686/nosegneg/libpthread.so.0", O_RDONLY) = 3
> read(3,
> "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0pL\0\0004\0\0\0"..., 512) =
> 512
> fstat64(3, {st_mode=S_IFREG|0755, st_size=131044, ...}) = 0
> mmap2(NULL, 106976, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)
> = 0xb7766000
> mmap2(0xb777d000, 8192, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16) = 0xb777d000
> mmap2(0xb777f000, 4576, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb777f000
> close(3)                                = 0
> open("/lib/libdl.so.2", O_RDONLY)       = 3
> read(3,
> "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\n\0\0004\0\0\0"..., 512)
> = 512
> fstat64(3, {st_mode=S_IFREG|0755, st_size=17892, ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> = 0xb7765000
> mmap2(NULL, 16500, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
> 0xb7760000
> mmap2(0xb7763000, 8192, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7763000
> close(3)                                = 0
> open("/lib/i686/nosegneg/libc.so.6", O_RDONLY) = 3
> read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 at n\1\0004\0\0\0"...,
> 512) = 512
> fstat64(3, {st_mode=S_IFREG|0755, st_size=1893680, ...}) = 0
> mmap2(NULL, 1657224, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)
> = 0xb75cb000
> mprotect(0xb7759000, 4096, PROT_NONE)   = 0
> mmap2(0xb775a000, 12288, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18e) = 0xb775a000
> mmap2(0xb775d000, 10632, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb775d000
> close(3)                                = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> = 0xb75ca000
> set_thread_area({entry_number:-1 -> 6, base_addr:0xb75ca6c0,
> limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1,
> seg_not_present:0, useable:1}) = 0
> mprotect(0xb775a000, 8192, PROT_READ)   = 0
> mprotect(0xb7763000, 4096, PROT_READ)   = 0
> mprotect(0xb777d000, 4096, PROT_READ)   = 0
> mprotect(0xb7797000, 4096, PROT_READ)   = 0
> mprotect(0xb77a2000, 4096, PROT_READ)   = 0
> mprotect(0xb77c9000, 4096, PROT_READ)   = 0
> munmap(0xb77a4000, 18810)               = 0
> set_tid_address(0xb75ca728)             = 1324
> set_robust_list(0xb75ca730, 0xc)        = 0
> futex(0xbf97ee10, FUTEX_WAKE_PRIVATE, 1) = 0
> futex(0xbf97ee10, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL,
> bf97ee20) = -1 EAGAIN (Resource temporarily unavailable)
> rt_sigaction(SIGRTMIN, {0xb776a6a0, [], SA_SIGINFO}, NULL, 8) = 0
> rt_sigaction(SIGRT_1, {0xb776ab40, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
> rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
> getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
> uname({sys="Linux", node="domU-12-31-38-00-A8-F5", ...}) = 0
> brk(0)                                  = 0x9f9a000
> brk(0x9fbb000)                          = 0x9fbb000
> stat64("/opt/collectd/etc/collectd.conf", {st_mode=S_IFREG|0644,
> st_size=24208, ...}) = 0
> open("/opt/collectd/etc/collectd.conf", O_RDONLY) = 3
> ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbf97c978) = -1 ENOTTY
> (Inappropriate ioctl for device)
> fstat64(3, {st_mode=S_IFREG|0644, st_size=24208, ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> = 0xb77a8000
> read(3, "#\n# Config file for collectd(1)."..., 8192) = 8192
> read(3, "\tIgnoreSource \"192.168.0.1\"\n#\tSe"..., 8192) = 8192
> read(3, "queries\"\n#    Socket \"/var/run/p"..., 8192) = 7824
> read(3, "", 4096)                       = 0
> read(3, "", 8192)                       = 0
> ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbf97c978) = -1 ENOTTY
> (Inappropriate ioctl for device)
> close(3)                                = 0
> munmap(0xb77a8000, 4096)                = 0
> open("/opt/collectd/share/collectd/types.db", O_RDONLY|O_LARGEFILE) = 3
> fstat64(3, {st_mode=S_IFREG|0644, st_size=6710, ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
> = 0xb77a8000
> read(3, "absolute\t\tvalue:ABSOLUTE:0:U\napa"..., 4096) = 4096
> read(3, "nter\tvalue:DERIVE:0:U\nps_code\t\t\t"..., 4096) = 2614
> read(3, "", 4096)                       = 0
> close(3)                                = 0
> munmap(0xb77a8000, 4096)                = 0
> open("/opt/collectd/lib/collectd",
> O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
> fcntl64(3, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
> getdents64(3, /* 194 entries */, 32768) = 6536
> lstat64("/opt/collectd/lib/collectd/logfile.so", {st_mode=S_IFREG|0755,
> st_size=16189, ...}) = 0
> futex(0xb7764068, FUTEX_WAKE_PRIVATE, 2147483647) = 0
> open("/opt/collectd/lib/collectd/logfile.so", O_RDONLY) = 4
> read(4,
> "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\7\0\0004\0\0\0"...,
> 512) = 512
> fstat64(4, {st_mode=S_IFREG|0755, st_size=16189, ...}) = 0
> mmap2(NULL, 9308, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) =
> 0xb77a6000
> mmap2(0xb77a8000, 4096, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x1) = 0xb77a8000
> close(4)                                = 0
> close(3)                                = 0
> open("/opt/collectd/lib/collectd",
> O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
> getdents64(3, /* 194 entries */, 32768) = 6536
> lstat64("/opt/collectd/lib/collectd/cpu.so", {st_mode=S_IFREG|0755,
> st_size=12814, ...}) = 0
> open("/opt/collectd/lib/collectd/cpu.so", O_RDONLY) = 4
> read(4,
> "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\6\0\0004\0\0\0"...,
> 512) = 512
> fstat64(4, {st_mode=S_IFREG|0755, st_size=12814, ...}) = 0
> mmap2(NULL, 7908, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) =
> 0xb77a4000
> mmap2(0xb77a5000, 4096, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0) = 0xb77a5000
> close(4)                                = 0
> close(3)                                = 0
> chdir("/opt/collectd/var/lib/collectd") = 0
> rt_sigaction(SIGCHLD, {SIG_IGN, [], 0}, NULL, 8) = 0
> clone(child_stack=0,
> flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
> child_tidptr=0xb75ca728) = 1325
> exit_group(0)                           = ?
>
>
> Thanks!
> Otis
>
>
>
>
>
>
> ----- Original Message -----
> From: "Crowder, Travis" <Travis.Crowder at penton.com>
> To: O G <otis_junk at yahoo.com>; "collectd at verplant.org" <
> collectd at verplant.org>
> Cc:
> Sent: Monday, April 23, 2012 12:25 PM
> Subject: RE: [collectd] Collectd on CentOS always broken?
>
> I don't think you can use two logs, but I am not positive on this.  You
> are using syslog and a logfile with that config.  I am not sure which one
> load, or if either does.
>
> What is in your /tmp/collectd.log?
>
> Do you get any errors when you configure or make?
>
> When you start collectd, are you able to verify it is still running via
> top or ps?
>
> If there is nothing in the /tmp/collectd.log and the process isn't running
> after you start it, can you start it with strace and post the output?
>
> -Travis
>
> -----Original Message-----
> From: collectd-bounces at verplant.org [mailto:collectd-bounces at verplant.org]
> On Behalf Of O G
> Sent: Monday, April 23, 2012 11:17 AM
> To: collectd at verplant.org
> Subject: Re: [collectd] Collectd on CentOS always broken?
>
> Hi Travis,
>
> Thanks for replying!  I'm using this minimalistic collectd.conf:
> ####
>  Hostname    "localhost"
> FQDNLookup   true
> BaseDir     "/opt/collectd/var/lib/collectd"
> PIDFile     "/opt/collectd/var/run/collectd.pid"
> PluginDir   "/opt/collectd/lib/collectd"
> TypesDB     "/opt/collectd/share/collectd/types.db"
> #Interval     10
> #Timeout      2
> #ReadThreads  5
>
> LoadPlugin syslog
> LoadPlugin logfile
> <Plugin logfile>
>         LogLevel info
>         File "/tmp/collectd.log"
>         Timestamp true
>         PrintSeverity true
> </Plugin>
> <Plugin syslog>
>         LogLevel info
> </Plugin>
>
> LoadPlugin cpu
> ####
>
> I've now also compiled and installed collectd 5.1.0 by hand (configure,
> make, make install) on "Amazon Linux AMI" (something based on RedHat, it
> seems, since it has yum) and I got the exact same error message.  So I'm
> starting to suspect I'm doing something wrong with Collectd.
>
> Also:
> # /opt/collectd/sbin/collectd -help
> ...
> Builtin defaults:
>   Config file       /opt/collectd/etc/collectd.conf
>   PID file          /opt/collectd/var/run/collectd.pid
>   Plugin directory  /opt/collectd/lib/collectd
>   Data directory    /opt/collectd/var/lib/collectd        <== nothing
> shows up here or in /opt/collectd/var/log/ collectd 5.1.0,
> http://collectd.org/
>
> I've tried starting Collectd like this:
> # /opt/collectd/sbin/collectd -C /opt/collectd/etc/collectd.conf
>
> As well we like this:
> # /opt/collectd/sbin/collectdmon -c /opt/collectd/etc/collectd.conf
>
> Any help would be greatly appreciated.
>
> Thanks!
> Otis
>
>
> ----- Original Message -----
> From: Travis Crowder <travis.crowder at spechal.com>
> To: O G <otis_junk at yahoo.com>
> Cc:
> Sent: Sunday, April 22, 2012 1:21 PM
> Subject: Re: [collectd] Collectd on CentOS always broken?
>
> On 4/21/2012 11:25 PM, O G wrote:
> > Hello,
> >   Is there a version of CentOS with a working Collectd?
> > I have tried several CentOS 5.* and 6.* versions where I installed
> Collectd with yum install collectd and each of them had a non-working
> Collectd.
> >   This is a common error message I'd find in /var/log/messages:
> >   Filter subsystem: Built-in target `write': Dispatching value to all
> >write plugins failed with status 2 (ENOENT). Most likely this means you
> >didn't load any write plugins
> >   Of course, there were plugins in collectd.conf that write stuff to
> filesytem.
> >     Is there a version of CentOS with a working Collectd?
> >   Thanks,
> > Otis
> >
> > _______________________________________________
> > collectd mailing list
> > collectd at verplant.org
> > http://mailman.verplant.org/listinfo/collectd
>
> I use Collectd exclusively on CentOS servers; CentOS 5 and CentOS 6.  I
> install via YUM and build from source without issue.
>
> Can you post your collectd.conf from /etc/ or /opt/collectd/etc ?
>
> -Travis
>
> _______________________________________________
> collectd mailing list
> collectd at verplant.org
> http://mailman.verplant.org/listinfo/collectd
>
> _______________________________________________
> collectd mailing list
> collectd at verplant.org
> http://mailman.verplant.org/listinfo/collectd
>



-- 
Thanks,

Richard Shade
Integration Engineer
RightScale - http://www.rightscale.com/
phone: 8055004164x1018
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20120423/68b0aed5/attachment-0001.html>


More information about the collectd mailing list