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

After update of Mango no more web server


  • Hi All,

    Hope someone can help me with my problem. I have updated my Mango system last Friday and since the update I am unable to start the website with the configuration page as well as the costom website I have build with the info to my building stats.

    When I try to ping the Mango box, it seems to work. So no IP address lost with the manual IP config. I can also log in with putty, so this works as well. I just can't seem to get the website part of it going. I am also not sure if the system even collects data from my sensors which are connected.

    What can I do to start the webserver again, as I am assuming it's the problem. I hope the MangoDB is still running.

    Thanks


  • What version of mango?
    If you're upgrading to 3.7 do note you're going to need to update java as well.
    run mango from the console to see what output you get. You should see some errors.
    Alternatively, look at the mango/logs/ma.log for the latest errors/warnings.

    Fox


  • Hi MattFox,

    I have opened the log and see there is an error. It says the following:

    "ERROR 2020-02-27 16:12:54,634 (com.serotonin.m2m2.Main.main:119) - Error during initialization
    com.serotonin.ShouldNeverHappenException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [alter table Recipe_Stage add ControlConditions blob; ]; nested exception is org.h2.jdbc.JdbcSQLException: Duplicate column name "CONTROLCONDITIONS"; SQL statement:
    alter table Recipe_Stage add ControlConditions blob; [42121-181]
    at com.serotonin.m2m2.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:102)
    at com.serotonin.m2m2.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:42)
    at com.serotonin.m2m2.db.DatabaseProxy.initialize(DatabaseProxy.java:198)
    at com.serotonin.m2m2.Lifecycle.databaseInitialize(Lifecycle.java:609)
    at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:287)
    at com.serotonin.m2m2.Main.main(Main.java:115)
    Caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [alter table Recipe_Stage add ControlConditions blob; ]; nested exception is org.h2.jdbc.JdbcSQLException: Duplicate column name "CONTROLCONDITIONS"; SQL statement:
    alter table Recipe_Stage add ControlConditions blob; [42121-181]
    at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:415)
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:439)
    at com.serotonin.m2m2.db.H2Proxy.runScript(H2Proxy.java:149)
    at com.serotonin.m2m2.db.upgrade.DBUpgrade.runScript(DBUpgrade.java:123)
    at com.infiniteautomation.brewersdashboard.upgrade.Upgrade1.upgrade(Upgrade1.java:9)
    at com.serotonin.m2m2.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:98)
    ... 5 more
    Caused by: org.h2.jdbc.JdbcSQLException: Duplicate column name "CONTROLCONDITIONS"; SQL statement:
    alter table Recipe_Stage add ControlConditions blob; [42121-181]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
    at org.h2.message.DbException.get(DbException.java:179)
    at org.h2.message.DbException.get(DbException.java:155)
    at org.h2.table.Table.setColumns(Table.java:398)
    at org.h2.table.TableBase.<init>(TableBase.java:44)
    at org.h2.table.RegularTable.<init>(RegularTable.java:74)
    at org.h2.schema.Schema.createTable(Schema.java:584)
    at org.h2.command.ddl.AlterTableAlterColumn.cloneTableStructure(AlterTableAlterColumn.java:321)
    at org.h2.command.ddl.AlterTableAlterColumn.copyData(AlterTableAlterColumn.java:229)
    at org.h2.command.ddl.AlterTableAlterColumn.update(AlterTableAlterColumn.java:161)
    at org.h2.command.CommandContainer.update(CommandContainer.java:78)
    at org.h2.command.Command.executeUpdate(Command.java:254)
    at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:185)
    at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:159)
    at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:431)
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:404)
    ... 10 more
    INFO 2020-02-27 16:12:54,642 (com.serotonin.m2m2.Lifecycle.terminate:353) - Mango Lifecycle terminating...
    INFO 2020-02-27 16:12:55,387 (com.infiniteautomation.nosql.MangoNoSqlProxy.shutdown:100) - Terminating NoSQL Batch Write Manager.
    INFO 2020-02-27 16:12:55,399 (com.infiniteautomation.nosql.MangoNoSqlProxy.shutdown:108) - Closing NoSQL Database: Point Values
    INFO 2020-02-27 16:12:55,434 (com.serotonin.m2m2.Lifecycle.terminate:453) - Mango Lifecycle terminated."

    I assume it might be the Java as you said. How can I update the java?

    Thanks
    Stephan


  • This looks more like a failed upgrade, if it were java nothing would start, The database is throwing a tizzy.
    Have you got a backup of your database?
    You will likely need to revert to your previous mango version then try upgrading again. I'll need @terrypacker to chime in on this one as there could be something I'm missing here.
    As I've learnt from previous experience. It's always good to backup your mango directory before doing an upgrade as it means you can always revert if something crashes.

    Fox


  • I have made a backup of the database before the update. I hope that it did the backup correctly.
    Do you think it is still loggin data at the moment? I assume not as I get the idea the DB is not running.

    Thanks


  • @shoffend said in After update of Mango no more web server:

    Do you think it is still loggin data at the moment? I assume not as I get the idea the DB is not running.

    You are correct as per this line in the log:

    @shoffend said in After update of Mango no more web server:

    INFO 2020-02-27 16:12:54,642 (com.serotonin.m2m2.Lifecycle.terminate:353) - Mango Lifecycle terminating...
    INFO 2020-02-27 16:12:55,387 (com.infiniteautomation.nosql.MangoNoSqlProxy.shutdown:100) - Terminating NoSQL Batch Write Manager.
    INFO 2020-02-27 16:12:55,399 (com.infiniteautomation.nosql.MangoNoSqlProxy.shutdown:108) - Closing NoSQL Database: Point Values
    INFO 2020-02-27 16:12:55,434 (com.serotonin.m2m2.Lifecycle.terminate:453) - Mango Lifecycle terminated."


  • Hi Stephan

    Looks like mango is not running, so you are not logging data. Terry will need more info tho to help you:

    1. What was the previous version.
    2. is this a Brewers dashboard system ?
    3. Which modules did you upgrade?

  • @craigweb
    Hi Craig,

    1. I am not sure what the previous version was, but I assume it must be about 4 years old, as the guy that installed this system did it about 4 years ago and I don't think that it does an auto update. Is there a way to see in some or other log what the previous version was?

    2. I could always log into the normal Mango dashboard, where I can see the data points and do backups and that type of stuff. There was a custom dashboard/website build at the time when the system was installed, but that only runs on another PC. That part of the website does not start up as well due to the problem.

    3. I upgraded throught the grahpical user interface on the dashboard. I did select everything to update, so I am not sure what updated correctly and what had a failure.

    Thanks


  • @shoffend you will need to email support. They will probably need to remotely log in and see what is going on. Please include your ma.log file and an exact description of the system. Im trying to figure out if, it is a brewers dashboard system or not as it seems like you have that module installed.


  • Thanks very much @CraigWeb. I will mail support and send them the file and hope they can see what went wrong.


  • Hi @shoffend from the logs that you sent to us it looks like all you need to do it delete the Brewersdashboard module and restart mango.
    It is located in /opt/mango/web/modules