@Walter
OK, I was able to reproduce a similar error. Although it may have been because I did not have a monocle.token file in place when the service was installed.
After making sure my monocle.token file did exist at /etc/monocle/monocle.token and making sure that file did contain valid token data (file was not empty), I was able to use the following commands to get the daemon updated on the system and working:
First, I used the --uninstall flag to remove the daemon/systemd config
sudo monocle-gateway --uninstall
Next, I used the --install flag to reinstall the daemon/systemd config
sudo monocle-gateway --install
And finally, I was able to start and view the Monocle Gateway
monocle-gateway --restart
monocle-gateway --tail
If you are still getting those “condition check” errors, use this command and post what it prints out:
systemctl status monocle-gateway.service
As for this specific error:
******************************************************************
* __ __ ___ _ _ ___ ___ _ ___ *
* | \/ |/ _ \| \| |/ _ \ / __| | | __| *
* | |\/| | (_) | .` | (_) | (__| |__| _| *
* |_| |_|\___/|_|\_|\___/ \___|____|___| *
* *
******************************************************************
pkg/prelude/bootstrap.js:1183
throw error;
^
Error: EISDIR: illegal operation on a directory, read
at Object.fs.readSync (fs.js:634:3)
at Object.fs.readSync (pkg/prelude/bootstrap.js:555:32)
at tryReadSync (fs.js:474:20)
at Object.fs.readFileSync (fs.js:515:19)
at Object.fs.readFileSync (pkg/prelude/bootstrap.js:684:36)
at Object.<anonymous> (/snapshot/monocle-gateway/lib/monocle/MonocleGateway.js:1:2954)
at Module._compile (pkg/prelude/bootstrap.js:1259:22)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:711:10)
at Module.load (internal/modules/cjs/loader.js:610:32)
at tryModuleLoad (internal/modules/cjs/loader.js:549:12)
I get this if the /etc/monocle/monocle.token path is a directory and not a file. It should be a file.
You can list the path like this and make sure its a file.
ls -la /etc/monocle/
total 16
drwxrwxr-x 3 root monocle 4096 Jul 26 16:37 .
drwxr-xr-x 109 root root 4096 Jul 26 16:13 ..
-rw-r--r-- 1 root root 285 Jul 26 16:14 monocle.token
Using the file command the output should not be a “directory”.
file /etc/monocle/monocle.token
/etc/monocle/monocle.token: directory
Using the file command the output should be a “ASCII text” file.
file /etc/monocle/monocle.token
/etc/monocle/monocle.token: ASCII text
Thanks, Robert