Ubuntu 18 Install failed
-
Hi all,
I'm trying to install Mango on Ubuntu 18.4 but it keeps failing. I'm using the install script as I'm not that up on Linux but it keeps failing. I have Installed JDK and set the JAVA_HOME variable.
I first tried to install Mango Version 3.7.7 which failed with the error below. Then I tried version 4 which indicated it installed correctly and seemed to start but I can't connect to it on 127.0.0.1.
I then tried to install 3.7.7 again (I though the fact that seemed to install v.4 might help) but I'm still getting the error below - "can't find env.properties file" I did enter "yes" when prompted to overwrite files.
Any thoughts would be appreciated.[sudo] password for powerpoint: Where should we store Mango data? [/opt/mango-data]: Which OS user should Mango run as? (Will be created if it does not exist) [mango]: What type of SQL database? (h2 or mysql) [h2]: Installation directory is not empty, delete all files in '/opt/mango'? (May contain H2 databases and time series databases) [no]: yes What version of Mango do you want to install? [4.0.0]: 3.7.7 Install free (personal/educational use, 300 point limit) or enterprise (evaluation) bundle? [enterprise]: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 144M 100 144M 0 0 4713k 0 0:00:31 0:00:31 --:--:-- 5286k Config file '/opt/mango-data/mango.properties' exists, overwrite it? [no]: yes Can't find env.properties file powerpoint@powerpoint-UltraPoint:~$
-
@robmalone Hi, I also face hardship installing v3 so I tried v4. It is much easier. Before installing everything, don't forget to delete the residual folder and file.
In latest v4, env.properties is replace with mango.properties (which is moved to /home/mango) -
@tungthanh500 I assumed since the files were being overwritten I didn't need to remove the directories. I removed them and that did the trick. Still can get v3 to work though. Guess I'll just use 4. Thanks for your help.
-
@Robmalone
If you still want to use v3.7.x then you can try this. Where it says to -curl -o install-mango.sh https://raw.githubusercontent.com/infiniteautomation/ma-core-public/main/Core/bin/install-mango.sh
Try this instead -
curl -o install-mango.sh https://raw.githubusercontent.com/infiniteautomation/ma-core-public/3.7.x/Core/scripts/install-mango.sh
When it asks for a version, answer 3.7.7
Alternatively, try the manual installation instructions - https://docs-v3.mango-os.com/linux-installation
-
@jared-wiltshire Installation stops at
/opt/mango/bin/genkey.sh: 1: /opt/mango/bin/genkey.sh: 404:: not foundI will have a lot of these to build over the next few months/year or so (about 300 systems) so it would be great to use the install script rather than having to manually install them all.
V4 installed fine but @CraigWeb recommend I stick to v3.7.
-
@robmalone Can you solve the problem with V4? If you cannot access the system on localhost, please try changing port to 8443, (but don't forget to forward that port).
-
Hi @tungthanh500 Yes I can get V4 working but as it's not officially released yet I've been advised to use V3.7.7.
-
@robmalone I think I also have to fall back to 3.7.7 because I face point unreliable. Not sure how to fix it. No correct answer in forum yet
-
@robmalone said in Ubuntu 18 Install failed:
@jared-wiltshire Installation stops at
/opt/mango/bin/genkey.sh: 1: /opt/mango/bin/genkey.sh: 404:: not foundI will have a lot of these to build over the next few months/year or so (about 300 systems) so it would be great to use the install script rather than having to manually install them all.
Try again now. I updated the script for 3.7.x
-
@robmalone said in Ubuntu 18 Install failed:
Hi @tungthanh500 Yes I can get V4 working but as it's not officially released yet I've been advised to use V3.7.7.
It will be released very soon. Bear in mind that v4 will require a new license however.
-
@jared-wiltshire Thanks Jared. The install seemed to work but I can't access the GUI. Should I see mango running as a service after starting it?```
powerpoint@powerpoint-UltraPoint:~$ service --status-all
[ + ] acpid
[ - ] alsa-utils
[ - ] anacron
[ + ] apparmor
[ + ] apport
[ + ] avahi-daemon
[ - ] bluetooth
[ - ] console-setup.sh
[ + ] cron
[ + ] cups
[ + ] cups-browsed
[ + ] dbus
[ - ] dns-clean
[ + ] gdm3
[ + ] grub-common
[ - ] hwclock.sh
[ + ] irqbalance
[ + ] kerneloops
[ - ] keyboard-setup.sh
[ + ] kmod
[ - ] lvm2
[ + ] lvm2-lvmetad
[ + ] lvm2-lvmpolld
[ + ] network-manager
[ + ] networking
[ - ] plymouth
[ - ] plymouth-log
[ - ] pppd-dns
[ + ] procps
[ - ] rsync
[ + ] rsyslog
[ - ] saned
[ + ] speech-dispatcher
[ - ] spice-vdagent
[ + ] udev
[ + ] ufw
[ + ] unattended-upgrades
[ - ] uuidd
[ + ] whoopsie
[ - ] x11-common -
@robmalone The install script installs Mango as a systemd service but does not start it.
See bottom of https://docs-v3.mango-os.com/linux-installation to check the status of the service, start/stop commands. -
@jared-wiltshire Yes I did start it with systemctl start mango
When I check the status i get the following:powerpoint@powerpoint-UltraPoint:~$ systemctl status mango ā mango.service - Mango Automation Loaded: loaded (/opt/mango/overrides/mango.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2021-07-13 17:49:53 IST; 38s ago Process: 2538 ExecStart=/opt/mango/bin/start-mango.sh (code=exited, status=0/SUCCESS) Main PID: 2541 (java) Tasks: 24 (limit: 4447) CGroup: /system.slice/mango.service āā2541 /snap/openjdk/321/jdk/bin/java -server -Dma.home=/opt/mango com.serotonin.m2m2.Main Jul 13 17:49:53 powerpoint-UltraPoint start-mango.sh[2538]: Starting Mango Automation Jul 13 17:49:53 powerpoint-UltraPoint start-mango.sh[2538]: Mango Automation started with process ID: 2541 Jul 13 17:49:53 powerpoint-UltraPoint systemd[1]: Started Mango Automation. Jul 13 17:50:04 powerpoint-UltraPoint start-mango.sh[2538]: Unable to determine the machine id Jul 13 17:50:04 powerpoint-UltraPoint start-mango.sh[2538]: FATAL (com.serotonin.m2m2.Lifecycle.loadLic:592) - Unable to determine the machine Jul 13 17:50:04 powerpoint-UltraPoint start-mango.sh[2538]: ERROR (com.serotonin.m2m2.Main.main:162) - Error during initialization Jul 13 17:50:04 powerpoint-UltraPoint start-mango.sh[2538]: java.lang.RuntimeException: Unable to determine the machine id Jul 13 17:50:04 powerpoint-UltraPoint start-mango.sh[2538]: at com.serotonin.m2m2.Lifecycle.loadLic(Lifecycle.java:595) ~[ma-priv-3.7. Jul 13 17:50:04 powerpoint-UltraPoint start-mango.sh[2538]: at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:277) ~[ma-priv-3 Jul 13 17:50:04 powerpoint-UltraPoint start-mango.sh[2538]: at com.serotonin.m2m2.Main.main(Main.java:159) ~[ma-priv-3.7.7.jar:?]
-
@robmalone It seems to be installed but its crashing on start. Post your full ma.log file.
I would try installing a different JDK, not inside a snap. -
I'm receiving the same error on Ubuntu 20.04LTS
Jul 13 18:45:04 onxl4549 start-mango.sh[832]: Starting Mango Automation
Jul 13 18:45:04 onxl4549 start-mango.sh[832]: Mango Automation started with process ID: 1020
Jul 13 18:45:04 onxl4549 systemd[1]: Started SBIO dTwins.
Jul 13 18:46:55 onxl4549 start-mango.sh[1020]: Unable to determine the machine id
Jul 13 18:46:55 onxl4549 start-mango.sh[1020]: FATAL (com.serotonin.m2m2.Lifecycle.loadLic:592) - Unable to determine the machine id
Jul 13 18:46:55 onxl4549 start-mango.sh[1020]: ERROR (com.serotonin.m2m2.Main.main:162) - Error during initialization
Jul 13 18:46:55 onxl4549 start-mango.sh[1020]: java.lang.RuntimeException: Unable to determine the machine id
Jul 13 18:46:55 onxl4549 start-mango.sh[1020]: at com.serotonin.m2m2.Lifecycle.loadLic(Lifecycle.java:595) ~[ma-priv-3.7.7.jar:?]
Jul 13 18:46:55 onxl4549 start-mango.sh[1020]: at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:277) ~[ma-priv-3.7.7.jar:?]
Jul 13 18:46:55 onxl4549 start-mango.sh[1020]: at com.serotonin.m2m2.Main.main(Main.java:159) ~[ma-priv-3.7.7.jar:?] -
with the contents of ma.log
INFO 2021-07-13T18:53:09,828 (com.serotonin.m2m2.Lifecycle.loadLic:583) - Checking license...
WARN 2021-07-13T18:53:09,872 (com.serotonin.m2m2.CoreLicenseDefinition.getSpecificGuid:338) - Host exception:
java.io.FileNotFoundException: /opt/dTwin/.ma (No such file or directory)
at java.io.FileOutputStream.open0(Native Method) ~[?:?]
at java.io.FileOutputStream.open(FileOutputStream.java:298) ~[?:?]
at java.io.FileOutputStream.<init>(FileOutputStream.java:237) ~[?:?]
at java.io.FileOutputStream.<init>(FileOutputStream.java:187) ~[?:?]
at java.io.FileWriter.<init>(FileWriter.java:96) ~[?:?]
at com.serotonin.m2m2.host.DefaultHost.guid(DefaultHost.java:69) ~[ma-priv-3.7.7.jar:?]
at com.serotonin.m2m2.CoreLicenseDefinition.getSpecificGuid(CoreLicenseDefinition.java:333) ~[ma-priv-3.7.7.jar:?]
at com.serotonin.m2m2.CoreLicenseDefinition.guid(CoreLicenseDefinition.java:317) ~[ma-priv-3.7.7.jar:?]
at com.serotonin.m2m2.CoreLicenseDefinition.initializeLic(CoreLicenseDefinition.java:117) ~[ma-priv-3.7.7.jar:?]
at com.serotonin.m2m2.CoreLicenseDefinition.licenseCheck(CoreLicenseDefinition.java:101) ~[ma-priv-3.7.7.jar:?]
at com.serotonin.m2m2.Lifecycle.loadLic(Lifecycle.java:659) ~[ma-priv-3.7.7.jar:?]
at com.serotonin.m2m2.Lifecycle.loadLic(Lifecycle.java:587) ~[ma-priv-3.7.7.jar:?]
at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:277) ~[ma-priv-3.7.7.jar:?]
at com.serotonin.m2m2.Main.main(Main.java:159) ~[ma-priv-3.7.7.jar:?]
FATAL 2021-07-13T18:53:09,872 (com.serotonin.m2m2.Lifecycle.loadLic:592) - Unable to determine the machine id
ERROR 2021-07-13T18:53:09,872 (com.serotonin.m2m2.Main.main:162) - Error during initialization
java.lang.RuntimeException: Unable to determine the machine id
at com.serotonin.m2m2.Lifecycle.loadLic(Lifecycle.java:595) ~[ma-priv-3.7.7.jar:?]
at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:277) ~[ma-priv-3.7.7.jar:?]
at com.serotonin.m2m2.Main.main(Main.java:159) ~[ma-priv-3.7.7.jar:?]
INFO 2021-07-13T18:53:09,873 (com.serotonin.m2m2.Lifecycle.terminate:400) - Mango Lifecycle terminating...
INFO 2021-07-13T18:53:09,915 (com.serotonin.m2m2.Lifecycle.terminate:550) - Mango Lifecycle terminated. -
@Gordoe What user is mango running as? The install script should ask you to create a user. What is that user's home directory? Does that user have write permission for their own home directory?
-
@jared-wiltshire
It's running as Mango.I'll start a new post as I don't want to hijack this one. Same error but not from the installation script.