• 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 on Ubuntu 14.04

    Mango Automation Installation
    4
    21
    13.9k
    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.
    • D
      dmsmith
      last edited by

      Hi Joel, and "support",

      Been having a lot of trouble getting Mango to start on Ubuntu 14.04. When it was first installed it would start and run if invoked by a non-privileged user, invoking with sudo (or as root) would typically fail. Now every time I attempt to start it as a non-privileged user I get the following:

      /opt/mango/bin$ ./ma.sh start
      MA_HOME is /opt/mango
      ml350g5@HPS350G5:/opt/mango/bin$ ma-start: MA started with Process ID: 2073
      INFO 2016-01-18 15:47:59,821 (com.serotonin.m2m2.Main.main:82) - Starting Mango 2.7.2 with Schema Version: 11
      INFO 2016-01-18 15:48:02,349 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'egauge', v1.1.1 by Infinite Automation
      INFO 2016-01-18 15:48:02,424 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'dnp3', v1.6.1 by Infinite Automation Software
      INFO 2016-01-18 15:48:02,445 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'mangoNoSqlDatabase', v1.2.1 by Infinite Automation Software
      INFO 2016-01-18 15:48:02,467 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'asciiFile', v1.2.1 by Infinite Automation
      INFO 2016-01-18 15:48:02,489 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'loggingConsole', v1.1.1 by Infinite Automation
      INFO 2016-01-18 15:48:02,505 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'pointLinks', v1.5.2 by Infinite Automation Software
      INFO 2016-01-18 15:48:02,525 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'TCPIP', v1.1.3 by Infinite Automation
      INFO 2016-01-18 15:48:02,546 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'dataImport', v1.4.1 by Infinite Automation Software
      INFO 2016-01-18 15:48:02,565 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'pachube', v1.5.1 by Infinite Automation Software
      INFO 2016-01-18 15:48:02,583 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'ssh', v1.1.1 by Infinite Automation
      INFO 2016-01-18 15:48:02,601 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'mangoApi', v1.1.3 by Infinite Automation Systems Inc.
      INFO 2016-01-18 15:48:02,621 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'watchlists', v1.7.4 by Infinite Automation Systems Inc.
      Exception in thread "main" java.io.IOException: Unable to delete file: /opt/mango/web/WEB-INF/tags/watchlists/mobilePage.tag
      at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1919)
      at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1399)
      at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1331)
      at com.serotonin.m2m2.Main.deleteDir(Main.java:757)
      at com.serotonin.m2m2.Main.loadModules(Main.java:499)
      at com.serotonin.m2m2.Main.main(Main.java:99)
      ma-start: no restart flag found, not restarting MA
      ma-start: MA done

      With sudo the following is what happens (this behaviour is unchanged):

      /opt/mango/bin$ sudo ./ma.sh start
      [sudo] password for ml350g5:
      MA_HOME is /opt/mango
      ml350g5@HPS350G5:/opt/mango/bin$ /opt/mango/bin/ma-start.sh: line 94: java: command not found
      ma-start: MA started with Process ID: 2114
      ma-start: no restart flag found, not restarting MA
      ma-start: MA done

      Java version details:

      /opt/mango/bin$ java -version
      java version "1.8.0_66"
      Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
      Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

      Have tried simply creating an empty RESTART file but that results in the start script entering an infinite loop that required a SIGKILL to terminate.

      Is this something you have seen before? Are you able to point me in the right direction? Thanks.

      Regards,

      David

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

        Hi David,

        Mango requires to be run with root or elevated privileges so doing sudo ./ma.sh start is one valid way to go. The problem that you're having is that your environment "PATH" variable has been set in such a way that it is not global, or perhaps is not set until a user logs in (like in a .bashrc file).

        To fix, you can do either of two things, you can define JAVA_HOME as an environment variable, which would point to your JDK (such that JAVA_HOME/bin/java exists or you can make sure your JAVA_HOME/bin/ directory is one of the folders specified in the variable PATH. To see what your PATH is, use "echo $PATH;" To set JAVA_HOME, add it as it's own line in the file /etc/environment and set it to the absolute path to your JDK. You can also edit the paths described in the PATH variable in /etc/environment to set persistent, global settings, in which can you need to have JAVA_HOME/bin/

        1 Reply Last reply Reply Quote 0
        • D
          dmsmith
          last edited by

          Thanks Phil, however as root:

          root@HPS350G5:/opt/mango/bin# echo $PATH
          /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/oracle_jdk8/bin:/usr/lib/jvm/oracle_jdk8/db/bin:/usr/lib/jvm/oracle_jdk8/jre/bin
          root@HPS350G5:/opt/mango/bin# echo $JAVA_HOME
          /usr/lib/jvm/oracle_jdk8
          root@HPS350G5:/home/ml350g5# java -version
          java version "1.8.0_66"
          Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
          Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
          root@HPS350G5:/home/ml350g5# cd /opt/mango/bin
          root@HPS350G5:/opt/mango/bin# ./ma.sh start
          MA_HOME is /opt/mango
          root@HPS350G5:/opt/mango/bin# ma-start: MA started with Process ID: 12420
          INFO 2016-01-19 09:09:30,113 (com.serotonin.m2m2.Main.main:82) - Starting Mango 2.7.2 with Schema Version: 11
          INFO 2016-01-19 09:09:30,971 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'egauge', v1.1.1 by Infinite Automation
          INFO 2016-01-19 09:09:31,010 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'dnp3', v1.6.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,020 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'mangoNoSqlDatabase', v1.2.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,029 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'asciiFile', v1.2.1 by Infinite Automation
          INFO 2016-01-19 09:09:31,036 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'loggingConsole', v1.1.1 by Infinite Automation
          INFO 2016-01-19 09:09:31,044 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'pointLinks', v1.5.2 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,050 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'TCPIP', v1.1.3 by Infinite Automation
          INFO 2016-01-19 09:09:31,055 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'dataImport', v1.4.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,060 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'pachube', v1.5.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,065 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'ssh', v1.1.1 by Infinite Automation
          INFO 2016-01-19 09:09:31,070 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'mangoApi', v1.1.3 by Infinite Automation Systems Inc.
          INFO 2016-01-19 09:09:31,075 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'watchlists', v1.7.4 by Infinite Automation Systems Inc.
          INFO 2016-01-19 09:09:31,181 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'sqlds', v1.6.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,207 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'sstTheme', v1.1.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,219 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'scheduledEvents', v1.5.1 by (unknown vendor)
          INFO 2016-01-19 09:09:31,250 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'dashboards', v1.1.2 by Infinite Automation
          INFO 2016-01-19 09:09:31,309 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'scripting', v1.1.2 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,327 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'jspViews', v2.1.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,364 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'twilio', v1.1.2 by (unknown vendor)
          INFO 2016-01-19 09:09:31,390 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'controlcore', v1.1.1 by Infinite Automation
          INFO 2016-01-19 09:09:31,398 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'graphicalViews', v1.6.3 by Infinite Automation Systems Inc.
          INFO 2016-01-19 09:09:31,434 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'opcda', v1.6.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,446 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'sstGlobalScripts', v1.5.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,461 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'dataPointDetailsView', v1.0.3 by Infinite Automation
          INFO 2016-01-19 09:09:31,472 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'modbus', v1.6.3 by Infinite Automation Systems Inc.
          INFO 2016-01-19 09:09:31,487 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'sstGraphics', v1.1.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,533 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'BACnet', v2.2.3 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,548 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'galil', v1.5.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,566 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'pop3', v1.5.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,581 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'onewire', v1.5.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,605 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'virtualDS', v1.5.2 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,625 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'vmstat', v1.5.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,643 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'meta', v2.2.3 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,658 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'jmxds', v1.5.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,677 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'dglux', v1.3.2 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,968 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'log4jDS', v1.1.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:31,997 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'internal', v1.5.3 by Infinite Automation Software
          INFO 2016-01-19 09:09:32,015 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'templateConfig', v1.0.8 by Infinite Automation Software
          INFO 2016-01-19 09:09:32,038 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'maintenanceEvents', v1.5.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:32,057 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'reports', v2.2.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:32,084 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'serial', v1.2.1 by Infinite Automation
          INFO 2016-01-19 09:09:32,098 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'excelReports', v1.0.3 by Infinite Automation Software
          INFO 2016-01-19 09:09:32,151 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'dataFile', v1.1.1 by Infinite Automation
          INFO 2016-01-19 09:09:32,181 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'snmp', v1.5.2 by Infinite Automation Software
          INFO 2016-01-19 09:09:32,194 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'http', v1.5.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:32,213 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'sqlConsole', v1.5.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:32,240 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'openv4j', v1.1.2 by Infinite Automation Systems Inc.
          INFO 2016-01-19 09:09:32,250 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'mbus', v1.1.2 by Infinite Automation Systems Inc.
          INFO 2016-01-19 09:09:32,265 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'log4JReset', v1.1.1 by Infinite Automation Software
          INFO 2016-01-19 09:09:32,276 (com.serotonin.m2m2.Main.loadModules:417) - Loading module 'persistent', v1.6.2 by Infinite Automation Software
          INFO 2016-01-19 09:09:34,834 (com.infiniteautomation.mangoApi.MangoApiReloadingProperties.checkForReload:146) - (mangoApiHeaders) Found updated file at /opt/mango/web/modules/mangoApi/classes/mangoApiHeaders.properties. Reloading properties
          INFO 2016-01-19 09:09:35,038 (com.serotonin.m2m2.Lifecycle.loadLic:450) - Checking license...
          INFO 2016-01-19 09:09:35,371 (com.serotonin.m2m2.db.H2Proxy.initializeImpl:42) - Initializing H2 connection manager
          WARN 2016-01-19 09:09:37,023 (com.serotonin.m2m2.db.upgrade.DBUpgrade.checkUpgrade:96) - Upgrading 'core' from 9 to 10
          INFO 2016-01-19 09:09:37,024 (com.serotonin.m2m2.db.upgrade.DBUpgrade.createUpdateLogOutputStream:152) - Writing upgrade log to /opt/mango/logs/com.serotonin.m2m2.db.upgrade.Upgrade9.log
          ERROR 2016-01-19 09:09:37,827 (com.serotonin.m2m2.Main.main:120) - Error during initialization
          com.serotonin.ShouldNeverHappenException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [ALTER TABLE users ADD COLUMN permissions VARCHAR(255); ]; nested exception is org.h2.jdbc.JdbcSQLException: Duplicate column name "PERMISSIONS"; SQL statement:
          ALTER TABLE users ADD COLUMN permissions VARCHAR(255); [42121-181]
          at com.serotonin.m2m2.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:102)
          at com.serotonin.m2m2.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:34)
          at com.serotonin.m2m2.db.DatabaseProxy.initialize(DatabaseProxy.java:180)
          at com.serotonin.m2m2.Lifecycle.databaseInitialize(Lifecycle.java:588)
          at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:266)
          at com.serotonin.m2m2.Main.main(Main.java:116)
          Caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [ALTER TABLE users ADD COLUMN permissions VARCHAR(255); ]; nested exception is org.h2.jdbc.JdbcSQLException: Duplicate column name "PERMISSIONS"; SQL statement:
          ALTER TABLE users ADD COLUMN permissions VARCHAR(255); [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:146)
          at com.serotonin.m2m2.db.upgrade.DBUpgrade.runScript(DBUpgrade.java:129)
          at com.serotonin.m2m2.db.upgrade.DBUpgrade.runScript(DBUpgrade.java:143)
          at com.serotonin.m2m2.db.upgrade.DBUpgrade.runScript(DBUpgrade.java:134)
          at com.serotonin.m2m2.db.upgrade.Upgrade9.upgrade(Upgrade9.java:27)
          at com.serotonin.m2m2.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:98)
          ... 5 more
          Caused by: org.h2.jdbc.JdbcSQLException: Duplicate column name "PERMISSIONS"; SQL statement:
          ALTER TABLE users ADD COLUMN permissions VARCHAR(255); [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)
          ... 12 more
          INFO 2016-01-19 09:09:37,833 (com.serotonin.m2m2.Lifecycle.terminate:330) - Mango Lifecycle terminating...
          Exception in thread "high-pool-1-thread-2" java.lang.NullPointerException
          at com.serotonin.m2m2.CoreLicenseDefinition$2.run(CoreLicenseDefinition.java:149)
          at com.serotonin.timer.sync.Synchronizer$TaskWrapper.run(Synchronizer.java:155)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)
          INFO 2016-01-19 09:09:37,993 (com.serotonin.m2m2.Lifecycle.terminate:432) - Mango Lifecycle terminated.
          INFO 2016-01-19 09:09:37,995 (com.serotonin.m2m2.Lifecycle.terminate:330) - Mango Lifecycle terminating...
          ma-start: no restart flag found, not restarting MA
          ma-start: MA done

          root@HPS350G5:/opt/mango/bin#

          1 Reply Last reply Reply Quote 0
          • D
            dmsmith
            last edited by

            Oh, forgot to mention that having it go through the process in the last message there before dying is not at all uncommon.

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

              Is this a new installation or is there data in the database? If this is a new database, go ahead and delete your Mango/databases directory and start it up again. This looks like it tried to upgrade the database at some point but couldn't finish the upgrade script. If there is data there, this will possibly take 1) deleting the column so that the upgrade can succeed or 2) increment the database version number if everything was properly formed. If you had a previous Mango, I bet that it was on a different database, and you're attempting to convert to H2 and upgrade the schema in the same launch. We discourage this. A database should be converted, then upgraded or upgraded and then converted, but they should be done in separate launches of the program.

              You may still have the easiest time stashing the database (in case you want it at some point), launching on a clean one, and restoring the database and using the backup utilities on the systems settings page to restore from your Mango/backups folder if there was data or configuration that needs to be kept.

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

                You will note that you logged in to get those path results. To see the global su PATH, log in as your other user and sudo echo $PATH

                1 Reply Last reply Reply Quote 0
                • D
                  dmsmith
                  last edited by

                  Thanks Phil. There was nothing in the database that couldn't be recreated relatively easily so went ahead and moved the old databases directory aside and did an 'ma.sh start' - has worked nicely. Have only had Mango installed for around 2 or 3 weeks and haven't initiated a db upgrade so I'm not sure where that would have gone wrong.

                  Thanks for the help.

                  1 Reply Last reply Reply Quote 0
                  • D
                    dmsmith
                    last edited by

                    Hi Phil,

                    OK, so using sudo from the regular user rather than su-ing :

                    ml350g5@HPS350G5:/opt/mango/bin$ sudo echo $JAVA_HOME
                    /usr/lib/jvm/oracle_jdk8
                    ml350g5@HPS350G5:/opt/mango/bin$ sudo ./ma.sh start
                    MA_HOME is /opt/mango
                    ml350g5@HPS350G5:/opt/mango/bin$ /opt/mango/bin/ma-start.sh: line 94: java: command not found
                    ma-start: MA started with Process ID: 21182
                    ma-start: no restart flag found, not restarting MA
                    ma-start: MA done

                    Immediately prior to this Mango was running correctly when started by root. As root I issued "ma.sh stop" which completed successfully, exited from the root shell, and then did what you see above. Any thoughts?

                    Thanks!

                    1 Reply Last reply Reply Quote 0
                    • JoelHaggarJ
                      JoelHaggar
                      last edited by

                      It looks like your JAVA_HOME variable is pointing to a JVM rather than the JDK. It needs to point to the JDK to work. Let us know if that solves it.

                      1 Reply Last reply Reply Quote 0
                      • JoelHaggarJ
                        JoelHaggar
                        last edited by

                        After you have that resolved I would recommend setting up the service to start and stop Mango: http://infiniteautomation.com/wiki/doku.php?id=installation:services

                        1 Reply Last reply Reply Quote 0
                        • D
                          dmsmith
                          last edited by

                          Thanks Joel.

                          It's definitely the JDK.

                          /usr/lib/jvm/oracle_jdk8# javac -version
                          javac 1.8.0_66

                          I have indeed created that service, I just have a habit of going directly to ma.sh instead :)

                          1 Reply Last reply Reply Quote 0
                          • JoelHaggarJ
                            JoelHaggar
                            last edited by

                            Can you check the /opt/mango/lib folder I wonder if it is empty? If so there could have been a upgrade issue in which case you would want to download the core zip file again and copy all the contents of the lib folder. This is just another guess. If that doesn't resolve it contact us at support and we'll hop on a screen share with you to poke around directly.

                            1 Reply Last reply Reply Quote 0
                            • D
                              dmsmith
                              last edited by

                              Definitely not empty - 156 jar files in there.

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

                                Well, more information could be gained by modifying the bin/ma-init.sh script to echo relevant stuff during the bin/ma.sh launch

                                Perhaps...
                                echo $EXECJAVA
                                ls -l $(echo $EXECJAVA | sed -e 's/java$//') | grep java
                                ... around line 27 of bin/ma-init.sh

                                1 Reply Last reply Reply Quote 0
                                • D
                                  dmsmith
                                  last edited by dmsmith

                                  OK, that did the trick thanks Phil. Even though sudo echo $PATH didn't suggest that the path was being reset, adding those lines into the init script showed that it actually was being reset. Launching with sudo -E ./ma.sh start worked correctly! :)

                                  1 Reply Last reply Reply Quote 0
                                  • M
                                    mihairosu
                                    last edited by mihairosu

                                    We've been having a similar problem (not auto starting at boot) for months now. However, I'm not so Linux savvy as smith. Could one of you poke around and try to resolve this issue?

                                    PS, We're Sheridan Point Condominiums.

                                    D 1 Reply Last reply Reply Quote 0
                                    • D
                                      dmsmith @mihairosu
                                      last edited by

                                      @mihairosu
                                      Hi. What happens when you try to manually start Mango after boot? What process do you use to do that?

                                      Cheers,

                                      David

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

                                        Hi Mihairosu,

                                        Can you email us the log from your Mango? You can find these on the computer at /opt/mango/logs/ma.log or more easily by logging in to Mango as the admin, navigating to the logging console page (tree log icon), and clicking the 'email logs to Infinite Automation' button (I believe this is Core 2.7+)

                                        Icon:
                                        logging.png

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

                                          Hi Mihairosu, I may already be able to look into it. I will conduct the rest by email.

                                          1 Reply Last reply Reply Quote 0
                                          • M
                                            mihairosu
                                            last edited by

                                            Thanks for fixing it for us Phil, this is much nicer!

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