Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

”DBAccessorImpl:119 - Error while creating database accessor” while run command 'ambari-server start'

avatar
Explorer

while run command "ambari-server start",it get back this error:

11 Jul 2018 17:19:47,221 ERROR [main] DBAccessorImpl:119 - Error while creating database accessor org.postgresql.util.PSQLException: FATAL: password authentication failed for user "ambari"


it says wrong password for ‘ambari’,but when i setup ambari-server i choose the default option. The default passwd for pg is 'bigdata', and i can login pg . So ,why it prompt wrong passwd?

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Zyann

Can you please check the following files to understand what password ambari is assuming for the Database?

# grep 'server.jdbc.user.passwd' /etc/ambari-server/conf/ambari.properties 
server.jdbc.user.passwd=/etc/ambari-server/conf/password.dat

# cat /etc/ambari-server/conf/password.dat
bigdata

.

Also please check if the user is able to access the Database using command line with the mentioned credentials?

# psql -U ambari ambari -h yourdatabase.example.com
Password for user ambari: bigdata

.

You should also check your Postgres Setting to verify if it has given access to 'ambari' ?

# grep 'ambari' /var/lib/pgsql/data/pg_hba.conf
local  all  ambari,mapred md5
host  all   ambari,mapred 0.0.0.0/0  md5
host  all   ambari,mapred ::/0 md5

.

View solution in original post

4 REPLIES 4

avatar
Master Mentor

@Zyann

Can you please check the following files to understand what password ambari is assuming for the Database?

# grep 'server.jdbc.user.passwd' /etc/ambari-server/conf/ambari.properties 
server.jdbc.user.passwd=/etc/ambari-server/conf/password.dat

# cat /etc/ambari-server/conf/password.dat
bigdata

.

Also please check if the user is able to access the Database using command line with the mentioned credentials?

# psql -U ambari ambari -h yourdatabase.example.com
Password for user ambari: bigdata

.

You should also check your Postgres Setting to verify if it has given access to 'ambari' ?

# grep 'ambari' /var/lib/pgsql/data/pg_hba.conf
local  all  ambari,mapred md5
host  all   ambari,mapred 0.0.0.0/0  md5
host  all   ambari,mapred ::/0 md5

.

avatar
Explorer
grep 'server.jdbc.user.passwd' /etc/ambari-server/conf/ambari.properties
server.jdbc.user.passwd=/etc/ambari-server/conf/password.dat

cat /etc/ambari-server/conf/password.dat
bigdata

avatar
Master Mentor

@Zyann

Please check your DB config .. and make the changes according to the following and then restart postgresql.

# grep 'ambari' /var/lib/pgsql/data/pg_hba.conf
local  all  ambari,mapred md5
host  all   ambari,mapred 0.0.0.0/0  md5
host  all   ambari,mapred ::/0 md5

.

If you still face any issue then please share the following details:

1. /var/lib/pgsql/data/pg_hba.conf

2. Output of the following command:

# grep 'jdbc'  /etc/ambari-server/conf/ambari.properties 

3. Are you able to login to DB using the following command?

# psql -U ambari ambari -h yourdatabase.example.com
Password for user ambari: bigdata

ambari=>

.

avatar
Explorer

thanks,i have solved this problem.