Support Questions

Find answers, ask questions, and share your expertise

Able to find the database server and database, but logon request was rejected.

avatar
Explorer

I am trying to point out Cloudera Manager to an external PostgresSQL database. 

The external database is running and able to connect to the database (command line) 

Created all required database by following https://www.cloudera.com/documentation/enterprise/latest/topics/cm_ig_extrnl_pstgrs.html#cmig_topic_...

 

Below is the error I thrown at me when I am trying to setup Activity Monitor and Reports Manager

 Logon denied for user/password. Able to find the database server and database, but logon request was rejected.
 
This is what I found in logs
2018-08-31 12:25:19,729 INFO CommandPusher:com.cloudera.cmf.model.DbCommand: Command 64(AmonTestDatabaseConnection) has completed. finalstate:FINISHED, success:false, msg:Logon denied for user/password. Able to find the database server and database, but logon request was rejected.
 
Please help me out in this.
Thanks 
14 REPLIES 14

avatar
Master Guru

@nitinz,

 

Hi,

 

If you don't have the cloudera-manager-server-db-2 package, how do you have the db.mgmt.properties file?

Did you remove it at some point?

 

In any case, a couple things:

 

(1)

 

You don't need Activity Monitor role unless you are using MapReduce1.  You can not use that role.

 

(2)

 

It appears you have not entered hostname and port in the Database Setup

 

(3)

 

If you do have a /etc/cloudera-scm-server/db.mgmt.properties, please remove it from that directory.  It is possible that its presence is causing problems for the connection test as you should not have db.mgmt.properties if you are not using the embedded database.  All database configurations except for Cloudera Manager's are stored in Cloudera Manager's database, not in flat files.

avatar
Explorer

I am facing the same issue connection with Hue.per your instructions i have removed the db.properties and cloudera manager does not start at all..

 

-- Subject: Unit cloudera-scm-server.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit cloudera-scm-server.service has finished shutting down.
Feb 07 14:17:28 fsgbu-phx-10 systemd[1]: start request repeated too quickly for cloudera-scm-server.service
Feb 07 14:17:28 fsgbu-phx-10 systemd[1]: Failed to start Cloudera CM Server Service.
-- Subject: Unit cloudera-scm-server.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit cloudera-scm-server.service has failed.
--

avatar
Guru

Hi @HKG ,

 

We are sorry to hear you are having some trouble. Can you open a new thread and provide us with some background of what you are trying to do and what is happening. If you can give us some screen shots that would help make sure we understand what you are seeing.

 

Also, I noticed you mentioned you deleted db.properties instead of db.mgmt.properties which was mentioned in old threads. db.properties is the configuration file needed for Cloudera Manager database details. That file should not be deleted. Do you have a backup of the file? If so, please restore the file and set the permission to be:

-rw------- 1 cloudera-scm cloudera-scm

Then try to restart CM server again.

 

Hope this helps. If not, please open a new thread and provide more information.

 

Thanks!

Li Wang, Technical Solution Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:

Terms of Service

Community Guidelines

How to use the forum

avatar
Master Guru

Hi @HKG , It seems you may have deleted the wrong file. 

 

In my instructions I suggested trying to remove /etc/cloudera-scm-server/db.mgmt.properties

 

However, you deleted: db.properties

 

"db.properties" contains configuration information for Cloudera Manager's connection to the backing SQL database, so CM won't start without it.

 

db.mgmt.properties is not going to influence Hue connections as the Hue DB configuration.  Please restore the db.properties file so CM can start.  After that, open a new thread with "Hue" and "Cloudera Manager" labels, include a screen shot of the problem as you observe it, and we should be able to help out.

 

Cheers,

 

Ben

avatar
New Contributor

Hello, 

 

I had the same issue and this is your /var/lib/pgsql/data/pg_hba.conf 

 

By default, PostgreSQL accepts connections only from the localhost. It refuses remote connections. This is controlled by applying an access control rule that allows a user to log in from an IP address after providing a valid password (the md5 keyword). To accept a remote connection, add : 

 

host all all 0.0.0.0/0 md5

 

 Maybe you should restrict as you wish.

 

Regards