a missing dependency in the OS doesn't allow Arc to start
steowens opened this issue · 8 comments
Prerequisites
- [ yes] Did you read the README?
- [ yes ] Are you running the latest version?
- [ yes ] Did you search other issues to see if this problem was already reported?
Description
Description of the bug or feature.
Starting arc with the command: ./arc -config /home/arcd/config.json -log /home/arcd/arcd.log
arc fails to start
Environment
Raspberry PI zero acting as an ethernet device on a Mac. When shed in to the PI zero at raspberrypi.local.
Please provide:
-
Contents of the json configuration file you are using (remove the password hash before posting).
{
"address": "0.0.0.0",
"port": 443,
"max_req_size": 524288,
"username": "arc",
"password": "$hahawishyouknew!!",
"secret": "hahawishyouknew!!",
"certificate": "/home/arcd/arc-tls-cert.pem",
"key": "/home/arcd/arc-tls-key.pem",
"database": "/home/arcd/arcdb",
"token_duration": 60,
"compression": true,
"scheduler": {
"enabled": true,
"period": 10,
"reports": {
"enabled": false,
"rate_limit": 60,
"filter": [ "login_ok", "login_ko", "token_ko", "update", "record_expired" ],
"to": "youremail@gmail.com",
"smtp":{
"address": "smtp.gmail.com",
"port": 587,
"username": "youremail@gmail.com",
"password": "your smtp password"
},
"pgp": {
"enabled": true,
"keys":{
"private": "/server.key",/my.public.key"
"public": "
}
}
}
},
"backups": {
"enabled": false,
"period": 1800,
"folder": "/some/backup/path/",
"run": "scp arc-backup.tar user@backup-server:/media/arc_backup/"
}
} -
Operating system and browser versions used as clients.
curl and safari -
If possible, any javascript log on the browser developer console.
This is not needed since the server refuses connection. -
uname -a
of the arc server.
Linux raspberrypi 5.4.51+ #1333 Mon Aug 10 16:38:02 BST 2020 armv6l GNU/Linux -
Debug output while reproducing the issue (
arc --log-debug ...
).
2020-08-20 17:55:11 inf arc v1.3.4 (linux arm) is starting ...
2020-08-20 17:55:11 inf Loading configuration from /home/arcd/config.json ...
2020-08-20 17:55:11 war Creating database /home/arcd/arcdb ...
2020-08-20 17:55:11 dbg Loading index from '/home/arcd/arcdb' ...
2020-08-20 17:55:11 dbg dbNextId=0
2020-08-20 17:55:11 inf 0 B of records loaded in 888µs.
2020-08-20 17:55:11 dbg Starting scheduler with a period of 10s ...
2020-08-20 17:55:11 war Backups are disabled.
2020-08-20 17:55:11 !!! No PEM block found.
Steps to Reproduce
-
First Step
While logged in as arcd on the server with arc stored in the /home/arcd folder and in bash with pwd outputting "/home/arcd'
type the following command:
./arc -config /home/arcd/config.json -log /home/arcd/arcd.log -debug -
Second Step*
Attempt to access the server -
That's it, you can't.
Expected behavior: What you expected to happen
The server starts and serves pages
Actual behavior: What actually happened
The server fails to start and generates a cryptic message in the log.
--
♥ ANY INCOMPLETE REPORT WILL BE CLOSED RIGHT AWAY ♥
OK so I see the issue, arc failed to generate a certificate because the PI os is missing a dependency but does generate a zero length pair of files on initial startup.
So this is first time user stuff I suppose, I got the system to start once I provided valid certificates but didn't get further than logging in and then trying to create a store. At which point I get a 403 for whatever reason
2020-08-20 18:23:50 inf New event (Pool size is 1): login_ok{when:2020-08-20 18:23:50.262433 +0100 BST m=+76.007258001 what:'Successful login.'}.
2020-08-20 18:23:50 err 169.254.152.36 'POST /auth' > User steve requested new API token
2020-08-20 18:23:50 err 169.254.152.36 'GET /api/config' > Requested configuration.
2020-08-20 18:23:50 err 169.254.152.36 'GET /api/stores' > Requested stores.
2020-08-20 18:23:58 inf New event (Pool size is 2): token_ko{when:2020-08-20 18:23:58.917657 +0100 BST m=+84.662483001 what:'Invalid token authentication.'}.
2020-08-20 18:23:58 war 169.254.152.36 'POST /api/stores' > [403] Forbidden
Time to give up. Seems like a good tool if you can get it to work but I just want something secure that works without lots of mysterious errors. I am going to revert back to something a whole lot simpler and build my own solution. Thank you however for the effort you have put in to this, and I am sure it is really awesome. I am not requesting a response but sharing this experience for your benefit.
@steowens "Whats the revert back to something a whole lot simpler" solution, having a few issues with this my self now.
with all due respect @steowens but the error clearly stated that the PEM files were not valid, if the hardware you're using failed to generate them correctly because "PI os is missing a dependency" what exactly do you expect the tool to do? :D it'd be useful to know what "pi os" you are using and what's the generation issue you're referring to exactly :D I just installed less than a week ago a new instance of arc on a raspberry and it works out of the box. Anyways, thanks for the feedback.
I managed to get mine sorted, I did a fresh install and is working great now apart from the SSL issue but that's no big deal for me.
~Great to see you back @evilsocket
yo @wpa-3! the ssl issue you mean the self signed certificate warning?
Yes that's it, I just couldn't work out how to get it all working with brave my fault though I'm guessing./
doesn't it work like chrome? i just tried and at least on macos the page is the same