cloudera-scm-server-db 启动失败,
[root@esggy-delivery-1 cloudera-scm-server]# service cloudera-scm-server-db start
Starting cloudera-scm-server-db (via systemctl): Job for cloudera-scm-server-db.service failed because the control process exited with error code. See "systemctl status cloudera-scm-server-db.service" and "journalctl -xe" for details.
[FAILED]
查看/var/log/cloudera-scm-server/db.log错误如下,
[root@esggy-delivery-1 cloudera-scm-server]# tail -10f /var/log/cloudera-scm-server/db.log
postgres cannot access the server configuration file "/var/lib/cloudera-scm-server-db/data/postgresql.conf": Permission denied
或者如以下错误,
fixing permissions on existing directory /var/lib/cloudera-scm-server-db/data ... initdb: could not change permissions of directory "/var/lib/cloudera-scm-server-db/data": Permission denied
此问题通过是因为SELINUX没有正确配置,修改方法如下,
1 编译/etc/sysconfig/selinux,修改SELINUX=enforcing为SELINUX=disabled,需要重启生效
2 setenforce 0,不需要重启生效,可以通过getenforce查看修改成功