MangoES H2 error
-
I appear to have an error in my H2 database, on a MangoES (MangoGT).
Mango dies shortly after launching, with the following entry in the log:
INFO 2020-10-20T12:55:44,259 (com.serotonin.m2m2.db.H2Proxy.initializeImpl:64) - Initializing H2 connection manager INFO 2020-10-20T12:55:48,090 (com.serotonin.m2m2.db.upgrade.DBUpgrade.checkUpgrade:38) - Starting instance with core version 3.7.7, schema v29 INFO 2020-10-20T12:55:48,093 (com.infiniteautomation.nosql.MangoNoSqlProxy.initialize:77) - Starting MangoNoSql Database INFO 2020-10-20T12:55:48,282 (com.infiniteautomation.tsdb.impl.IasTsdbImpl.<init>:144) - Database at /opt/mango/databases/mangoTSDB started INFO 2020-10-20T12:55:48,386 (com.infiniteautomation.tsdb.impl.IasTsdbImpl.<init>:173) - Empty dir delete for database at /opt/mango/databases/mangoTSDB took 58ms INFO 2020-10-20T12:55:48,444 (com.infiniteautomation.tsdb.impl.IasTsdbImpl.<init>:144) - Database at /opt/mango/databases/mangoTSDBAux started INFO 2020-10-20T12:55:48,475 (com.infiniteautomation.tsdb.impl.IasTsdbImpl.<init>:173) - Empty dir delete for database at /opt/mango/databases/mangoTSDBAux took 0ms ERROR 2020-10-20T12:56:01,722 (com.serotonin.m2m2.Main.main:162) - Error during initialization org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'emailAddressVerificationService': Invocation of init method failed; nested exception is org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [select settingValue from systemSettings where settingName=?]; SQL state [HY000]; error code [50000]; General error: "java.lang.RuntimeException: rowCount expected 9222 got 9594 LOBS.INDEX_LOB_TABLE"; SQL statement: INSERT INTO INFORMATION_SCHEMA.LOBS(ID, BYTE_COUNT, `TABLE`) SELECT ?, BYTE_COUNT, ? FROM INFORMATION_SCHEMA.LOBS WHERE ID = ? [50000-199]; nested exception is org.h2.jdbc.JdbcSQLNonTransientException: General error: "java.lang.RuntimeException: rowCount expected 9222 got 9594 LOBS.INDEX_LOB_TABLE"; SQL statement: INSERT INTO INFORMATION_SCHEMA.LOBS(ID, BYTE_COUNT, `TABLE`) SELECT ?, BYTE_COUNT, ? FROM INFORMATION_SCHEMA.LOBS WHERE ID = ? [50000-199] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:139) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:414) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1770) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:843) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE] at com.serotonin.m2m2.Lifecycle.springRuntimeContextInitialize(Lifecycle.java:385) ~[ma-priv-3.7.7.jar:?] at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:288) ~[ma-priv-3.7.7.jar:?] at com.serotonin.m2m2.Main.main(Main.java:159) ~[ma-priv-3.7.7.jar:?] Caused by: org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [select settingValue from systemSettings where settingName=?]; SQL state [HY000]; error code [50000]; General error: "java.lang.RuntimeException: rowCount expected 9222 got 9594 LOBS.INDEX_LOB_TABLE"; SQL statement: INSERT INTO INFORMATION_SCHEMA.LOBS(ID, BYTE_COUNT, `TABLE`) SELECT ?, BYTE_COUNT, ? FROM INFORMATION_SCHEMA.LOBS WHERE ID = ? [50000-199]; nested exception is org.h2.jdbc.JdbcSQLNonTransientException: General error: "java.lang.RuntimeException: rowCount expected 9222 got 9594 LOBS.INDEX_LOB_TABLE"; SQL statement: INSERT INTO INFORMATION_SCHEMA.LOBS(ID, BYTE_COUNT, `TABLE`) SELECT ?, BYTE_COUNT, ? FROM INFORMATION_SCHEMA.LOBS WHERE ID = ? [50000-199] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:89) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1442) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:632) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:668) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:699) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:711) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at com.serotonin.db.spring.ExtendedJdbcTemplate.queryForObject(ExtendedJdbcTemplate.java:39) ~[mango-3.7.7.jar:?] at com.serotonin.db.spring.ExtendedJdbcTemplate.queryForObject(ExtendedJdbcTemplate.java:63) ~[mango-3.7.7.jar:?] at com.serotonin.db.DaoUtils.queryForObject(DaoUtils.java:278) ~[mango-3.7.7.jar:?] at com.serotonin.m2m2.db.dao.SystemSettingsDao.lambda$getValue$0(SystemSettingsDao.java:276) ~[mango-3.7.7.jar:?] at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705) ~[?:?] at com.serotonin.m2m2.db.dao.SystemSettingsDao.getValue(SystemSettingsDao.java:275) ~[mango-3.7.7.jar:?] at com.serotonin.m2m2.db.dao.SystemSettingsDao.getValue(SystemSettingsDao.java:259) ~[mango-3.7.7.jar:?] at com.infiniteautomation.mango.spring.components.EmailAddressVerificationService.loadKeyPair(EmailAddressVerificationService.java:107) ~[mango-3.7.7.jar:?] at com.infiniteautomation.mango.jwt.JwtSignerVerifier.postConstruct(JwtSignerVerifier.java:62) ~[mango-3.7.7.jar:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:363) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:307) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] ... 14 more Caused by: org.h2.jdbc.JdbcSQLNonTransientException: General error: "java.lang.RuntimeException: rowCount expected 9222 got 9594 LOBS.INDEX_LOB_TABLE"; SQL statement: INSERT INTO INFORMATION_SCHEMA.LOBS(ID, BYTE_COUNT, `TABLE`) SELECT ?, BYTE_COUNT, ? FROM INFORMATION_SCHEMA.LOBS WHERE ID = ? [50000-199] at org.h2.message.DbException.getJdbcSQLException(DbException.java:502) ~[h2-1.4.199.jar:1.4.199] at org.h2.message.DbException.getJdbcSQLException(DbException.java:427) ~[h2-1.4.199.jar:1.4.199] at org.h2.message.DbException.get(DbException.java:194) ~[h2-1.4.199.jar:1.4.199] at org.h2.message.DbException.convert(DbException.java:347) ~[h2-1.4.199.jar:1.4.199] at org.h2.table.PageStoreTable.addRow(PageStoreTable.java:112) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.dml.Insert.addRowImpl(Insert.java:251) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.dml.Insert.insertRows(Insert.java:207) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.dml.Insert.update(Insert.java:132) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.CommandContainer.update(CommandContainer.java:133) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.Command.executeUpdate(Command.java:267) ~[h2-1.4.199.jar:1.4.199] at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:200) ~[h2-1.4.199.jar:1.4.199] at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:154) ~[h2-1.4.199.jar:1.4.199] at org.h2.store.LobStorageBackend.copyLob(LobStorageBackend.java:466) ~[h2-1.4.199.jar:1.4.199] at org.h2.value.ValueLobDb.copyToResult(ValueLobDb.java:554) ~[h2-1.4.199.jar:1.4.199] at org.h2.value.ValueLobDb.copyToResult(ValueLobDb.java:40) ~[h2-1.4.199.jar:1.4.199] at org.h2.result.LocalResultImpl.cloneLobs(LocalResultImpl.java:280) ~[h2-1.4.199.jar:1.4.199] at org.h2.result.LocalResultImpl.addRow(LocalResultImpl.java:315) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.dml.Select.queryFlat(Select.java:744) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.dml.Select.queryWithoutCache(Select.java:884) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.dml.Query.queryWithoutCacheLazyCheck(Query.java:151) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.dml.Query.query(Query.java:435) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.dml.Query.query(Query.java:397) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.CommandContainer.query(CommandContainer.java:145) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.Command.executeQuery(Command.java:202) ~[h2-1.4.199.jar:1.4.199] at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:115) ~[h2-1.4.199.jar:1.4.199] at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:677) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:616) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:668) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:699) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:711) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at com.serotonin.db.spring.ExtendedJdbcTemplate.queryForObject(ExtendedJdbcTemplate.java:39) ~[mango-3.7.7.jar:?] at com.serotonin.db.spring.ExtendedJdbcTemplate.queryForObject(ExtendedJdbcTemplate.java:63) ~[mango-3.7.7.jar:?] at com.serotonin.db.DaoUtils.queryForObject(DaoUtils.java:278) ~[mango-3.7.7.jar:?] at com.serotonin.m2m2.db.dao.SystemSettingsDao.lambda$getValue$0(SystemSettingsDao.java:276) ~[mango-3.7.7.jar:?] at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705) ~[?:?] at com.serotonin.m2m2.db.dao.SystemSettingsDao.getValue(SystemSettingsDao.java:275) ~[mango-3.7.7.jar:?] at com.serotonin.m2m2.db.dao.SystemSettingsDao.getValue(SystemSettingsDao.java:259) ~[mango-3.7.7.jar:?] at com.infiniteautomation.mango.spring.components.EmailAddressVerificationService.loadKeyPair(EmailAddressVerificationService.java:107) ~[mango-3.7.7.jar:?] at com.infiniteautomation.mango.jwt.JwtSignerVerifier.postConstruct(JwtSignerVerifier.java:62) ~[mango-3.7.7.jar:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:363) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:307) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] ... 14 more Caused by: java.lang.RuntimeException: rowCount expected 9222 got 9594 LOBS.INDEX_LOB_TABLE at org.h2.message.DbException.throwInternalError(DbException.java:293) ~[h2-1.4.199.jar:1.4.199] at org.h2.table.PageStoreTable.checkRowCount(PageStoreTable.java:122) ~[h2-1.4.199.jar:1.4.199] at org.h2.table.PageStoreTable.addRow(PageStoreTable.java:95) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.dml.Insert.addRowImpl(Insert.java:251) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.dml.Insert.insertRows(Insert.java:207) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.dml.Insert.update(Insert.java:132) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.CommandContainer.update(CommandContainer.java:133) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.Command.executeUpdate(Command.java:267) ~[h2-1.4.199.jar:1.4.199] at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:200) ~[h2-1.4.199.jar:1.4.199] at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:154) ~[h2-1.4.199.jar:1.4.199] at org.h2.store.LobStorageBackend.copyLob(LobStorageBackend.java:466) ~[h2-1.4.199.jar:1.4.199] at org.h2.value.ValueLobDb.copyToResult(ValueLobDb.java:554) ~[h2-1.4.199.jar:1.4.199] at org.h2.value.ValueLobDb.copyToResult(ValueLobDb.java:40) ~[h2-1.4.199.jar:1.4.199] at org.h2.result.LocalResultImpl.cloneLobs(LocalResultImpl.java:280) ~[h2-1.4.199.jar:1.4.199] at org.h2.result.LocalResultImpl.addRow(LocalResultImpl.java:315) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.dml.Select.queryFlat(Select.java:744) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.dml.Select.queryWithoutCache(Select.java:884) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.dml.Query.queryWithoutCacheLazyCheck(Query.java:151) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.dml.Query.query(Query.java:435) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.dml.Query.query(Query.java:397) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.CommandContainer.query(CommandContainer.java:145) ~[h2-1.4.199.jar:1.4.199] at org.h2.command.Command.executeQuery(Command.java:202) ~[h2-1.4.199.jar:1.4.199] at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:115) ~[h2-1.4.199.jar:1.4.199] at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:677) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:616) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:668) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:699) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:711) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at com.serotonin.db.spring.ExtendedJdbcTemplate.queryForObject(ExtendedJdbcTemplate.java:39) ~[mango-3.7.7.jar:?] at com.serotonin.db.spring.ExtendedJdbcTemplate.queryForObject(ExtendedJdbcTemplate.java:63) ~[mango-3.7.7.jar:?] at com.serotonin.db.DaoUtils.queryForObject(DaoUtils.java:278) ~[mango-3.7.7.jar:?] at com.serotonin.m2m2.db.dao.SystemSettingsDao.lambda$getValue$0(SystemSettingsDao.java:276) ~[mango-3.7.7.jar:?] at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705) ~[?:?] at com.serotonin.m2m2.db.dao.SystemSettingsDao.getValue(SystemSettingsDao.java:275) ~[mango-3.7.7.jar:?] at com.serotonin.m2m2.db.dao.SystemSettingsDao.getValue(SystemSettingsDao.java:259) ~[mango-3.7.7.jar:?] at com.infiniteautomation.mango.spring.components.EmailAddressVerificationService.loadKeyPair(EmailAddressVerificationService.java:107) ~[mango-3.7.7.jar:?] at com.infiniteautomation.mango.jwt.JwtSignerVerifier.postConstruct(JwtSignerVerifier.java:62) ~[mango-3.7.7.jar:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:363) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:307) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE] ... 14 more INFO 2020-10-20T12:56:01,724 (com.serotonin.m2m2.Lifecycle.terminate:400) - Mango Lifecycle terminating... INFO 2020-10-20T12:56:01,796 (com.serotonin.m2m2.db.H2Proxy.terminateImpl:406) - Terminating database. INFO 2020-10-20T12:56:02,744 (com.infiniteautomation.nosql.MangoNoSqlProxy.shutdown:116) - Terminating NoSQL Batch Write Manager. INFO 2020-10-20T12:56:02,766 (com.infiniteautomation.nosql.MangoNoSqlProxy.shutdown:124) - Closing NoSQL Database: Point Values INFO 2020-10-20T12:56:02,813 (com.infiniteautomation.nosql.MangoNoSqlProxy.shutdown:132) - Closing NoSQL Database: Point Data INFO 2020-10-20T12:56:02,822 (com.serotonin.m2m2.Lifecycle.terminate:550) - Mango Lifecycle terminated.
How can I correct this?
Thanks,
Aldo
-
Looks like a failed upgrade. The Sql database doesnt match the schema version...
Is this what you did? -
@mattfox That's what it looked like to me, but I haven't upgraded Mango since installing this MangoES (MangoGT). Comparing with other units I've deployed, there are no updates I could have applied. Nor does anything show up in the logs directory indicating upgrades or attempts.
In the past, with MySQL/MariaDB I have been able to undo partial changes to the schema resulting from an unsuccessful upgrade, but that's not the type of error logged here; is this a partitioning command?
-
Looks more like an invalid row count to me.
Is this a fresh install?
If so move your h2 database and let mango create a new one.
If not, here is hoping you have an h2 backup handy then import that over the top..Fox
-
@MattFox Unfortunately not; migrated from a previous installation, and been running for a month.
I'll try restoring from backup.
Aldo
-
@MattFox actually, that brings to mind a very important question: how do I restore from the H2 backup? Easy to do with MySQL/MariaDB, but how does one import data into H2?
Update:
Never mind; I found this: https://docs-v3.mango-os.com/how-to-restore-a-h2-database-backupHadn't used that before; didn't realize that was an option.
Restoring now.
-
Good luck!
-
@aldoramos said in MangoES H2 error:
ngoES (Mango
Hi Aldo
I have a hunch that your events table might be too large. I suggest that you follow this guide: https://docs-v3.mango-os.com/about-the-h2-database
and start up the H2 db independently of mango and have a look at the number of rows in the events table. -
After some more experience, going through this several more times, I seem to have found a pattern.
Apparently, this kind of problem arises when I reboot the MangoGT without explicitly stopping Mango first.
Having examined the output from
systemctl show mango.service -p TimeoutStopUSec
which showsTimeoutStopUSec=1min 30s
it appears the service file is correctly configured; however, my experience suggests there is a failure somewhere in there. Additionally, areboot
command seems to execute immediately, too soon to properly shut down.What do you think?