• 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 Automation not starting after upgrade from 3.1.1 to 3.5.6

    Mango Automation general Discussion
    2
    6
    1.3k
    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.
    • G
      gsdes0001
      last edited by

      I recently upgraded Mango Automation 3.1.1 to 3.5.6 software in my Ubuntu box and encountered a error during start up. Here's what i did:

      1. Copy the whole MA_Home of existing working Mango 3.1.1.
      2. Make sure your /classes/env.properties file has been copied to /overrides/properties/env.properties (this will insure your changes will remain after upgrade)
      3. Delete the “lib” folder in your MA_HOME directory
      4. Download and unzip the Mango Automation 3.5.6 zip file into the MA_HOME folder overwriting the existing files.
      5. Start Mango and verify the upgrade.
      6. Then encountered the error in the image attached.
        0_1543394811197_upgrade error.JPG

      It looks like an H2 database issue but prior to the error, there was a warning error that Mango is shutting down due to Mango NoSQL is running in free mode (due to this is a test environment).

      So my question is, do i need to be running a licensed core or NoSQL module in order for the upgrade to succeed?

      1 Reply Last reply Reply Quote 0
      • phildunlapP
        phildunlap
        last edited by

        Hi joeselbiyoyo, welcome to the forum!

        So my question is, do i need to be running a licensed core or NoSQL module in order for the upgrade to succeed?

        No.

        I'm not sure why you're seeing that error. That constraint has existed on the eventDetectors since before the 3.x series, added in Upgrade12.

        The easy way resolve it, if you do not have data you are trying to keep in a Mango/databases/mangoTSDB directory, is you rename the Mango/databases directory while Mango is not running, start on a clean database and import the JSON backup from the Mango/backup/ directory. Even if you did have data you wanted to keep, this would be easier (you would simple need to "Migrate NoSQL data" on the /mango_no_sql.shtm page after importing the JSON).

        The slightly more difficult way, to maintain the existing H2 database, uses the Mango/bin/h2-web-console.sh script (edit the script to add the -webAllowOthers if you'll be accessing on another hostname). The credentials are found in the env.properties file. The image for login has the defaults: https://help.infiniteautomation.com/about-the-h2-database

        You will need to run,

        ALTER TABLE eventDetectors ADD CONSTRAINT eventDetectorsUn1 UNIQUE (xid, dataPointId);

        And then stop the h2 web console and start Mango again. That's not guaranteed to resolve it, since whatever led your existing database to not have that constraint could manifest other ways, but it would at least get the boot farther.

        1 Reply Last reply Reply Quote 0
        • G
          gsdes0001
          last edited by

          Thank you for the response Phillip.
          I have successfully upgraded to v3.5.6 using clean database and imported the JSON file from Configuration Import/Export. However, when performing the "Migrate NoSQL data", i have encountered the below error (see screenshots).

          0_1543480144907_migrate nosql error.JPG

          It looks like the my existing database is having issue with the upgraded version since the migrate NoSQL data is getting its source from the old database?

          And finally, we have created customized pages/dashboards. Apart from the JSON and Databases migration, what else do we need to import to the upgraded version? Say for example the licenses?

          Appreciate the support.

          1 Reply Last reply Reply Quote 0
          • phildunlapP
            phildunlap
            last edited by phildunlap

            That image suggests to me that the URL to the old database in the connection string is not correct. Wouldn't you have moved that to /opt/mango_dev/databases_old ? H2 will automatically create an empty database at the location specified by the connection string unless the argument IFEXISTS=TRUE appears as one of the semicolon delimited connection string.

            And finally, we have created customized pages/dashboards. Apart from the JSON and Databases migration, what else do we need to import to the upgraded version?

            Can you say more about how your dashboards were created, particularly the module they were built with? What version? Where on your old Mango's file structure were the files? What have you tried so far? There have been lots of more specific questions about this answered already.

            Say for example the licenses?

            Licensing shouldn't be an issue in getting your dashboards working.

            1 Reply Last reply Reply Quote 0
            • G
              gsdes0001
              last edited by

              Thank you Phillip for your response.
              I am still stuck in Migrate NoSQL Data. I have renamed /opt/mango_dev/databases to /opt/mango_dev/databases_old and change the source path in the Migrate NoSQL data to the same. However, i still get the same error as the image above. Could it be because I removed some of the entries in the JSON file as the free license is only limited to 300 data points?

              1 Reply Last reply Reply Quote 0
              • phildunlapP
                phildunlap
                last edited by

                No. If it says 'Table "DATAPOINTS" not found;' it means the connection string is not correctly pointed at your old Mango H2 database. It has nothing to do with the license. Add ;IFEXISTS=TRUE to the end of your connection string so that you do not have new mah2.h2.db files appearing.

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