I am getting the same error (exit code 127) on RHEL 5.9 – Ambari 1.5.1:
While installing Ambari-server on an offline RHEL 5.9 server through a Red Hat satellite server I am getting the issue below:
Do you want to change Oracle JDK [y/n] (n)? n
Enter advanced database configuration [y/n] (n)? n
Default properties detected. Using built-in database.
Running initdb: This may take upto a minute.
About to start PostgreSQL
ERROR: Exiting with exit code 127.
REASON: Unable to start PostgreSQL server. Exiting
PostgreSQL is successfully running, initdb works and the version is correct (installed by yum install ambari-server).
Postgres has been installed by the default dir /var/lib/pgsql etc.
Did you solve this issue?