Created 02-16-2017 01:12 PM
Hi,
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
ambari-server-check-database.txt
I have attached the log file of the server.
Thank you for the help.
Created 02-16-2017 01:21 PM
From the database check log, it appears your PostgreSQL database is down. Use the systemctl command to check and restart the database server.
Created 02-17-2017 02:48 AM
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.
Created 02-17-2017 03:24 AM
Hi
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,
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all postgres ident
# IPv4 local connections:
host all postgres 127.0.0.1/32 ident
# IPv6 local connections:
host all postgres ::1/128 ident
host all all 0.0.0.0/0 md5
local all ambari,mapred md5
host all ambari,mapred 0.0.0.0/0 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.
Created 02-17-2017 07:54 AM
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
Created 02-17-2017 08:34 AM
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
Created on 02-18-2017 11:04 AM - edited 08-19-2019 04:34 AM
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
Created 03-01-2017 05:11 PM
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