question

FrankSarlemijn-9053 avatar image
0 Votes"
FrankSarlemijn-9053 asked

Running .Net 5 WorkerService as daemon on Raspbian configuration issue

Created a WorkerService that runs well as a service on Windows. After changing the UseWindowsService() call to UseSystemd() (and the filepath to use for logging) and publishing I can alse execute it from the command line using ssh on my raspberry pi. I checked several samples of configuring the service but until now a status check on the service gives me:

GCodeRelayWorkerService.service - Dotnet Core Demo service
Loaded: loaded (/etc/systemd/system/GCodeRelayWorkerService.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-01-20 11:53:20 GMT; 5s ago
Process: 1086 ExecStart=/home/pi/codeshare/WorkerService/GCodeRelayWorkerService.dll (code=exited, status=203/EXEC)
Main PID: 1086 (code=exited, status=203/EXEC)

Jan 20 11:53:20 raspberrypi systemd[1]: GCodeRelayWorkerService.service: Service RestartSec=100ms expired, scheduling restart.
Jan 20 11:53:20 raspberrypi systemd[1]: GCodeRelayWorkerService.service: Scheduled restart job, restart counter is at 5.
Jan 20 11:53:20 raspberrypi systemd[1]: Stopped Dotnet Core Demo service.
Jan 20 11:53:20 raspberrypi systemd[1]: GCodeRelayWorkerService.service: Start request repeated too quickly.
Jan 20 11:53:20 raspberrypi systemd[1]: GCodeRelayWorkerService.service: Failed with result 'exit-code'.
Jan 20 11:53:20 raspberrypi systemd[1]: Failed to start Dotnet Core Demo service.

the systemd configuration file is:

[Unit]
Description=Dotnet Core Demo service

[Service]
ExecStart=/home/pi/codeshare/WorkerService/GCodeRelayWorkerService.dll
WorkingDirectory=/home/pi/codeshare
User=pi
Group=pi
Restart=on-failure
SyslogIdentifier=dotnet-sample-service
PrivateTmp=true

[Install]
WantedBy=multi-user.target

I will be missing something simple... but I don't know what. On Linux/Unix I am as green as grass... also the tags with this post may be off, don't know what valid values are...

thanks for helping out

Frank.

dotnet-iot
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers