I am trying to configure collectd to run as a central server for other
collectd clients and to LISTEN for incoming requests. I need it to run as
an unprivileged user but it fails with the following errors:
[metrics@office ~]$ collectd -C /etc/collectd.conf  -f
[2018-12-14 05:31:16] plugin_load: plugin "logfile" successfully loaded.
[2018-12-14 05:31:16] logfile: invalid loglevel [debug] defaulting to 'info'
[2018-12-14 05:31:16] plugin_load: plugin "network" successfully loaded.
[2018-12-14 05:31:16] plugin_load: plugin "rrdtool" successfully loaded.
[2018-12-14 05:31:16] network plugin: setsockopt (bind-if): Operation not
[2018-12-14 05:31:16] network plugin: network_config_add_listen:
sockent_server_listen failed.
[2018-12-14 05:31:16] set_thread_name("rrdtool queue"): Permission denied
[2018-12-14 05:31:16] set_thread_name("writer#0"): Permission denied
[2018-12-14 05:31:16] set_thread_name("writer#1"): Permission denied
[2018-12-14 05:31:16] set_thread_name("writer#2"): Permission denied
[2018-12-14 05:31:16] set_thread_name("writer#3"): Permission denied
[2018-12-14 05:31:16] set_thread_name("writer#4"): Permission denied
[2018-12-14 05:31:16] Initialization complete, entering read-loop.
^C[2018-12-14 05:31:17] Exiting normally.
[2018-12-14 05:31:17] collectd: Stopping 5 write threads.
[2018-12-14 05:31:17] rrdtool plugin: Shutting down the queue thread.

The OS is CentOS 7. The collectd version is the latest. The
/var/lib/collectd, /usr/lib/collectd, /etc/collectd.conf and
/etc/collectd.passwd files/folders are owned by the metrics user and the
network plugin settings are below:
<Plugin "network">
        <Listen "HIDDEN" "25826">
                SecurityLevel "Sign"
                AuthFile "/etc/collectd.passwd"
                Interface "enp1s0f0"

I tried the setcap command like this:
setcap 'cap_net_bind_service=+epi' /usr/sbin/collectd

but it did not help.
Please help. Thanks in advance.
collectd mailing list

Reply via email to