Created 08-01-2025 06:11 AM
I have created a mysql database (scm) & user (scm@localhost) on a RHEL7 server. CM server version is cloudera-manager-server-7.6.7-36957245.el7.x86_64; mysql version is mysql Ver 8.0.42 for Linux on x86_64 (MySQL Community Server - GPL).
DB user has following grants...mysql> grant select, insert, update, delete, create, drop on scm.* to 'scm'@'localhost';
When the scm_prepare_database.sh script is executed, it returns "All done, your SCM database is configured correctly!" HOWEVER, multiple database tables are NOT created & the cloudera-scm-server.service will NOT stay started.
cloudera-scm-server.log returns multiple errors like
Caused by: java.sql.SQLSyntaxErrorException: Table 'scm.CM_VERSION' doesn't exist
Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
Caused by: java.lang.RuntimeException: Unable to obtain CM release version.
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactoryBean': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Unable to obtain CM release version.
2025-07-31 23:49:30,224 ERROR main:com.cloudera.server.cmf.Main: Server failed.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.cloudera.server.cmf.TrialState': Cannot resolve reference to bean 'entityManagerFactoryBean' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactoryBean': FactoryBean threw exception on object creation; nested excption is java.lang.RuntimeException: Unable to obtain CM release version.
Cloudera Support is unable to help so .
Any ideas how to resolve java bean errors or at minimum have DDL of necessary tables to build for core mysql db build?
Appreciate any ideas!
Created 08-01-2025 05:56 PM
Hello @Joyful
Thank you for reaching out to the Cloudera Community
I hope the below has been completed fine
https://docs.cloudera.com/cdp-private-cloud-base/7.1.9/installation/topics/cm_ig_mysql.html
If possible, can you check whether the entries in /etc/cloudera-scm-server/db.properties are correct? This would be modified by the script only. Also could you please share the syntax that you are using while running the script
Double-check the character set as well in the Database
CREATE DATABASE <database> DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
If you find anything wrong, drop the database, re-create it with the privileges, and run the script again
Awaiting your response
Created 09-24-2025 08:28 PM
Hello, friendly reminder for you.
The scm_prepare_database.sh script is used to create and configure a database for the Cloudera Manager Server. It can create the Cloudera Manager Server database configuration file, check the connection between the Cloudera Manager Server and the database, and then after a successful connection, generate and populate necessary tables in the /etc/cloudera-scm-server/db.properties file.
That is why multiple database tables are not created until a successful connection takes place.
This ensures the database is set up and ready for use by Cloudera Manager.