| Summary: | collectd-openldap fails to start, reporting "read function [...] is already registered" | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora EPEL | Reporter: | Jonathon Anderson <jonathon.anderson> | ||||
| Component: | collectd | Assignee: | Ruben Kerkhof <ruben> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | epel7 | CC: | gregswift, jskarvad, kevin, mhlavink, rh, ruben | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2016-03-21 18:27:18 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
Did you check /etc/collectd.conf as well? That's why I included the find command at the bottom of my message. The only instances of `ldap` in any of the config files is in /etc/collectd.d/10-openldap.conf.
# find /etc/collectd.* -type f -exec grep -i ldap {} +
/etc/collectd.d/10-openldap.conf:<LoadPlugin openldap>
/etc/collectd.d/10-openldap.conf:<Plugin "openldap">
/etc/collectd.d/10-openldap.conf: URL "ldap://localhost/"
/etc/collectd.* would match /etc/collectd.conf and /etc/collectd.d. Is there another location where it might be picking up configuration that I'm missing?
Where collectd looks for its config depends on the Include directive in /etc/collectd.conf. By default this is Include "/etc/collectd.d". Please share the complete configuration, both /etc/collectd.conf and any include files. Created attachment 1138689 [details] collectd configuration As requested. # tar -cf collectd-config.tar.bz2 -j -C /etc collectd.conf collectd.d Thanks. Check the last two lines in collectd.conf, there's your issue: Include "/etc/collectd.d" Include "/etc/collectd.d/*.conf" This includes each file twice. I noticed that just as I was uploading this. I'll check it and try again. (This config is generated by puppetlabs/collectd; so it will just end up meaning the bug is with them. ;) I just checked, and I can indeed reproduce your issue when I put that last line in. Arguably Collectd itself could handle this a bit better too, since collectd.conf(5) says "It is no problem to have a block like "<Plugin foo>" in more than one file". I'll see if I can do something about that upstream. I figured out why puppet was duplicating the Include, and this has stopped generating an error; but LDAP metrics are still not visible in RRD or in the remote server (an influxdb instance). I understand if this is out-of-scope for this bug report; but I'll look into whether this is because of there being no ldap types defined in types.db. That's all I can think of for why this might be happening. |
Description of problem: Configured collectd to use openldap plugin. Metrics are not gathered. Syslog plugin reports: Mar 20 16:12:39 ldap1 collectd[15663]: The read function "openldap/localhost/localhost" is already registered. Check for duplicate "LoadPlugin" lines in your configuration! Version-Release number of selected component (if applicable): # rpm -qa | grep collectd collectd-openldap-5.5.1-2.el7.x86_64 collectd-5.5.1-2.el7.x86_64 How reproducible: Always. Steps to Reproduce: 1. Install collectd and collectd-openldap 2. Configure collectd-openldap 3. Start collectd Actual results: No metrics gathered. Error message in syslog. Expected results: Metrics gathered. No message in syslog. Additional info: Sample configuration: <LoadPlugin openldap> Globals false </LoadPlugin> <Plugin "openldap"> <Instance "localhost"> URL "ldap://localhost/" </Instance> </Plugin> Also # find /etc/collectd.* -type f -exec grep -i ldap {} + /etc/collectd.d/10-openldap.conf:<LoadPlugin openldap> /etc/collectd.d/10-openldap.conf:<Plugin "openldap"> /etc/collectd.d/10-openldap.conf: URL "ldap://localhost/"