6 posts / 0 new
Last post
unlight
Run server as service on raspberry

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

 

 

dexter
dexter's picture
Run server as service on raspberry

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

unlight
root was quite a hint, seems

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!

unlight
what about tls support?

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

dexter
dexter's picture
what about tls support?

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

unlight
You made my day twice, i

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

Log in or register to post comments