• AldoRamos

    That's about what I expected. Glad it was simple and isolated.

    posted in Scripting general Discussion read more
  • AldoRamos

    This is a MangoGT running Mango 3.7.4

    I stripped down the JSON to determine it was not the contents of the scripts causing the issue:

    {
       "sstGlobalScripts":[
          {
             "xid":"GS_script1",
             "name":"script1",
             "script":"var script1 = {\n    name:	'script1'\n}"
          },
          {
             "xid":"GS_script2",
             "name":"script2",
             "script":"var script2 =\n{\n    name:	'script2'\n}"
          }
       ]
    }
    

    posted in Scripting general Discussion read more
  • AldoRamos

    I have 2 Global Scripts, and while migrating to a new system I included global scripts in the export, but the imported system showed failures due to the 2nd script being missing.

    Manually importing the scripts confirms the same issue, the import page only shows 1 script imported.

    The obvious work-around is to import them one at a time, but it is a shock to get such unexpected results.

    posted in Scripting general Discussion read more
  • AldoRamos

    I was attempting to create a Mango Persistent TCP publisher on a MangoGT, and I got an error. The transient banner went away, but kept repeating. I attempted to restart the Mango instance, but now it fails to come up.

    Here is the log:

    ERROR 2020-03-11T15:40:48,147 (com.serotonin.m2m2.Main.main:162) - Error during initialization
    org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [select e.id, e.typeName, e.subtypeName, e.typeRef1, e.typeRef2, e.activeTs, e.rtnApplicable, e.rtnTs,   e.rtnCause, e.alar
    mLevel, e.message, e.ackTs, e.ackUserId, u.username, e.alternateAckSource,   (select count(1) from userComments where commentType=1     and typeKey=e.id) as cnt from events e   left join users u on e.ackUserId=u.id where e.rtnApplicable=
    ? and e.rtnTs is null]; SQL state [HY000]; error code [50000]; General error: "java.lang.RuntimeException: page[49090] data leaf table:103 EVENTS entries:12 parent:46488 keys:[264424, 264425, 264426, 264427, 264428, 264429, 264430, 26443
    1, 264432, 264433, 264434, 264435] offsets:[3897, 3696, 3502, 3308, 3112, 3038, 2836, 2636, 2434, 2234, 2031, 1823] parent 46488 expected 50476"; SQL statement:
    select e.id, e.typeName, e.subtypeName, e.typeRef1, e.typeRef2, e.activeTs, e.rtnApplicable, e.rtnTs,   e.rtnCause, e.alarmLevel, e.message, e.ackTs, e.ackUserId, u.username, e.alternateAckSource,   (select count(1) from userComments where commentType=1     and typeKey=e.id) as cnt from events e   left join users u on e.ackUserId=u.id where e.rtnApplicable=? and e.rtnTs is null [50000-199]; nested exception is org.h2.jdbc.JdbcSQLNonTransientException: General error: "java.lang.RuntimeException: page[49090] data leaf table:103 EVENTS entries:12 parent:46488 keys:[264424, 264425, 264426, 264427, 264428, 264429, 264430, 264431, 264432, 264433, 264434, 264435] offsets:[3897, 3696, 3502, 3308, 3112, 3038, 2836, 2636, 2434, 2234, 2031, 1823] parent 46488 expected 50476"; SQL statement:
    select e.id, e.typeName, e.subtypeName, e.typeRef1, e.typeRef2, e.activeTs, e.rtnApplicable, e.rtnTs,   e.rtnCause, e.alarmLevel, e.message, e.ackTs, e.ackUserId, u.username, e.alternateAckSource,   (select count(1) from userComments where commentType=1     and typeKey=e.id) as cnt from events e   left join users u on e.ackUserId=u.id where e.rtnApplicable=? and e.rtnTs is null [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 org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:762) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE]
            at com.serotonin.db.DaoUtils.query(DaoUtils.java:250) ~[mango-3.7.4.jar:?]
            at com.serotonin.m2m2.db.dao.EventDao.getActiveEvents(EventDao.java:198) ~[mango-3.7.4.jar:?]
            at com.serotonin.m2m2.rt.EventManagerImpl.initialize(EventManagerImpl.java:865) ~[mango-3.7.4.jar:?]
            at com.serotonin.m2m2.Lifecycle.eventManagerInitialize(Lifecycle.java:762) ~[ma-priv-3.7.4.jar:?]
            at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:322) ~[ma-priv-3.7.4.jar:?]
            at com.serotonin.m2m2.Main.main(Main.java:159) ~[ma-priv-3.7.4.jar:?]
    Caused by: org.h2.jdbc.JdbcSQLNonTransientException: General error: "java.lang.RuntimeException: page[49090] data leaf table:103 EVENTS entries:12 parent:46488 keys:[264424, 264425, 264426, 264427, 264428, 264429, 264430, 264431, 264432, 264433, 264434, 264435] offsets:[3897, 3696, 3502, 3308, 3112, 3038, 2836, 2636, 2434, 2234, 2031, 1823] parent 46488 expected 50476"; SQL statement:
    select e.id, e.typeName, e.subtypeName, e.typeRef1, e.typeRef2, e.activeTs, e.rtnApplicable, e.rtnTs,   e.rtnCause, e.alarmLevel, e.message, e.ackTs, e.ackUserId, u.username, e.alternateAckSource,   (select count(1) from userComments where commentType=1     and typeKey=e.id) as cnt from events e   left join users u on e.ackUserId=u.id where e.rtnApplicable=? and e.rtnTs is null [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.command.Command.executeQuery(Command.java:219) ~[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]
            ... 10 more
    Caused by: java.lang.RuntimeException: page[49090] data leaf table:103 EVENTS entries:12 parent:46488 keys:[264424, 264425, 264426, 264427, 264428, 264429, 264430, 264431, 264432, 264433, 264434, 264435] offsets:[3897, 3696, 3502, 3308, 3112, 3038, 2836, 2636, 2434, 2234, 2031, 1823] parent 46488 expected 50476
            at org.h2.message.DbException.throwInternalError(DbException.java:293) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:219) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.index.PageDataNode.getRowWithKey(PageDataNode.java:278) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.index.PageDataNode.getRowWithKey(PageDataNode.java:279) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.index.PageDataIndex.getRowWithKey(PageDataIndex.java:387) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.index.PageDataIndex.getRow(PageDataIndex.java:376) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.table.PageStoreTable.getRow(PageStoreTable.java:84) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.index.PageBtreeIndex.getRow(PageBtreeIndex.java:303) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.index.PageBtreeCursor.get(PageBtreeCursor.java:45) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.index.IndexCursor.get(IndexCursor.java:274) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.table.TableFilter.getValue(TableFilter.java:1092) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.expression.ExpressionColumn.getValue(ExpressionColumn.java:215) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.index.IndexCondition.getCurrentValue(IndexCondition.java:138) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.index.IndexCursor.prepare(IndexCursor.java:108) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.index.IndexCursor.find(IndexCursor.java:154) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.table.TableFilter.next(TableFilter.java:475) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.table.TableFilter.next(TableFilter.java:545) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.command.dml.Select$LazyResultQueryFlat.fetchNextRow(Select.java:1882) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.result.LazyResult.hasNext(LazyResult.java:101) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.result.LazyResult.next(LazyResult.java:60) ~[h2-1.4.199.jar:1.4.199]
            at org.h2.command.dml.Select.queryFlat(Select.java:742) ~[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]
            ... 10 more
    INFO  2020-03-11T15:40:48,149 (com.serotonin.m2m2.Lifecycle.terminate:400) - Mango Lifecycle terminating...
    INFO  2020-03-11T15:40:48,226 (com.serotonin.m2m2.rt.maint.BackgroundProcessingImpl.joinTermination:550) - All high priority tasks exited gracefully.
    INFO  2020-03-11T15:40:48,228 (com.serotonin.m2m2.rt.maint.BackgroundProcessingImpl.joinTermination:556) - All medium priority tasks exited gracefully.
    INFO  2020-03-11T15:40:48,229 (com.serotonin.m2m2.rt.maint.BackgroundProcessingImpl.joinTermination:561) - All low priority tasks exited gracefully.
    INFO  2020-03-11T15:40:48,267 (com.infiniteautomation.mango.spring.components.executors.MangoExecutors.destroy:71) - Shutting down shared executor and scheduled exectutor
    INFO  2020-03-11T15:40:48,271 (com.infiniteautomation.mango.spring.components.executors.MangoExecutors.awaitTermination:129) - Executors shutdown successfully
    INFO  2020-03-11T15:40:48,284 (com.serotonin.m2m2.db.H2Proxy.terminateImpl:406) - Terminating database.
    INFO  2020-03-11T15:40:48,575 (com.infiniteautomation.nosql.MangoNoSqlProxy.shutdown:116) - Terminating NoSQL Batch Write Manager.
    INFO  2020-03-11T15:40:48,577 (com.infiniteautomation.nosql.MangoNoSqlBatchWriteBehindManager.terminate:241) - Terminating NoSQL Point Value Mover.
    INFO  2020-03-11T15:40:48,580 (com.infiniteautomation.nosql.MangoNoSqlBatchWriteBehindManager.terminate:266) - Terminating NoSQL Stale Point Cleaner.
    INFO  2020-03-11T15:40:48,582 (com.infiniteautomation.nosql.MangoNoSqlBatchWriteBehindManager.terminate:269) - Terminating NoSQL Status Provider.
    INFO  2020-03-11T15:40:48,584 (com.infiniteautomation.nosql.MangoNoSqlProxy.shutdown:124) - Closing NoSQL Database: Point Values
    INFO  2020-03-11T15:40:48,625 (com.infiniteautomation.nosql.MangoNoSqlProxy.shutdown:132) - Closing NoSQL Database: Point Data
    INFO  2020-03-11T15:40:48,635 (com.serotonin.m2m2.Lifecycle.terminate:550) - Mango Lifecycle terminated.
    
    

    Unfortunately, it seems the logs may not have captured the original error I briefly saw during the attempt to create the publisher. Is there another place I could look? Or is this log enough for you to identify the problem?

    Aldo

    posted in Mango feedback read more
  • AldoRamos

    No, I agree it shouldn't be too easy; my concern was making sure it would restore the correct MangoES configuration, etc. That's the same concern I have with cloning the configuration from a fresh "Enterprise" install on a non-ES instance.

    But I have my "default" config file now, so I can move forward simply.

    Thanks!

    posted in How-To read more
  • AldoRamos

    @mattfox said in MangoES Factory reset:

    If you're referring to the env.properties or similar files

    Nope, didn't break the files. ;-)

    “There are no perfect idiots — only some that come close.” — unknown

    Just wanted to reset the system configuration portion.

    I suppose I can do a clean reset as you suggested, and import just the configs I should import. I wanted to correct just the sections I regretted importing; but with a clean slate, I can have my "default" config file moving forward.

    For the record, I intend to re-configure this unit a few times as we explore it in different installations, so the ability to do a "Factory Reset" is a practical step for re-deploying units in general.

    posted in How-To read more
  • AldoRamos

    @craigweb said in MangoES Factory reset:

    I don't see how importing a config can disable ssh. What port are you using?

    My bad; I forgot to use port 2222 (thought I'd saved the configuration to match).

    So, one mystery solved: ssh is working fine (once I fixed client config).

    But still have all the system configurations overwritten. Is there a skeleton config file I can use to reset them? For example, all the directories are wrong.

    Now that I am in the system, I see the backups start after I overwrote the settings, so I don't have something to fall back on. (Suggestion for the future: include at least one config backup as shipped.)

    So again, I ask: Is a "factory default" config available?

    Thanks for your patience, and apologies for mistakes I where should have known better.

    posted in How-To read more
  • AldoRamos

    I just received a MangoGT, and imported configuration data from a running Mango, and overwrote lots of system configuration I should not have overwritten. Is there a practical way to accomplish the equivalent of a "factory reset" and start over? And over? ;-)

    And part of the "oops" seems to have disabled ssh. Yeah, fun.

    Aldo

    posted in How-To read more
  • AldoRamos

    Thanks, @MattFox, but I already have it working. What I was hoping for is fine-tuning parameters, e.g. Auto Update.

    Hopefully more documentation will be provided in the future.

    posted in User help read more
  • AldoRamos

    I am not finding documentation for maUiDateBar, specifically presetting Auto Update parameters. I made some SWAGs with no luck, and wonder if they can be set at all.

    posted in User help read more