• M
    mseverin

    When I tried to restart Mango through the upgrades module I get the following error and the system won't restart.

    ERROR 2019-12-04T12:58:57,204 (com.serotonin.m2m2.util.timeout.TimeoutTask.run:61) - Uncaught Task Exception
    java.lang.ClassCastException: com.infiniteautomation.asciifile.rt.AsciiFilePointLocatorRT cannot be cast to com.serotonin.m2m2.internal.InternalPointLocatorRT
    at com.serotonin.m2m2.internal.InternalDataSourceRT.doPoll(InternalDataSourceRT.java:110) ~[?:?]
    at com.serotonin.m2m2.rt.dataSource.PollingDataSource.doPollNoSync(PollingDataSource.java:228) ~[mango-3.7.1.jar:?]
    at com.serotonin.m2m2.rt.dataSource.PollingDataSource.scheduleTimeoutImpl(PollingDataSource.java:183) ~[mango-3.7.1.jar:?]
    at com.serotonin.m2m2.rt.dataSource.PollingDataSource$1.scheduleTimeout(PollingDataSource.java:85) ~[mango-3.7.1.jar:?]
    at com.serotonin.m2m2.util.timeout.TimeoutTask.run(TimeoutTask.java:59) ~[mango-3.7.1.jar:?]
    at com.serotonin.timer.Task.runTask(Task.java:179) ~[mango-3.7.1.jar:?]
    at com.serotonin.timer.TaskWrapper.run(TaskWrapper.java:23) ~[mango-3.7.1.jar:?]
    at com.serotonin.timer.OrderedThreadPoolExecutor$OrderedTaskCollection.run(OrderedThreadPoolExecutor.java:314) ~[mango-3.7.1.jar:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_172]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_172]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172]

    posted in MangoES Hardware read more
  • M
    mseverin

    Yes, the NoSQL module is installed. As for users, right now Admin is the only user.

    posted in MangoES Hardware read more
  • M
    mseverin

    I'm running with the default H2 database.

    posted in MangoES Hardware read more
  • M
    mseverin

    I restored a backup from last week, and now it boots up but I have no data history. The only data that I can see is from the date of the database I restored to current.

    How do I get my history back?

    posted in MangoES Hardware read more
  • M
    mseverin

    My MangoES box has been running good for a couple of months but when I went to access it today it had crashed.
    When I try to start Mango I get the following error:

    ERROR 2019-11-29T12:12:05,183 (com.serotonin.m2m2.Main.main:162) - Error during initialization
    com.serotonin.ShouldNeverHappenException: org.springframework.jdbc.BadSqlGrammarException: StatementC allback; bad SQL grammar [ALTER TABLE users ADD COLUMN organization varchar(80); ]; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Duplicate column name "ORGANIZATION"; SQL statement:
    ALTER TABLE users ADD COLUMN organization varchar(80); [42121-199]
    at com.serotonin.m2m2.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:104) ~[mango-3.7.1.jar :?]
    at com.serotonin.m2m2.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:36) ~[mango-3.7.1.jar: ?]
    at com.serotonin.m2m2.db.AbstractDatabaseProxy.initialize(AbstractDatabaseProxy.java:154) ~[m ango-3.7.1.jar:?]
    at com.serotonin.m2m2.Lifecycle.databaseInitialize(Lifecycle.java:732) ~[ma-priv-3.7.1.jar:?]
    at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:285) ~[ma-priv-3.7.1.jar:?]
    at com.serotonin.m2m2.Main.main(Main.java:159) ~[ma-priv-3.7.1.jar:?]
    Caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [ALTER TABLE users ADD COLUMN organization varchar(80); ]; nested exception is org.h2.jdbc.JdbcSQLSyntaxErr orException: Duplicate column name "ORGANIZATION"; SQL statement:
    ALTER TABLE users ADD COLUMN organization varchar(80); [42121-199]
    at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCo deSQLExceptionTranslator.java:234) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE]
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(Abstract FallbackSQLExceptionTranslator.java:72) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE]
    at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1442) ~[sp ring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE]
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:387) ~[spring-jdbc-5. 1.7.RELEASE.jar:5.1.7.RELEASE]
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:417) ~[spring-jdbc-5. 1.7.RELEASE.jar:5.1.7.RELEASE]
    at com.serotonin.m2m2.db.H2Proxy.runScript(H2Proxy.java:281) ~[mango-3.7.1.jar:?]
    at com.serotonin.m2m2.db.upgrade.DBUpgrade.runScript(DBUpgrade.java:136) ~[mango-3.7.1.jar:?]
    at com.serotonin.m2m2.db.upgrade.DBUpgrade.runScript(DBUpgrade.java:160) ~[mango-3.7.1.jar:?]
    at com.serotonin.m2m2.db.upgrade.Upgrade28.upgrade(Upgrade28.java:87) ~[mango-3.7.1.jar:?]
    at com.serotonin.m2m2.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:100) ~[mango-3.7.1.jar :?]
    ... 5 more
    Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Duplicate column name "ORGANIZATION"; SQL stateme nt:
    ALTER TABLE users ADD COLUMN organization varchar(80); [42121-199]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:451) ~[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:205) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.message.DbException.get(DbException.java:181) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.table.Table.setColumns(Table.java:447) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.table.TableBase.<init>(TableBase.java:75) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.table.RegularTable.<init>(RegularTable.java:126) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.table.PageStoreTable.<init>(PageStoreTable.java:58) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.schema.Schema.createTable(Schema.java:708) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.command.ddl.AlterTableAlterColumn.cloneTableStructure(AlterTableAlterColumn.java:39 9) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.command.ddl.AlterTableAlterColumn.copyData(AlterTableAlterColumn.java:286) ~[h2-1.4 .199.jar:1.4.199]
    at org.h2.command.ddl.AlterTableAlterColumn.update(AlterTableAlterColumn.java:201) ~[h2-1.4.1 99.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.JdbcStatement.executeInternal(JdbcStatement.java:233) ~[h2-1.4.199.jar:1.4.199 ]
    at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:205) ~[h2-1.4.199.jar:1.4.199]
    at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTem plate.java:408) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE]
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:375) ~[spring-jdbc-5. 1.7.RELEASE.jar:5.1.7.RELEASE]
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:417) ~[spring-jdbc-5. 1.7.RELEASE.jar:5.1.7.RELEASE]
    at com.serotonin.m2m2.db.H2Proxy.runScript(H2Proxy.java:281) ~[mango-3.7.1.jar:?]
    at com.serotonin.m2m2.db.upgrade.DBUpgrade.runScript(DBUpgrade.java:136) ~[mango-3.7.1.jar:?]
    at com.serotonin.m2m2.db.upgrade.DBUpgrade.runScript(DBUpgrade.java:160) ~[mango-3.7.1.jar:?]
    at com.serotonin.m2m2.db.upgrade.Upgrade28.upgrade(Upgrade28.java:87) ~[mango-3.7.1.jar:?]
    at com.serotonin.m2m2.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:100) ~[mango-3.7.1.jar :?]
    ... 5 more
    INFO 2019-11-29T12:12:05,184 (com.serotonin.m2m2.Lifecycle.terminate:400) - Mango Lifecycle terminat ing...
    INFO 2019-11-29T12:12:05,247 (com.serotonin.m2m2.db.H2Proxy.terminateImpl:400) - Terminating databas e.
    INFO 2019-11-29T12:12:05,512 (com.infiniteautomation.nosql.MangoNoSqlProxy.shutdown:116) - Terminati ng NoSQL Batch Write Manager.
    INFO 2019-11-29T12:12:05,555 (com.serotonin.m2m2.Lifecycle.terminate:550) - Mango Lifecycle terminat ed.
    ma-start: no restart flag found, not restarting MA
    ma-start: MA done

    How do I get Mango running again?

    posted in MangoES Hardware read more
  • M
    mseverin

    Thanks for the update. I am running the latest version of Mango 3.6.6. and apply all system updates when they are released.

    It does appear like the backups are working so I will try your suggestion of restoring a backup on a fresh database when appropriate.

    posted in User help read more
  • M
    mseverin

    I'm getting these errors in the log but when I look at the directory /opt/mango/backup I see a core database and an incremental backup for today so I'm not sure why I'm seeing these errors.

    Backup Failed for File: /opt/mango/backup/core-database-H2-Nov-25-2019_072644 because StatementCallback; uncategorized SQLException for SQL [SCRIPT DROP TO '/opt/mango/backup/core-database-H2-Nov-25-2019_072644.zip' COMPRESSION ZIP; ]; SQL state [90031]; error code [90031]; IO Exception: "java.io.IOException: java.lang.ArrayIndexOutOfBoundsException"; "lob: null table: 90 id: 18396806"; SQL statement: SCRIPT DROP TO '/opt/mango/backup/core-database-H2-Nov-25-2019_072644.zip' COMPRESSION ZIP; [90031-199]; nested exception is org.h2.jdbc.JdbcSQLNonTransientException: IO Exception: "java.io.IOException: java.lang.ArrayIndexOutOfBoundsException"; "lob: null table: 90 id: 18396806"; SQL statement: SCRIPT DROP TO '/opt/mango/backup/core-database-H2-Nov-25-2019_072644.zip' COMPRESSION ZIP; [90031-199]

    posted in User help read more
  • M
    mseverin

    Yes, I can open all zip files created since my restore, so everything seems to be back to normal.

    Thanks for your help.

    posted in Mango Automation Installation read more