Monocle Gateway on Rasberry Pi
-
I’ve recently bought and installed a Rasberry Pi 4 4Gb, and have been working through installing the Gateway on it. However, no matter which installation method I use, either Debian or Bash, I get the same results. Installation is successful, but tailing the log shows the service failing.
I am currently running:
pi@Pi-hole:/etc $ cat os-release PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
My logs show the same thing, over and over, which is this:
Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: ****************************************************************** Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: * __ __ ___ _ _ ___ ___ _ ___ * Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: * | \/ |/ _ \| \| |/ _ \ / __| | | __| * Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: * | |\/| | (_) | .` | (_) | (__| |__| _| * Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: * |_| |_|\___/|_|\_|\___/ \___|____|___| * Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: * * Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: ****************************************************************** Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: pkg/prelude/bootstrap.js:1172 Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: throw error; Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: ^ Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: TypeError: Cannot read property 'jti' of null Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: at new MonocleClient (/snapshot/monocle-gateway/lib/monocle/MonocleClient.js:1:1171) Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: at Object.<anonymous> (/snapshot/monocle-gateway/lib/monocle/MonocleGateway.js:1:5241) Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: at Module._compile (pkg/prelude/bootstrap.js:1243:22) Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: at Object.Module._extensio ns..js (module.js:650:10) Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: at Module.load (module.js:558:32) Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: at tryModuleLoad (module.js:501:12) Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: at Function.Module._load (module.js:493:3) Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: at Module.require (module.js:583:17) Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: at Module.require (pkg/prelude/bootstrap.js:1153:31) Aug 17 23:54:49 Pi-hole monocle-gateway[25805]: at require (internal/module.js:11:18) Aug 17 23:54:49 Pi-hole systemd[1]: monocle-gateway.service: Main process exited, code=exited, status=1/FAILURE Aug 17 23:54:49 Pi-hole systemd[1]: monocle-gateway.service: Failed with result 'exit-code'. Aug 17 23:56:49 Pi-hole systemd[1]: monocle-gateway.service: Service RestartSec=2min expired, scheduling restart. Aug 17 23:56:49 Pi-hole systemd[1]: monocle-gateway.service: Scheduled restart job, restart counter is at 2. Aug 17 23:56:49 Pi-hole systemd[1]: Stopped Monocle Gateway Service. Aug 17 23:56:49 Pi-hole systemd[1]: Started Monocle Gateway Service.
I haven’t been able to look into this much further, however, any assistance would be awesome. I’m more than willing to provide any other debug or logs if needed.
Thanks in advance!
-
I was able to get it working today! So apparently I installed Raspberry Pi OS lite, which didn’t include the standard packages, such as Java. Upon installation of Java and retrying the install of the Monocle gateway, I was able to get it working.
Might be worthwhile to list having the required dependencies as part of the perquisites page.
-
Thanks for posting this. The error reminds me of an issue we have seen where there is no
monocle.token
file found on the filesystem (/etc/monocle/monocle.token
). Do you think this may have been the case?I think the dependencies are listed in the Debian installer package and thus should have been installed automatically … unless we have missed one or more :-)
Thanks, Robert
-
@Monocle I believe it was a combination of Java and what you stated regarding the token. I did have the token in the directory, however, I found later, after installing Java, that the system did not have access to the token due to permissions of the file. I used
$ touch monocle.token
to create the file, then vi to paste the contents. But, I found that the permissions were set to only allow my current user access, and with a simple chmod, I fixed that problem as well.
For anyone also experiencing similar issues, I was using the Linux Subsystem for Windows to SSH into my pi via Command Prompt. There was a weird issue trying to get the contents to copy from the downloaded txt token file into vi using command prompt. Definitely ensure that when you are using vi to paste, use the command
:set paste
before inserting the token contents to help maintain proper copy/paste from Windows.
Thanks for following up!
-
I don’t think we have any dependency on Java itself – of course it very well could be some other (shared) dependency that gets installed along with the Java installation package.
Thanks for the follow-up!
Robert