Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to change ambari hostLevelParams on Ambari?

How to change ambari hostLevelParams on Ambari?

Contributor

I am on HDP 2.3.2 using Ambari 2.1.2.1. I tried to reconfigure oracle ojdbc jar via ambari by the following:

  • $ambari-server setup --jdbc-db=oracle --jdbc-driver=/usr/share/java/ojdbc7.jar

However, upon restart HS2 ambari agent is still using odjbc6.jar. I took a look ambari restart HS2 operation output:

2016-04-24 22:57:59,569 - File['/var/lib/ambari-agent/tmp/ojdbc6.jar'] {'content': DownloadSource('http://$ambari-server:8080/resources//oracle-jdbc-driver.jar'), 'mode': 0644}

2016-04-24 22:57:59,569 - Downloading the file from http://$ambari-server:8080/resources//oracle-jdbc-driver.jar

2016-04-24 22:57:59,724 - Writing File['/var/lib/ambari-agent/tmp/ojdbc6.jar'] because it doesn't exist

In command output, it seems to still use old oracle_jdbc_url:

"hostLevelParams": {

"oracle_jdbc_url": "http://$ambari-server:8080/resources//ojdbc6.jar",

..

}

3 REPLIES 3

Re: How to change ambari hostLevelParams on Ambari?

Contributor

@wayne2chicago

Can you check if JDBC driver symllink at /var/lib/ambari-server/resources/oracle-jdbc-driver.jar points to ojdbc7.jar or ojdbc6.jar?

ls -lh /var/lib/ambari-server/resources/oracle-jdbc-driver.jar lrwxrwxrwx. 1 root root 43 Apr 25 19:51 /var/lib/ambari-server/resources/oracle-jdbc-driver.jar -> /var/lib/ambari-server/resources/ojdbc7.jar

Re: How to change ambari hostLevelParams on Ambari?

Contributor

Yes.

# ls -lh /var/lib/ambari-server/resources/oracle-jdbc-driver.jar

lrwxrwxrwx 1 root root 43 Apr 24 22:33 /var/lib/ambari-server/resources/oracle-jdbc-driver.jar -> /var/lib/ambari-server/resources/ojdbc7.jar

Re: How to change ambari hostLevelParams on Ambari?

Expert Contributor
@wayne2chicago

On ambari-server host, Please let us know the output of command: cat /etc/ambari-server/conf/ambari.properties | grep db.oracle.jdbc.name. It should be ojdbc7.jar

Don't have an account?
Coming from Hortonworks? Activate your account here