Support Questions

Find answers, ask questions, and share your expertise

Schema version table SCHEMA_VERSION exists but contains no rows - Failed to start Cloudera CM Server Service

avatar

After Cloudera CM Server Service restart for CFM installation, CM Server failed to start with the following error in log file:

Caused by: java.sql.SQLException: Schema version table SCHEMA_VERSION exists but contains no rows.
at com.cloudera.enterprise.dbutil.DbUtil.getSchemaVersion(DbUtil.java:246)
at com.cloudera.enterprise.dbutil.DbUtil$1SchemaVersionWork.execute(DbUtil.java:185)
at org.hibernate.jdbc.WorkExecutor.executeWork(WorkExecutor.java:37)
at org.hibernate.internal.SessionImpl$1.accept(SessionImpl.java:2289)
at org.hibernate.internal.SessionImpl$1.accept(SessionImpl.java:2286)
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:314)
at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:2308)
at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:2293)
at com.cloudera.enterprise.dbutil.DbUtil.getSchemaVersion(DbUtil.java:197)
at com.cloudera.server.cmf.bootstrap.EntityManagerFactoryBean.checkVersionDoFail(EntityManagerFactoryBean.java:362)
at com.cloudera.server.cmf.bootstrap.EntityManagerFactoryBean.getObject(EntityManagerFactoryBean.java:174)
at com.cloudera.server.cmf.bootstrap.EntityManagerFactoryBean.getObject(EntityManagerFactoryBean.java:76)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:178)
... 22 more

 

After select SCHEMA_VERSION in mariadb, the content exists:

MariaDB [scm]> select * from SCHEMA_VERSION;

+---------+-------------+

| VERSION | OLD_VERSION |

+---------+-------------+

|   70100 |       70100 |

+---------+-------------+

1 row in set (0.00 sec)

 

Is there a possibility that some dependent table to start the service is corrupted?

CM: 7.0.3

1 ACCEPTED SOLUTION

avatar
New Contributor

When you start the Cloudera Manager, it consult the file db.properties in the folder /etc/cloudera-scm-server. Verify if your configuration it's correct.

View solution in original post

2 REPLIES 2

avatar
New Contributor

When you start the Cloudera Manager, it consult the file db.properties in the folder /etc/cloudera-scm-server. Verify if your configuration it's correct.

avatar

Thank you, Danilo!

 

For some reason, scm_prepare_database.sh was executed for hive database after objects creation in mySQL db and create a misconfiguration in db.properties. When trying to start cm server, the SCHEMA_VERSION was unable to be read.

 

Regards,

Caseiro.