[
https://issues.apache.org/jira/browse/AMBARI-22580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16365172#comment-16365172
]
Sindhu Subhas edited comment on AMBARI-22580 at 2/15/18 6:27 AM:
-----------------------------------------------------------------
Fix for this is to add below snippet under
/var/lib/ambari-server/resources/common-services/STREAMLINE/0.5.0/package/scripts/params.py:
{code:java}
Line 209: Logger.info("sudo ambari-server setup --jdbc-db=oracle
--jdbc-driver=/usr/share/java/ojdbc.jar")
Line 211:
if 'postgres' == streamline_storage_type:
jdbc_driver_jar = default("/hostLevelParams/custom_postgres_jdbc_name", None)
if jdbc_driver_jar == None:
Logger.error("Failed to find postgres jar. Make sure you followed the steps to
register mysql driver")
Logger.info("Users should register the mysql java driver jar.")
Logger.info("Create a symlink e.g. ln -s /usr/share/java/postgres94-jdbc.jar
/usr/share/java/postgres-jdbc.jar")
Logger.info("sudo ambari-server setup --jdbc-db=postgres
--jdbc-driver=/usr/share/java/postgresql-jdbc.jar")
{code}
was (Author: ssubhas):
Fix for this is to add below snippet under
/var/lib/ambari-server/resources/common-services/STREAMLINE/0.5.0/package/scripts/params.py:
{code:java}
Line 209: Logger.info("sudo ambari-server setup --jdbc-db=oracle
--jdbc-driver=/usr/share/java/ojdbc.jar")
Line 211:
if 'postgres' == streamline_storage_type:
jdbc_driver_jar = default("/hostLevelParams/custom_postgres_jdbc_name", None)
if jdbc_driver_jar == None:
Logger.error("Failed to find postgres jar. Make sure you followed the steps to
register mysql driver")
Logger.info("Users should register the mysql java driver jar.")
Logger.info("Create a symlink e.g. ln -s /usr/share/java/postgres94-jdbc.jar
/usr/share/java/postgres-jdbc.jar")
Logger.info("sudo ambari-server setup --jdbc-db=postgres
--jdbc-driver=/usr/share/java/postgresql-jdbc.jar")
{code}
Also, attached sample params.py.
> Streaming Analytics Manager (SAM) not working with PostgreSQL
> -------------------------------------------------------------
>
> Key: AMBARI-22580
> URL: https://issues.apache.org/jira/browse/AMBARI-22580
> Project: Ambari
> Issue Type: Bug
> Components: ambari-server
> Reporter: Unai P. Mendizabal
> Priority: Major
>
> Hi!
> I was trying to install SAM on my Ambari cluster and trying to use the same
> PostgreSQL database I use for Ambari server. The installation fails though,
> with error "KeyError: 'jdbc_driver_jar" coming from the params.py file of the
> Streamline service. I dived into it and realized that variable
> 'jdbc_driver_jar' is never initialized for PostgreSQL databases, while it
> does when it comes to Oracle or MySQL.
> The file is
> /var/lib/ambari-server/resources/common-services/STREAMLINE/0.5.0/package/scripts/params.py,
> you can see the problem from line 192 on. As a workaround, I think it should
> be possible to manually set 'jdbc_driver_jar' to the path to the jdbc driver
> on that same file.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)