• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Mango instance cannot initialize

    Mango Automation general Discussion
    3
    6
    575
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tungthanh500
      last edited by

      Hi guys,

      My Mango face a strange error, it cannot start, there is something related to SQL stop it. I checked the logs folder and find thousand of compressed log file. The latest log is like this:

      INFO  2023-05-23T07:07:56,681 (com.serotonin.m2m2.Main.createLifecycle:273) - Starting Mango 4.5.0 with Schema Version: 47
      INFO  2023-05-23T07:07:56,690 (com.serotonin.m2m2.Main.createLifecycle:277) - Java VM: OpenJDK 64-Bit Server VM, version: 20.0.1+9, vendor: Eclipse Adoptium
      INFO  2023-05-23T07:07:56,690 (com.serotonin.m2m2.Main.createLifecycle:278) - Java spec: Java Virtual Machine Specification, version: 20, vendor: Oracle Corporation
      INFO  2023-05-23T07:07:56,690 (com.serotonin.m2m2.Main.createLifecycle:284) - Operating System: Windows 11, arch: amd64, version: 10.0
      INFO  2023-05-23T07:07:56,690 (com.serotonin.m2m2.Main.createLifecycle:290) - Running as user account: DAXVIEWEMS$
      INFO  2023-05-23T07:07:56,690 (com.serotonin.m2m2.Main.createLifecycle:293) - Installation directory: C:\mango
      INFO  2023-05-23T07:07:56,690 (com.serotonin.m2m2.Main.createLifecycle:294) - Data directory: C:\mango_data
      INFO  2023-05-23T07:07:56,690 (com.serotonin.m2m2.Main.createLifecycle:295) - Configuration file: C:\mango_data\mango.properties
      INFO  2023-05-23T07:07:56,800 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'advancedScheduler', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,800 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'asciiFile', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,800 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'BACnet', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'cloudConnect', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'controlcore', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'dashboardDesigner', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'dataFile', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'dnp3', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'egauge', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'envcands', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'excelReports', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'graaljs', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'groovy', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'Haystack', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'http', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'lang_en', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'ldapAuthentication', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'lineProtocolDataSource', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'log4jDS', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'log4JReset', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'maintenanceEvents', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'mangoApi', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'mangoNoSqlDatabase', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'mangoUI', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'meta', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'modbus', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'mqttClientDataSource', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'onewire', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,815 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'opcda', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,831 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'persistent', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,831 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'pop3', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,831 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'scripting', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,831 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'serial', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,831 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'slackPublisher', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,831 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'snmp', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,831 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'sqlConsole', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,831 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'sqlds', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,831 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'ssh', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,831 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'sstGlobalScripts', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,831 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'TCPIP', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,831 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'virtualDS', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,831 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'vmstat', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,831 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'watchlists', v4.5.0 by Radix IoT
      INFO  2023-05-23T07:07:56,831 (com.serotonin.m2m2.Main.loadModules:683) - Loading module 'internal', v4.5.0 by Radix IoT
      ERROR 2023-05-23T07:07:57,596 (com.serotonin.m2m2.Lifecycle.webServerInitialize:1052) - Couldn't open browser window, perhaps set web.openBrowserOnStartup to false?
      java.io.IOException: Failed to open http://localhost:8080. Error message: No application is associated with the specified file for this operation.
      
      	at sun.awt.windows.WDesktopPeer.ShellExecute(WDesktopPeer.java:115) ~[?:?]
      	at sun.awt.windows.WDesktopPeer.browse(WDesktopPeer.java:101) ~[?:?]
      	at java.awt.Desktop.browse(Desktop.java:533) ~[?:?]
      	at com.serotonin.m2m2.Lifecycle.webServerInitialize(Lifecycle.java:1046) ~[ma-priv-4.5.0.jar:?]
      	at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:222) ~[ma-priv-4.5.0.jar:?]
      	at com.serotonin.m2m2.Main.main(Main.java:246) ~[ma-priv-4.5.0.jar:?]
      	at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[?:?]
      	at java.lang.reflect.Method.invoke(Method.java:578) ~[?:?]
      	at com.infiniteautomation.mango.bootstrap.MangoBootstrap.startMango(MangoBootstrap.java:131) ~[ma-bootstrap.jar:?]
      	at com.infiniteautomation.mango.bootstrap.MangoBootstrap.main(MangoBootstrap.java:68) ~[ma-bootstrap.jar:?]
      INFO  2023-05-23T07:07:57,599 (com.serotonin.m2m2.Lifecycle.loadLic:546) - Checking license...
      INFO  2023-05-23T07:07:58,456 (com.serotonin.m2m2.db.H2Proxy.initializeImpl:80) - Initializing H2 connection manager
      INFO  2023-05-23T07:07:59,037 (com.serotonin.m2m2.db.upgrade.DatabaseSchemaUpgrader.checkCoreUpgrade:39) - Starting instance with core version 4.5.0, schema v47
      INFO  2023-05-23T07:07:59,492 (com.infiniteautomation.nosql.MangoNoSqlPointValueDaoDefinition.initialize:77) - Starting MangoNoSql Database
      INFO  2023-05-23T07:07:59,523 (com.infiniteautomation.tsdb.impl.IasTsdbImpl.<init>:184) - Database at C:\mango_data\databases\mangoTSDB started
      INFO  2023-05-23T07:07:59,626 (com.infiniteautomation.tsdb.impl.IasTsdbImpl.<init>:213) - Empty dir delete for database at C:\mango_data\databases\mangoTSDB took 63ms
      INFO  2023-05-23T07:07:59,672 (com.infiniteautomation.tsdb.impl.IasTsdbImpl.<init>:184) - Database at C:\mango_data\databases\mangoTSDBAux started
      INFO  2023-05-23T07:07:59,705 (com.infiniteautomation.tsdb.impl.IasTsdbImpl.<init>:213) - Empty dir delete for database at C:\mango_data\databases\mangoTSDBAux took 0ms
      INFO  2023-05-23T07:07:59,705 (com.infiniteautomation.mango.spring.MangoRuntimeContextConfiguration.pointValueDao:376) - Time series database MangoNoSqlPointValueDaoDefinition initialized
      INFO  2023-05-23T07:08:00,319 (com.infiniteautomation.mango.spring.components.PurgeSettingsListener.configureRetentionPolicy:81) - Setting retention policy is not supported for MangoNoSqlPointValueDao
      INFO  2023-05-23T07:08:01,323 (com.infiniteautomation.mango.spring.MangoRuntimeContextConfiguration.contextRefreshed:162) - Spring context 'runtimeContext' refreshed: org.springframework.context.annotation.AnnotationConfigApplicationContext@777d191f
      INFO  2023-05-23T07:08:01,323 (com.infiniteautomation.mango.spring.MangoRuntimeContextConfiguration.contextStarted:176) - Spring context 'runtimeContext' started: org.springframework.context.annotation.AnnotationConfigApplicationContext@777d191f
      ERROR 2023-05-23T07:08:03,512 (com.serotonin.m2m2.Lifecycle.initialize:334) - Error during initialization
      org.jooq.exception.DataAccessException: SQL [select events.id, events.typeName, events.subTypeName, events.typeRef1, events.typeRef2, events.activeTs, events.rtnApplicable, events.rtnTs, events.rtnCause, events.alarmLevel, events.message, events.ackTs, events.ackUserId, events.alternateAckSource, events.readPermissionId, users.username, (select count(*) from userComments where (userComments.commentType = cast(? as int) and userComments.typeKey = events.id)) cnt from events left outer join users on users.id = events.ackUserId where (events.rtnApplicable = cast(? as char(1)) and events.rtnTs is null)]; Timeout trying to lock table {0}; SQL statement:
      select events.id, events.typeName, events.subTypeName, events.typeRef1, events.typeRef2, events.activeTs, events.rtnApplicable, events.rtnTs, events.rtnCause, events.alarmLevel, events.message, events.ackTs, events.ackUserId, events.alternateAckSource, events.readPermissionId, users.username, (select count(*) from userComments where (userComments.commentType = cast(? as int) and userComments.typeKey = events.id)) cnt from events left outer join users on users.id = events.ackUserId where (events.rtnApplicable = cast(? as char(1)) and events.rtnTs is null) [50200-214]
      	at org.jooq_3.16.9.H2.debug(Unknown Source) ~[?:?]
      	at org.jooq.impl.Tools.translate(Tools.java:3097) ~[jooq-3.16.9.jar:?]
      	at org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:670) ~[jooq-3.16.9.jar:?]
      	at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:354) ~[jooq-3.16.9.jar:?]
      	at org.jooq.impl.AbstractResultQuery.fetch(AbstractResultQuery.java:284) ~[jooq-3.16.9.jar:?]
      	at org.jooq.impl.SelectImpl.fetch(SelectImpl.java:2843) ~[jooq-3.16.9.jar:?]
      	at com.serotonin.m2m2.db.dao.EventDao.getActiveEvents(EventDao.java:290) ~[mango-4.5.0.jar:?]
      	at com.serotonin.m2m2.rt.EventManagerImpl.initialize(EventManagerImpl.java:800) ~[mango-4.5.0.jar:?]
      	at com.serotonin.m2m2.Lifecycle.eventManagerInitialize(Lifecycle.java:738) ~[ma-priv-4.5.0.jar:?]
      	at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:290) ~[ma-priv-4.5.0.jar:?]
      	at com.serotonin.m2m2.Main.main(Main.java:246) ~[ma-priv-4.5.0.jar:?]
      	at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[?:?]
      	at java.lang.reflect.Method.invoke(Method.java:578) ~[?:?]
      	at com.infiniteautomation.mango.bootstrap.MangoBootstrap.startMango(MangoBootstrap.java:131) ~[ma-bootstrap.jar:?]
      	at com.infiniteautomation.mango.bootstrap.MangoBootstrap.main(MangoBootstrap.java:68) ~[ma-bootstrap.jar:?]
      Caused by: org.h2.jdbc.JdbcSQLTimeoutException: Timeout trying to lock table {0}; SQL statement:
      select events.id, events.typeName, events.subTypeName, events.typeRef1, events.typeRef2, events.activeTs, events.rtnApplicable, events.rtnTs, events.rtnCause, events.alarmLevel, events.message, events.ackTs, events.ackUserId, events.alternateAckSource, events.readPermissionId, users.username, (select count(*) from userComments where (userComments.commentType = cast(? as int) and userComments.typeKey = events.id)) cnt from events left outer join users on users.id = events.ackUserId where (events.rtnApplicable = cast(? as char(1)) and events.rtnTs is null) [50200-214]
      	at org.h2.message.DbException.getJdbcSQLException(DbException.java:560) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.message.DbException.getJdbcSQLException(DbException.java:477) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.message.DbException.get(DbException.java:212) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.Command.filterConcurrentUpdate(Command.java:324) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.Command.executeQuery(Command.java:201) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:248) ~[h2-2.1.214.jar:2.1.214]
      	at org.jooq.tools.jdbc.DefaultPreparedStatement.execute(DefaultPreparedStatement.java:219) ~[jooq-3.16.9.jar:?]
      	at org.jooq.impl.Tools.executeStatementAndGetFirstResultSet(Tools.java:4356) ~[jooq-3.16.9.jar:?]
      	at org.jooq.impl.AbstractResultQuery.execute(AbstractResultQuery.java:230) ~[jooq-3.16.9.jar:?]
      	at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:340) ~[jooq-3.16.9.jar:?]
      	... 11 more
      Caused by: org.h2.message.DbException: Row "4949" not found in primary index "PUBLIC.EVENTS_DATA" [90143-214]
      	at org.h2.message.DbException.get(DbException.java:223) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.mvstore.db.MVPrimaryIndex.getRow(MVPrimaryIndex.java:265) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.mvstore.db.MVTable.getRow(MVTable.java:331) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.mvstore.db.MVSecondaryIndex$MVStoreCursor.get(MVSecondaryIndex.java:421) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.index.IndexCursor.get(IndexCursor.java:270) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.table.TableFilter.getValue(TableFilter.java:1032) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.expression.ExpressionColumn.getValue(ExpressionColumn.java:286) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.index.IndexCondition.getCurrentValue(IndexCondition.java:139) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.index.IndexCursor.prepare(IndexCursor.java:107) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.index.IndexCursor.find(IndexCursor.java:153) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.table.TableFilter.next(TableFilter.java:394) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.table.TableFilter.next(TableFilter.java:464) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.query.Select$LazyResultQueryFlat.fetchNextRow(Select.java:1832) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.result.LazyResult.hasNext(LazyResult.java:78) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.result.FetchedResult.next(FetchedResult.java:34) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.query.Select.queryFlat(Select.java:728) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.query.Select.queryWithoutCache(Select.java:833) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.query.Query.queryWithoutCacheLazyCheck(Query.java:197) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.query.Query.query(Query.java:512) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.query.Query.query(Query.java:475) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.CommandContainer.query(CommandContainer.java:251) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.Command.executeQuery(Command.java:190) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:248) ~[h2-2.1.214.jar:2.1.214]
      	at org.jooq.tools.jdbc.DefaultPreparedStatement.execute(DefaultPreparedStatement.java:219) ~[jooq-3.16.9.jar:?]
      	at org.jooq.impl.Tools.executeStatementAndGetFirstResultSet(Tools.java:4356) ~[jooq-3.16.9.jar:?]
      	at org.jooq.impl.AbstractResultQuery.execute(AbstractResultQuery.java:230) ~[jooq-3.16.9.jar:?]
      	at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:340) ~[jooq-3.16.9.jar:?]
      	... 11 more
      Caused by: org.h2.jdbc.JdbcSQLTransientException: Row "4949" not found in primary index "PUBLIC.EVENTS_DATA" [90143-214]
      	at org.h2.message.DbException.getJdbcSQLException(DbException.java:682) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.message.DbException.getJdbcSQLException(DbException.java:477) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.message.DbException.get(DbException.java:223) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.mvstore.db.MVPrimaryIndex.getRow(MVPrimaryIndex.java:265) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.mvstore.db.MVTable.getRow(MVTable.java:331) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.mvstore.db.MVSecondaryIndex$MVStoreCursor.get(MVSecondaryIndex.java:421) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.index.IndexCursor.get(IndexCursor.java:270) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.table.TableFilter.getValue(TableFilter.java:1032) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.expression.ExpressionColumn.getValue(ExpressionColumn.java:286) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.index.IndexCondition.getCurrentValue(IndexCondition.java:139) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.index.IndexCursor.prepare(IndexCursor.java:107) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.index.IndexCursor.find(IndexCursor.java:153) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.table.TableFilter.next(TableFilter.java:394) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.table.TableFilter.next(TableFilter.java:464) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.query.Select$LazyResultQueryFlat.fetchNextRow(Select.java:1832) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.result.LazyResult.hasNext(LazyResult.java:78) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.result.FetchedResult.next(FetchedResult.java:34) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.query.Select.queryFlat(Select.java:728) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.query.Select.queryWithoutCache(Select.java:833) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.query.Query.queryWithoutCacheLazyCheck(Query.java:197) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.query.Query.query(Query.java:512) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.query.Query.query(Query.java:475) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.CommandContainer.query(CommandContainer.java:251) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.command.Command.executeQuery(Command.java:190) ~[h2-2.1.214.jar:2.1.214]
      	at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:248) ~[h2-2.1.214.jar:2.1.214]
      	at org.jooq.tools.jdbc.DefaultPreparedStatement.execute(DefaultPreparedStatement.java:219) ~[jooq-3.16.9.jar:?]
      	at org.jooq.impl.Tools.executeStatementAndGetFirstResultSet(Tools.java:4356) ~[jooq-3.16.9.jar:?]
      	at org.jooq.impl.AbstractResultQuery.execute(AbstractResultQuery.java:230) ~[jooq-3.16.9.jar:?]
      	at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:340) ~[jooq-3.16.9.jar:?]
      	... 11 more
      INFO  2023-05-23T07:08:03,512 (com.serotonin.m2m2.Lifecycle.terminate:366) - Mango Lifecycle terminating...
      INFO  2023-05-23T07:08:03,526 (com.infiniteautomation.nosql.MangoNoSqlPointValueDaoDefinition.postRuntimeManagerTerminate:117) - Terminating NoSQL Batch Write Manager.
      INFO  2023-05-23T07:08:03,526 (com.infiniteautomation.nosql.MangoNoSqlBatchWriteBehindManager.terminate:204) - Terminating NoSQL Point Value Mover.
      INFO  2023-05-23T07:08:03,526 (com.infiniteautomation.nosql.MangoNoSqlBatchWriteBehindManager.terminate:228) - Terminating NoSQL Stale Point Cleaner.
      INFO  2023-05-23T07:08:03,526 (com.infiniteautomation.nosql.MangoNoSqlBatchWriteBehindManager.terminate:231) - Terminating NoSQL Status Provider.
      INFO  2023-05-23T07:08:03,526 (com.serotonin.m2m2.rt.maint.BackgroundProcessingImpl.joinTermination:452) - All low priority tasks exited gracefully.
      INFO  2023-05-23T07:08:03,526 (com.serotonin.m2m2.rt.maint.BackgroundProcessingImpl.joinTermination:459) - All medium priority tasks exited gracefully.
      INFO  2023-05-23T07:08:03,526 (com.serotonin.m2m2.rt.maint.BackgroundProcessingImpl.joinTermination:466) - All high priority tasks exited gracefully.
      INFO  2023-05-23T07:08:03,526 (com.infiniteautomation.nosql.MangoNoSqlPointValueDaoDefinition.shutdown:136) - Closing NoSQL Database: Point Values
      INFO  2023-05-23T07:08:03,526 (com.infiniteautomation.nosql.MangoNoSqlPointValueDaoDefinition.shutdown:144) - Closing NoSQL Database: Point Data
      INFO  2023-05-23T07:08:03,526 (com.infiniteautomation.mango.spring.components.executors.MangoExecutors.destroy:90) - Shutting down shared executor and scheduled executor
      INFO  2023-05-23T07:08:03,526 (com.infiniteautomation.mango.spring.components.executors.MangoExecutors.awaitTermination:147) - Executors shutdown successfully
      INFO  2023-05-23T07:08:03,526 (com.serotonin.m2m2.db.H2Proxy.terminateImpl:408) - Terminating database.
      INFO  2023-05-23T07:08:03,730 (com.serotonin.m2m2.Lifecycle.terminate:505) - Mango Lifecycle terminated: INITIALIZATION_ERROR
      
      

      Any idea to fix?

      MattFoxM CraigWebC 2 Replies Last reply Reply Quote 0
      • MattFoxM
        MattFox @tungthanh500
        last edited by MattFox

        @tungthanh500 if you can log in, I'd truncate the events table. There's a broken reference in there.
        Also, go into mango.properties and set web.openBrowserOnStartup to false as it tells you in the error.

        Fox

        Do not follow where the path may lead; go instead where there is no path.
        And leave a trail - Muriel Strode

        1 Reply Last reply Reply Quote 1
        • CraigWebC
          CraigWeb @tungthanh500
          last edited by

          @tungthanh500
          Looks like a corrupt db. You will need to start mango with a fresh DB. You do this by moving the current mah2 db to another folderr. Then start mango, it will detect there is no DB then create a new one. You will need to then restore with an old backup.

          T 1 Reply Last reply Reply Quote 1
          • T
            tungthanh500 @CraigWeb
            last edited by

            @CraigWeb Is the mah2 DB at C:\mango_data\databases?

            CraigWebC 1 Reply Last reply Reply Quote 0
            • CraigWebC
              CraigWeb @tungthanh500
              last edited by

              @tungthanh500
              Yes, shut down mango and move those 2 files. When you start up mango it will create a new DB. Once mango has started you can then restore with an backup

              T 1 Reply Last reply Reply Quote 1
              • T
                tungthanh500 @CraigWeb
                last edited by tungthanh500

                @CraigWeb thank you. I start fresh and restore with System settings -> SQL database backup -> select latest core-database-H2 zip file.
                Is that enough? I check the Data point detail and found nothing in history :| Is there something I miss? I see also see MangoNoSQL-incremental-Mar-12-2023_063732.zip in backup folder but I have no idea how restore this file.

                Update: I restored from another backup file and found out that that latest is broken. All data is lost.

                Thank you all for your help.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post