Description of problem: installing mongodb-server and running it fails. 1. dnf install mongodb-server 2. systemctl start mongod results: SELinux is preventing /usr/bin/mongod from 'name_bind' accesses on the tcp_socket port 27017 SELinux is preventing /usr/bin/mongod from 'name_bind' accesses on the tcp_socket port 27017. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that mongod should be allowed name_bind access on the port 27017 tcp_socket by default. Then you should report this as a bug. You can generate a local policy module to allow this access. Do allow this access for now by executing: # grep mongod /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context system_u:system_r:mongod_t:s0 Target Context system_u:object_r:mongod_port_t:s0 Target Objects port 27017 [ tcp_socket ] Source mongod Source Path /usr/bin/mongod Port 27017 Host (removed) Source RPM Packages mongodb-server-2.4.9-8.fc21.x86_64 Target RPM Packages Policy RPM selinux-policy-3.13.1-92.fc21.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 3.17.2-300.fc21.x86_64 #1 SMP Thu Oct 30 19:23:48 UTC 2014 x86_64 x86_64 Alert Count 1 First Seen 2014-11-10 17:36:29 EET Last Seen 2014-11-10 17:36:29 EET Local ID 0f2b291e-d80b-45a2-bb3a-a0bed85dda41 Raw Audit Messages type=AVC msg=audit(1415633789.405:2278): avc: denied { name_bind } for pid=14460 comm="mongod" src=27017 scontext=system_u:system_r:mongod_t:s0 tcontext=system_u:object_r:mongod_port_t:s0 tclass=tcp_socket permissive=0 type=SYSCALL msg=audit(1415633789.405:2278): arch=x86_64 syscall=bind success=no exit=EACCES a0=9 a1=45c0128 a2=10 a3=36d items=0 ppid=1 pid=14460 auid=4294967295 uid=184 gid=983 euid=184 suid=184 fsuid=184 egid=983 sgid=983 fsgid=983 tty=(none) ses=4294967295 comm=mongod exe=/usr/bin/mongod subj=system_u:system_r:mongod_t:s0 key=(null) Hash: mongod,mongod_t,mongod_port_t,tcp_socket,name_bind Version-Release number of selected component: selinux-policy-3.13.1-92.fc21.noarch Additional info: reporter: libreport-2.3.0 hashmarkername: setroubleshoot kernel: 3.17.2-300.fc21.x86_64 type: libreport
#============= mongod_t ============== #!!!! This avc is allowed in the current policy allow mongod_t mongod_port_t:tcp_socket name_bind; rpm -q selinux-policy selinux-policy-3.13.1-94.fc21.noarch Please update your selinux-policy package.
my bad for assuming I was running latest without checking. thanks for the fast response.
No problem.