top of page
doddy.sebastianus

Configure Hue with Oracle RAC in CDH

I would like to share my experience configuring Hue with Oracle RAC. Last year I came across a client who uses Oracle RAC Database as the CDH metadata.

During the initial setup, you are asked to enter database information like below:


In this page, we would normally enter the following info

Hostname : <Oracle RAC Scan IP>

Database Type: Oracle

Database Name: <Service Name>

Username: <username>

Password: <password>


Everything test successfully EXCEPT for HUE. Hue will not be able to establish the connection successfully to Oracle RAC with above configuration.


As a workaround, we specify the following for hue:

Hostname : <Oracle RAC Scan IP>

Database Type: Oracle

Database Name: <Service Name/SID of one of the instance>

Username: <username>

Password: <password>


I accepted the fact that it is the only way to do it for a year since I could not find any info on the web about it.


Until One day the unexpected happened, the database instance had to be taken down due to some problem. Everything else works EXCEPT for HUE and Client demanded that hue keeps working in this situation.


With the help with cloudera support we finally figure out how to configure HUE to connect to Oracle RAC in HA/Failover way. With the updated config, HUE will continue to work even when one of the Oracle RAC instance is down.


Here is the additional configuration that you need to change after the cluster has been created.

1. Go to Hue > Configuration > Database > Hue Database Name

2. Enter the database name in the following format


(DESCRIPTION=(LOAD_BALANCE=off)(FAILOVER=on)(CONNECT_TIMEOUT=5)(TRANSPORT_CONNECT_TIMEOUT=3)(RETRY_COUNT=3)(ADDRESS=(PROTOCOL=TCP)(HOST=<scan ip>)(PORT=<port>))(CONNECT_DATA=(SERVICE_NAME=<service name>)))


With above config, HUE should continue working even when only once Oracle RAC instance is up.


Note:

- I have only tested this on CDH 5.14+

- Screenshot above is taken from cloudera website to illustrate the page I was referring to.


341 views0 comments

Comments


bottom of page