Hi, don´t know if the section is right for self hosted server issues, admin may relocate to acording forum.
I managed to get an installation of the ovms server running on a raspberry, but the server only starts when calling
./ovms_server.pl
from the working directory or
/bin/sh -c 'exec /home/pi/Open-Vehicle-Server/v3/server/ovms_server.pl >>/var/log/ovms_server.log 2>&1'
from the commandline.
I tried a to run it as a service with
[Unit]
Description=OVMS v3 server
After=network.target
[Service]
Type=simple
WorkingDirectory=/home/pi/Open-Vehicle-Server/v3/server
ExecStart=/bin/sh -c 'exec /home/pi/Open-Vehicle-Server/v3/server/ovms_server.pl >>/var/log/ovms_server.log 2>&1'
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
but ends in a loop like this
● ovms.service - OVMS v3 server
Loaded: loaded (/etc/systemd/system/ovms.service; disabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sat 2021-05-22 15:24:58 BST; 3s ago
Process: 908 ExecStart=/bin/sh -c exec ./ovms_server.pl >>/var/log/ovms_server.log 2>&1 (code=exited, status=2)
Main PID: 908 (code=exited, status=2)
Does someone know where i screwed up?
THX in advance
Unlight
Rule of thumb: it's systemd's fault. Unless it's SELinux or AppArmor.
Did you try starting the server manually as root? Maybe root needs a DB access grant.
The log file and/or systemd journal should give you some hint.
Regards,
Michael
root was quite a hint, seems I installed 2 perl module with cpan as pi user, now that I did it as root everything runs smooth.
THX!
Michael,
you nailed it the last time maybe you have a clue one last time:)
the only thing i didnt manage was the tls support as i signed it myself. i cant get to the trustedca folder, neither in the editor wich doesnt let me save in this location,
nor by commandline or scp. how can i place my cert there? any tips?
THX in advance, especially for your contribution to this great project!
unlight
Remember the path is "/store/trustedca/…". The editor will create the folder as necessary (or you can use the "New dir" button), scp will not do that, so you need to create the directory first.
https://docs.openvehicles.com/en/latest/userguide/ssltls.html
If you can't create the directory, try saving to another place to check if your /store partition is corrupted.
Regards,
Michael
You made my day twice, i could have tried all day long; since the partition was corrupted there was no chance!
did a clean install and it works instantly!
I should have written earlier, spent 3 hours in the night to get it work:)
thx and have a nice holiday!
unlight