Running as service on RaspberryPi 2 [SOLVED]
-
Hello All
Got a problem running the Monocle-gateway on RaspberryPi 2 as a service, the application runs great on its own but I really need this to run as a service and startup on boot.Here is the error I am seeing, I have performed an uninstall and a reinstall.
-
__ __ ___ _ _ ___ ___ _ ___ *
-
| \/ |/ _ \| \| |/ _ \ / __| | | __| *
-
| |\/| | (_) | .` | (_) | (__| |__| _| *
-
|_| |_|\___/|_|\_|\___/ \___|____|___| *
-
*
<<ENABLING>> THE [MONOCLE-GATEWAY] SERVICE
Failed to enable unit: Interactive authentication required.● monocle-gateway.service - Monocle Gateway Service
Loaded: loaded (/etc/systemd/system/monocle-gateway.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sun 2018-09-30 16:24:57 BST; 1min 12s ago
Process: 1297 ExecStart=/usr/local/bin/monocle-gateway (code=exited, status=217/USER)
Main PID: 1297 (code=exited, status=217/USER)Sep 30 16:24:57 raspberrypi systemd[1]: monocle-gateway.service: Failed with result ‘exit-code’.
pi@raspberrypi:/usr/local/bin $
Any ideas
-
-
@dabware said in Running as service on RaspberryPi 2:
code=exited, status=217/USER
Technically speaking we only support the RPi3B and higher due to concerns over limited processing capabilities on the older models. However, we are happy to try to get it working so that you can evaluate the solution and determine for yourself if a more powerful/newer model is required for your specific needs.
It looks like the service is failing to load due to the user account that the service is trying to start with. The install script should have created a system user account (a user account with no logon privileges) named “monocle”. Another user pointed out a file permissions issue in the current install script where the “monocle” user does not have sufficient READ access to the
/etc/monocle/monocle.token
file.If you would like to open a support ticket at: https://monoclecam.com/contact we would be happy to provide you access to the unreleased version of the Monocle Gateway that includes the fix for the permissions issue.
Thank You, Robert
-
Just an update for future readers …
The Monocle Gateway is now available for the RaspberryPi as a Debian installer package (*.deb) and does install as a system service/daemon (via systemd)