Support Questions

Find answers, ask questions, and share your expertise

Creating SCM configuration file in /etc/cloudera-scm-server

avatar
New Contributor

xecuting: /usr/java/jdk1.8.0_202-amd64/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/share/java/oracle-connector-java.jar:/usr/share/java/postgresql-connector-java.jar:/opt/cloudera/cm/schema/../lib/* com.cloudera.enterprise.dbutil.DbCommandExecutor /etc/cloudera-scm-server/db.properties com.cloudera.cmf.db.
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
[ main] DbCommandExecutor ERROR Error when connecting to database.
java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:102)[mysql-connector-j.jar:9.1.0]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:114)[mysql-connector-j.jar:9.1.0]
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:837)[mysql-connector-j.jar:9.1.0]
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:420)[mysql-connector-j.jar:9.1.0]
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:238)[mysql-connector-j.jar:9.1.0]
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:180)[mysql-connector-j.jar:9.1.0]
at java.sql.DriverManager.getConnection(DriverManager.java:664)[:1.8.0_202]
at java.sql.DriverManager.getConnection(DriverManager.java:247)[:1.8.0_202]
at com.cloudera.enterprise.dbutil.DbCommandExecutor.testDbConnection(DbCommandExecutor.java:265)[db-common-7.11.3.6912fbdbe0c739ef46654ed952f5e6cd.jar:]
at com.cloudera.enterprise.dbutil.DbCommandExecutor.main(DbCommandExecutor.java:140)[db-common-7.11.3.6912fbdbe0c739ef46654ed952f5e6cd.jar:]
[ main] DbCommandExecutor ERROR Exiting with exit code 4

1 ACCEPTED SOLUTION

avatar
Master Collaborator

@ecampos 

To resolve this issue and to allow CM server to start, modify the db.properties file as below:

 Note: Back up the current file at /etc/cloudera-scm-server/db.properties.

---------------
com.cloudera.cmf.db.type = mysql
com.cloudera.cmf.orm.hibernate.connection.url=jdbc:mysql://<db_host>/scm?allowPublicKeyRetrieval=true&useSSL=false
com.cloudera.cmf.orm.hibernate.connection.username=scm
com.cloudera.cmf.orm.hibernate.connection.password=cloudera
com.cloudera.cmf.db.setupType=EXTERNAL
---------------

View solution in original post

6 REPLIES 6

avatar
Community Manager

@ecampos, Welcome to our community! To help you get the best possible answer, I have tagged our Cloudera Manager experts @paras @Majeti @_Umesh  who may be able to assist you further.

Please feel free to provide any additional information or details about your query. We hope that you will find a satisfactory solution to your question.



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Expert Contributor

It seems public key retreival is false. Please make it true using below in the db.properties

 

com.cloudera.cmf.db.type = mysql com.cloudera.cmf.orm.hibernate.connection.url=jdbc:mysql:///scm?allowPublicKeyRetrieval=true

com.cloudera.cmf.orm.hibernate.connection.username= com.cloudera.cmf.orm.hibernate.connection.password=

avatar
Master Collaborator

@ecampos 

To resolve this issue and to allow CM server to start, modify the db.properties file as below:

 Note: Back up the current file at /etc/cloudera-scm-server/db.properties.

---------------
com.cloudera.cmf.db.type = mysql
com.cloudera.cmf.orm.hibernate.connection.url=jdbc:mysql://<db_host>/scm?allowPublicKeyRetrieval=true&useSSL=false
com.cloudera.cmf.orm.hibernate.connection.username=scm
com.cloudera.cmf.orm.hibernate.connection.password=cloudera
com.cloudera.cmf.db.setupType=EXTERNAL
---------------

avatar
New Contributor

my  db.properties file :

com.cloudera.cmf.db.type=mysql
com.cloudera.cmf.db.host=localhost
com.cloudera.cmf.db.name=scm
com.cloudera.cmf.db.user=scm
com.cloudera.cmf.db.setupType=EXTERNAL
com.cloudera.cmf.db.password=Temporal_235

avatar
New Contributor

I don't know if I should change or put the line that they indicate

 com.cloudera.cmf.orm.hibernate.connection.url=jdbc:mysql://<db_host>/scm?allowPublicKeyRetrieval=true&useSSL=false

like:

com.cloudera.cmf.orm.hibernate.connection.url=jdbc:mysql://localhost/scm?allowPublicKeyRetrieval=true&useSSL=false

avatar
Master Collaborator

@ecampos Yes try the same with localhost or IP.