Unable to connect to database with provided credential
Cloudera Manager tests the database connection when you add the Hue service to a cluster. The "Test Database Connection" does not work for Oracle databases that require service name instead of the Oracle System ID (SID). This could stop you from adding the Hue service to your cluster.
If you encounter the following error while adding the Hue service through Cloudera Manager, then follow the workaround as mentioned in this topic:Unable to connect to database with provided credential. Able to find the Database server, but not the specified database. Please check if the database name is correct and make sure that the user can access the database.
-
Install a different database instance, such as MySql temporarily to use with Hue.
This is referred to as the Hue database. -
Add the Hue service from Cloudera Manager and specify the Hue database details that you created in the previous step.
This will allow you to get past the Add Service wizard and add the Hue service to your cluster.
-
Modify the Hue instance to use the actual Oracle database as follows:
-
Navigate to
.The database configuration fields are displayed.
-
Set up the Oracle database by configuring the following fields:
- Select Oracle as the Hue Database Type.
- In the Hue Database Hostname field, specify the Fully Qualified Domain Name (FQDN) of the host on which you have installed the Oracle database.
- In the Hue Database Port field, specify the port on the host on which the Oracle databse is running. Typically, this value is 1521.
- In the Hue Database Username field, specify the username to log in to the Oracle database.
- In the Hue Database Password field, specify the database password.
- In the Hue Database Name field, specify the name of the Hue database in the following format:
<HUE_DB_HOST>:1521/<servicename>
-
Navigate to Hue Service Advanced Configuration Snippet (Safety Valve) for hue_safety_valve.ini field:
and specify the following in the[desktop] [[database]] port=0
-
-
Click Save Changes.
-
Restart the Hue service by clicking
.