Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1645531

Summary: tomcat cannot connect to postgres on RHEL 7.6
Product: [Community] Spacewalk Reporter: Ales Dujicek <adujicek>
Component: ServerAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED EOL QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.8CC: jjansky
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-09 13:37:57 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:
Embargoed:

Description Ales Dujicek 2018-11-02 13:32:53 UTC
Description of problem:

Tomcat connection to Postgres is denied by SELinux on RHEL 7.6

/var/log/audit/audit.log:
type=AVC msg=audit(1541165369.292:17447): avc:  denied  { name_connect } for  pid=16273 comm="java" dest=5432 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:postgresql_port_t:s0 tclass=tcp_socket permissive=0

# audit2allow  -a
#============= tomcat_t ==============

#!!!! This avc can be allowed using the boolean 'tomcat_can_network_connect_db'
allow tomcat_t postgresql_port_t:tcp_socket name_connect;


Version-Release number of selected component (if applicable):
spacewalk 2.9 nightly
spacewalk-java-2.9.28-1.el7.noarch
selinux-policy-3.13.1-229.el7_6.5.noarch
redhat-release-server-7.6-4.el7.x86_64

Comment 1 Michael Mráka 2020-03-09 13:37:57 UTC
Spacewalk 2.8 (and older) has already reached it's End Of Life.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before end of life. If you would still like
to see this bug fixed and are able to reproduce it against current version
of Spacewalk 2.9, you are encouraged change the 'version' and re-open it.