If you are unable to start Ambari, it may be due to an inability for the underlying Postgres database to start. On an EL7 platform, this may be due to the way that /var/run is handled.
/var/run is actually a symlink to /run, which is configured as tmpfs, meaning that it will be wiped when the system reboots.
This issue can be mitigated through the use of systemd-tmpfiles to lock directories/storage locations when the system reboots. To do this, perform the following steps:
- Create a new files called postgres.conf at /etc/tmpfiles.d/ (e.g. vi /etc/tmpfiles.d/postgres.conf)
- Add the following line into your newly created postgres.conf file (removing the quotation marks) - "d /var/run/postgresql 0755 postgres postgres -"
This will force the /var/run/postgresql to be maintained through reboots, any other tmpfs cleanup, and allow write access to the directory which is otherwise owned by root by default.