Support Questions

Find answers, ask questions, and share your expertise

Unable to verify database connection

avatar
Champion Alumni

Trying to point cloudera manager to  the database while installation.I am pastinng the error trace.Any one knows what the issue could be.I have the  oracle db driver.

 

Executing: /usr/java/default/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/share/cmf/schema/../lib/* com.cloudera.enterprise.dbutil.DbCommandExecutor /etc/cloudera-scm-server/db.properties com.cloudera.cmf.db.
[ main] DbCommandExecutor INFO Able to connect to db server on host '10.7.123.21:1530' but not able to find database 'cluderamgr'.
[ main] DbCommandExecutor ERROR Error when connecting to database.
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:458)[ojdbc6.jar:11.2.0.3.0]

1 ACCEPTED SOLUTION

avatar
Champion Alumni

It was a problem with specifying the TNS name.Got That resolved.Thank you all.

View solution in original post

10 REPLIES 10

avatar
Champion Alumni

Can any body help me with this?

avatar
Guru

I notice you have the mysql-java-connector in your classpath, maybe that should be moved out of the way so that the oracle driver is the only one that can pick up the connection?

avatar

It sounds like the user doesn't exist in your oracle database. Did you already create the user in your Oracle database?

 

What's the command-line invocation that you used?

avatar
Guru

Oh, good point, and are you sure there's not a typo in the db name?  Did you really create the db in Oracle as "cluderamgr"?

avatar
Champion Alumni

here is the command line invocation

 

 

scm_prepare_database.sh -h10.x.x..x -P1000 --scm-host x.x.x.x oracle  ENTLOG user pwrd.

avatar
Champion Alumni

If some can point to the log file location it would be great

avatar
The relevant error is already displayed. It looks like your Oracle TNS listener doesn't know the Oracle SID "ENTLOG". Is that the right TNS name?
"
[ main] DbCommandExecutor INFO Able to connect to db server on host '10.7.123.21:1530' but not able to find database 'ENTLOG'.
[ main] DbCommandExecutor ERROR Error when connecting to database.
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
"

Does the following work from the machine where you are trying to run CM server? This is basically what the scm script is trying to do. (replace with real user and password)
sqlplus user/pwrd@10.7.123.21:1530/ENTLOG

You also probably don't need to specify --scm-host, though I don't think that would cause this error.

avatar
Champion Alumni

It was a problem with specifying the TNS name.Got That resolved.Thank you all.

avatar
Champion Alumni

There is no mysql jdbc jar on class pasth .It is echoed from the cloudera shell.In fact I copiedmy oracle jdbc jar file to that location but I am still getting the same result.This i sthe command I run to prepare my database.

 

scm_prepare_database.sh -h10.x.x..x -P1000 --scm-host x.x.x.x oracle  ENTLOG user pwrd.

 

Below is the stack trace.Any break through.I am able to telnet to this db server port from my cloudera manager host.

 

Executing: /usr/java/default/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/share/cmf/schema/../lib/* com.cloudera.enterprise.dbutil.DbCommandExecutor /etc/cloudera-scm-server/db.properties com.cloudera.cmf.db.
[ main] DbCommandExecutor INFO Able to connect to db server on host '10.7.123.21:1530' but not able to find database 'ENTLOG'.
[ main] DbCommandExecutor ERROR Error when connecting to database.
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:458)[ojdbc6.jar:11.2.0.3.0]
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)[ojdbc6.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)[ojdbc6.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)[ojdbc6.jar:11.2.0.3.0]
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)[ojdbc6.jar:11.2.0.3.0]
at java.sql.DriverManager.getConnection(DriverManager.java:571)[:1.7.0_51]
at java.sql.DriverManager.getConnection(DriverManager.java:215)[:1.7.0_51]
at com.cloudera.enterprise.dbutil.DbCommandExecutor.testDbConnection(DbCommandExecutor.java:229)[common-4.8.2.jar:]
at com.cloudera.enterprise.dbutil.DbCommandExecutor.main(DbCommandExecutor.java:132)[common-4.8.2.jar:]
[ main] DbCommandExecutor ERROR Exiting with exit code 7
--> Error 7, giving up (use --force if you wish to ignore the error)