After performing an accidental patch on Satellite server, candlepin won't start
Environment
Satellite 6.x
Issue
After performing and subsequent reversing an accidental patch on Satellite server, candlepin refuses to start with the following message:
Oct 21 11:09:31 localhost server: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "candlepin"
Resolution
First verify that the correct set of Satellite packages (installed from appropriate repositories) is installed. Then verify the SELinux context for candlepin with:
# semanage fcontext -l | grep candlepin
The output should look like:
/etc/candlepin(/.*)? all files system_u:object_r:candlepin_etc_rw_t:s0
/var/lib/candlepin(/.*)? all files system_u:object_r:candlepin_var_lib_t:s0
/var/log/candlepin(/.*)? all files system_u:object_r:candlepin_var_log_t:s0
/etc/candlepin/certs(/.*)? all files system_u:object_r:candlepin_etc_certs_rw_t:s0
/var/cache/candlepin(/.*)? all files system_u:object_r:candlepin_var_cache_t:s0
/usr/sbin/candlepin regular file system_u:object_r:candlepin_exec_t:s0
/etc/candlepin/certs/candlepin-ca\.crt all files system_u:object_r:candlepin_etc_certs_ca_cert_r_t:s0
/etc/candlepin/certs/candlepin-ca\.key all files system_u:object_r:candlepin_etc_certs_ca_cert_r_t:s0
If some context is missing, try to repair it with:
# semodule -i /usr/share/selinux/targeted/candlepin.pp
# restorecon -Rv <list of candlepin directories that are missing context>
For more KB articles/solutions related to Red Hat Satellite 6.x Candlepin Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Candlepin Issues
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.