You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Mathias Herzog (JIRA)" <ji...@apache.org> on 2015/11/25 15:24:11 UTC

[jira] [Created] (AMBARI-14067) wrong DB_JDBC_PATTERNS for Oracle DBs in app.js

Mathias Herzog created AMBARI-14067:
---------------------------------------

             Summary: wrong DB_JDBC_PATTERNS for Oracle DBs in app.js
                 Key: AMBARI-14067
                 URL: https://issues.apache.org/jira/browse/AMBARI-14067
             Project: Ambari
          Issue Type: Bug
          Components: ambari-web
    Affects Versions: 2.1.0, 2.1.1, Ambari-2.1.3
         Environment: Oracle JDBC configuration for Hive and Oozie
            Reporter: Mathias Herzog
            Priority: Critical


Hi

The Web configuration page for HIVE, YARN and Oozie doesn't render (remains white) and the console shows following error:
Uncaught TypeError: Cannot read property 'replace' of null -> 

this issue happens because of wrong DB_JDBC_PATTERNS if one of the following configurations are present for oozie and hive 

dbType = oracle and dbPort != 1521

or

dbTyppe = Oracle-RAC
In this case, the connection string looks like:
jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host1.example.com)(PORT=1532)) (ADDRESS=(PROTOCOL=TCP)(HOST=host2.example.com)(PORT=1532)))(CONNECT_DATA=(SERVICE_NAME=service.X.example.com)))

suggested fix in database.js
1. change port in oracle pattern from 1521 to something generic
2. add a new pattern for oracle RAC databases
3. maybe fix the port issue for postgres as well (couldn't test that)

{code:title=app.js|borderStyle=solid}
  DB_JDBC_PATTERNS: {
    mysql: 'jdbc:mysql://{0}/{1}',
    mssql: 'jdbc:sqlserver://{0};databaseName={1}',
    postgres: 'jdbc:postgresql://{0}:5432/{1}',
    derby: 'jdbc:derby:{0}/{1}',
    oracle: 'jdbc:oracle:thin:@(?:\/?\/?)(.*):[0-9]+(:|\/)(.*)',
    rac: 'jdbc:oracle:thin:@(?:\/?\/?).*HOST=(\\S*?)\\)\\S+PORT=(\\S*?)\\)\\S+SERVICE_NAME=(\\S*?)\\)',
    sqla: 'jdbc:sqlanywhere:host={0};database={1}'
  },
{code}

kind regards
Mathias



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)