Bug 1298749

Summary: collectd write_graphite plugin does not work with selinux
Product: [Fedora] Fedora EPEL Reporter: jstroehmann
Component: collectdAssignee: Ruben Kerkhof <ruben>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: gregswift, jskarvad, kevin, mhlavink, 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-02-04 16:01:27 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:

Description jstroehmann 2016-01-14 22:25:48 UTC
Description of problem:
permission errors when enabling the write_graphite plugin in collectd.conf

Version-Release number of selected component (if applicable):
collectd-5.5.0-3.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1.setenforce 1
2.start seeing permission denied errors in /var/log/messages


Actual results:
Jan 13 16:59:45 ip-10-241-0-10 collectd[4077]: write_graphite plugin: Connecting to 10.241.0.10:2003 via tcp failed. The last error was: failed to connect to remote host: Permission denied


Expected results:
less errors, more graphs

Additional info:
from /var/log/audit/audit.log:
type=SYSCALL msg=audit(1452798996.605:18071): arch=c000003e syscall=42 success=no exit=-13 a0=5 a1=7f014ae6d1c0 a2=10 a3=0 items=0 ppid=1 pid=7045 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="collectd" exe="/usr/sbin/collectd" subj=system_u:system_r:collectd_t:s0 key=(null)
type=AVC msg=audit(1452799006.605:18072): avc:  denied  { name_connect } for  pid=7045 comm="collectd" dest=2003 scontext=system_u:system_r:collectd_t:s0 tcontext=system_u:object_r:lmtp_port_t:s0 tclass=tcp_socket

Comment 1 Ruben Kerkhof 2016-01-14 23:39:13 UTC
Collectd doesn't ship selinux policy. If this also happens on Fedora, can you open a bug against the selinux-policy component?

Comment 2 Ruben Kerkhof 2016-02-04 16:01:27 UTC
I'm going to close this. Please open a new issue against selinux-policy.