3

I'm having problems accessing the Cloudera Manager UI because of problems with the embedded PostgreSQL database.

The web UI shows me:

HTTP ERROR 500

Problem accessing /cmf/home. Reason:

org.hibernate.exception.GenericJDBCException: Could not open connection Caused by:

javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection (...)

This seems to be because of what I find in /var/log/cloudera-scm-server/db.log:

FATAL:  password authentication failed for user "scm"

I've tried deleting /etc/cloudera-scm-server-db/db.*, and /var/lib/cloudera-scm-server-db/data/, and restarting the cloudera-scm-server-db service, but to no avail.

The weird thing is that I CAN access the database using:

psql -U scm -p 7432 -h localhost -d scm

with the generated password from /etc/cloudera-scm-server-db/db.properties.

I can also access using user cloudera-scm with the generated password in /var/lib/cloudera-scm-server-db/data/generated_password.txt without problem.

Any ideas are appreciated.

Def_Os
  • 5,301
  • 5
  • 34
  • 63

1 Answers1

2

The password in generated_password.txt is for different user i.e. cloudera-scm

  1. Run below command and enter the password found in /var/lib/cloudera-scm-server-db/data/generated_password.txt

    psql -U cloudera-scm -p 7432 -h localhost -d postgres

  2. Run \l to determine the database and owner names: postgres=# \l List of databases Name | Owner | Encoding | Collation | Ctype | Access privileges
    -----------+--------------+----------+------------+------------+----------------------------------- amon | amon | UTF8 | en_US.UTF8 | en_US.UTF8 | hive | hive | UTF8 | en_US.UTF8 | en_US.UTF8 | nav | nav | UTF8 | en_US.UTF8 | en_US.UTF8 | navms | navms | UTF8 | en_US.UTF8 | en_US.UTF8 | postgres | cloudera-scm | UTF8 | en_US.UTF8 | en_US.UTF8 | rman | rman | UTF8 | en_US.UTF8 | en_US.UTF8 | scm | scm | UTF8 | en_US.UTF8 | en_US.UTF8 | template0 | cloudera-scm | UTF8 | en_US.UTF8 | en_US.UTF8 | =c/"cloudera-scm" : "cloudera-scm"=CTc/"cloudera-scm" template1 | cloudera-scm | UTF8 | en_US.UTF8 | en_US.UTF8 | =c/"cloudera-scm" : "cloudera-scm"=CTc/"cloudera-scm" (9 rows)

  3. Set the password for an owner using the \password command. For example, to set the password for the scm owner, do the following:

    postgres=# \password amon Enter new password: Enter it again:

This way you can change password of scm user.

PS. sorry for poor formatting.

Amit Kumar
  • 2,685
  • 2
  • 37
  • 72