Support Questions
Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

Issue starting ambari server 2.4.2


I am trying to use ambari to for HDP. So far I have installed the ambari server successfully. however when i start the server I get the following error.


Starting ambari-server Ambari Server running with administrator privileges. Organizing resource files at /var/lib/ambari-server/resources... Ambari database consistency check started... No errors were found. ERROR: Exiting with exit code 1. REASON: Database check failed to complete. Please check /var/log/ambari-server/ambari-server.log and /var/log/ambari-server/ambari-server-check-database.log for more information.


OS: Centos 7

Java : Oracle java 1.7

Database: Postgressql 9.4



I have attached the log file of the server.

Thank you for the help.


@Saurav Ranjit

From the database check log, it appears your PostgreSQL database is down. Use the systemctl command to check and restart the database server.

I check my postgressql status with "sudo systemctl enable postgresql-9.4"

Postgresql seems to be running.

Here is the result of the command.

● postgresql-9.4.service - PostgreSQL 9.4 database server Loaded: loaded (/usr/lib/systemd/system/postgresql-9.4.service; enabled; vendor preset: disabled) Active: active (running) since Fri 2017-02-17 10:48:21 JST; 52min ago Main PID: 1089 (postgres) CGroup: /system.slice/postgresql-9.4.service ├─1089 /usr/pgsql-9.4/bin/postgres -D /var/lib/pgsql/9.4/data ├─2284 postgres: logger process ├─2304 postgres: checkpointer process ├─2305 postgres: writer process ├─2306 postgres: wal writer process ├─2307 postgres: autovacuum launcher process ├─2308 postgres: stats collector process └─6416 postgres: ambari ambaridatabase [local] idle

However the issue still remains. I tried to setup the server again but still there is the same issue.



It looks like ambari is not able to reach the postgres database, though it is running.

Please check your pg_hba.conf file of your postgres database located at /var/lib/pgsql/data/

Your pg_hba.conf file should have content like this,


# "local" is for Unix domain socket connections only

local all postgres ident

# IPv4 local connections:

host all postgres ident

# IPv6 local connections:

host all postgres ::1/128 ident

host all all md5

local all ambari,mapred md5

host all ambari,mapred md5

host all ambari,mapred ::/0 md5

If you don't have entry for "ambari" user , it may be the problem. Try correcting it as mentioned.

Let me know if that works.

It did not work.

However i uninstalled my existing postgressql and used the postgres from the ambari installation itself. Doing this solved the problem and the server could start.

But not i get another issue while lunching ambari install wizard.

In the "Confirm Host" my set up get failed. I have this waring message as well

"The following hostnames are not valid FQDNs:" but it allows me to next page.

Failed message in Confirm Host is only


========================== Creating target directory... ========================== Command start time 2017-02-17 16:45:13


Is there any log file to view the why it failed


@Saurav Ranjit

In the log there is a pointer"PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections."

Can you validate that the hostname -f is the name you used for the postgres host and the database port is accepting connection

I could solve the ambari start issue by removing my existing postgres and using the postgres of ambari itself.

I started my ambari and try to configure it from the web browser to depolying HDP.

But now i get another issue.

In step three "Confirm Host" the status is installing. However after running it for 2 hour there is no change. The status is same installing. Also there no ambari-agent log folder created inside /var/log/ .

I have attached the picture of my status.


This is taking too long time and no result.

How to check if the agent are being installed in the host machine.

Thank you


@Saurav Ranjit

If the clients are failing to register the try installing the ambari-agents locally on all the hosts.

# yum install ambari-agent

Then chose the manual registration.

Please let me know if that works for you