Mango on Ubuntu 14.04
-
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.
-
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
-
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.
-
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 doneImmediately 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!
-
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.
-
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
-
Thanks Joel.
It's definitely the JDK.
/usr/lib/jvm/oracle_jdk8# javac -version
javac 1.8.0_66I have indeed created that service, I just have a habit of going directly to ma.sh instead :)
-
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.
-
Definitely not empty - 156 jar files in there.
-
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 -
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 withsudo -E ./ma.sh start
worked correctly! :) -
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.
-
@mihairosu
Hi. What happens when you try to manually start Mango after boot? What process do you use to do that?Cheers,
David
-
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:
-
Hi Mihairosu, I may already be able to look into it. I will conduct the rest by email.
-
Thanks for fixing it for us Phil, this is much nicer!
-
No problem! I wasn't sure why JAVA_HOME wasn't in the environment, but I sourced the environment from the service and exported JAVA_HOME, problem solved.
Added the lines...
. /etc/environment
export JAVA_HOMEto your Mango service file