Can't start on Linux - Command not found
-
Hi,
I have done Linux installs before, but just experiencing the problem below.
Getting "command not found" but the ma.sh file is there.
Any ideas?pi@raspberrypi:/opt/mango/bin $ ls ext-available h2-web-console.sh ma.sh ma-stop.sh ext-enabled ma-init.sh ma-start.bat upgrade.bat h2-web-console.bat ma-restart.sh ma-start.sh upgrade.sh pi@raspberrypi:/opt/mango/bin $ ./ma.sh start -bash: ./ma.sh: Permission denied pi@raspberrypi:/opt/mango/bin $ sudo ./ma.sh start sudo: ./ma.sh: command not found pi@raspberrypi:/opt/mango/bin $
Also my service won't start...
pi@raspberrypi:/opt/mango/bin $ sudo service mango start Job for mango.service failed because the control process exited with error code. See "systemctl status mango.service" and "journalctl -xe" for details. pi@raspberrypi:/opt/mango/bin $ systemctl status mango.service ā mango.service - LSB: Start or stop the Mango Automation Loaded: loaded (/etc/init.d/mango; generated; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2018-05-03 17:50:13 AEST; 30s ag Docs: man:systemd-sysv-generator(8) Process: 734 ExecStart=/etc/init.d/mango start (code=exited, status=126) May 03 17:50:13 raspberrypi systemd[1]: Starting LSB: Start or stop the Mango Au May 03 17:50:13 raspberrypi systemd[1]: mango.service: Control process exited, c May 03 17:50:13 raspberrypi systemd[1]: Failed to start LSB: Start or stop the M May 03 17:50:13 raspberrypi systemd[1]: mango.service: Unit entered failed state May 03 17:50:13 raspberrypi systemd[1]: mango.service: Failed with result 'exit- lines 1-11/11 (END)...skipping... ā mango.service - LSB: Start or stop the Mango Automation Loaded: loaded (/etc/init.d/mango; generated; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2018-05-03 17:50:13 AEST; 30s ago Docs: man:systemd-sysv-generator(8) Process: 734 ExecStart=/etc/init.d/mango start (code=exited, status=126) May 03 17:50:13 raspberrypi systemd[1]: Starting LSB: Start or stop the Mango Automation... May 03 17:50:13 raspberrypi systemd[1]: mango.service: Control process exited, code=exited status=126 May 03 17:50:13 raspberrypi systemd[1]: Failed to start LSB: Start or stop the Mango Automation. May 03 17:50:13 raspberrypi systemd[1]: mango.service: Unit entered failed state. May 03 17:50:13 raspberrypi systemd[1]: mango.service: Failed with result 'exit-code'.
pi@raspberrypi:~ $ sudo service mango start Job for mango.service failed because the control process exited with error code. See "systemctl status mango.service" and "journalctl -xe" for details. pi@raspberrypi:~ $ journalctl -xe May 03 18:00:46 raspberrypi systemd[618]: Startup finished in 156ms. -- Subject: System start-up is now complete -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- All system services necessary queued for starting at boot have been -- successfully started. Note that this does not mean that the machine is -- now idle as services might still be busy with completing start-up. -- -- Kernel start-up required KERNEL_USEC microseconds. -- -- Initial RAM disk start-up required INITRD_USEC microseconds. -- -- Userspace start-up required 156093 microseconds. May 03 18:00:46 raspberrypi systemd[1]: Started User Manager for UID 1000. -- Subject: Unit user@1000.service has finished start-up -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- Unit user@1000.service has finished starting up. -- -- The start-up result is done. May 03 18:00:46 raspberrypi kernel: Under-voltage detected! (0x00050005) May 03 18:01:00 raspberrypi systemd[1]: Time has been changed -- Subject: Time change -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- The system clock has been changed to REALTIME microseconds after January 1st, 1970. May 03 18:01:00 raspberrypi systemd-timesyncd[265]: Synchronized to time server 13.55.50.68:123 (2.debian.pool.ntp. May 03 18:01:00 raspberrypi systemd[618]: Time has been changed -- Subject: Time change -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- The system clock has been changed to REALTIME microseconds after January 1st, 1970. May 03 18:01:00 raspberrypi systemd[1]: apt-daily.timer: Adding 5h 25min 53.755639s random time. May 03 18:01:00 raspberrypi systemd[1]: apt-daily-upgrade.timer: Adding 33min 55.036043s random time. May 03 18:01:02 raspberrypi kernel: Voltage normalised (0x00000000) May 03 18:01:22 raspberrypi sudo[661]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/usr/sbin/service May 03 18:01:22 raspberrypi sudo[661]: pam_unix(sudo:session): session opened for user root by pi(uid=0) May 03 18:01:23 raspberrypi systemd[1]: Starting LSB: Start or stop the Mango Automation... -- Subject: Unit mango.service has begun start-up -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- Unit mango.service has begun starting up. May 03 18:01:23 raspberrypi systemd[1]: mango.service: Control process exited, code=exited status=126 May 03 18:01:23 raspberrypi systemd[1]: Failed to start LSB: Start or stop the Mango Automation. -- Subject: Unit mango.service has failed -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- Unit mango.service has failed. -- -- The result is failed. May 03 18:01:23 raspberrypi systemd[1]: mango.service: Unit entered failed state. May 03 18:01:23 raspberrypi systemd[1]: mango.service: Failed with result 'exit-code'. May 03 18:01:23 raspberrypi sudo[661]: pam_unix(sudo:session): session closed for user root May 03 18:01:23 raspberrypi kernel: Under-voltage detected! (0x00050005) May 03 18:01:29 raspberrypi kernel: Voltage normalised (0x00000000) lines 1375-1435/1435 (END)
-
Hi hayden_AUS,
sudo chmod +x /opt/mango/bin/*.sh
-
Thanks Phil...
-
Sorry if I was terse. But, the first image really appears as though the file is not marked executable. The chmod will give the file that permission, and then you can ./ it or invoke it from your service.
It looks like the file permission settings for the scripts are a little off in the current download. Thanks for bringing that to our attention, I'll try to sort it out.
Fortunately this doesn't affect people upgrading Mango, since the upgrade script ensures the scripts are executable.
-
I have ensured the .sh scripts will be executable when downloaded from the store. This was caused by some recent changes we made in the store to make uploading new minor releases easier for us. Sorry for the inconvenience.
Edit: As of 5/7/18 the file permissions in the downloads will be right on Mac / Unix if you unzip it on the command line using "unzip" but may be wrong if you unzip them by right clicking the archive in a file explorer and extracting. We'll iron out this issue sooner than later.