P
P
pixal2021-11-28 23:55:28
Raspberry Pi
pixal, 2021-11-28 23:55:28

When running this unit, it gives an error 217. How can I solve it?

Hello! I made a unit to autorun my pho. It pulls the url from my own Raspberry Pi server.

[Unit]
Description=Ping service

[Service]
WorkingDirectory=/tmp
ExecStart=/usr/bin/wget http://127.0.0.1:80/task_manager.php
Restart=always
# Restart service after 60 seconds 
RestartSec=60
KillSignal=SIGINT
SyslogIdentifier=pingsvc
User=www-root
#Environment=ASPNETCORE_ENVIRONMENT=Production
#Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false

[Install]
WantedBy=multi-user.target


But when checking the status it gives the following error

myunit.service - Ping service
   Loaded: loaded (/etc/systemd/system/myunit.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2021-11-28 18:41:47 CET; 52s ago
  Process: 2616 ExecStart=/usr/bin/wget http://127.0.0.1:80/task_manager/index.php (code=exited, status=217/USER)
 Main PID: 2616 (code=exited, status=217/USER)

Nov 28 18:41:47 openhabian systemd[1]: myunit.service: Service RestartSec=1s expired, scheduling restart.
Nov 28 18:41:47 openhabian systemd[1]: myunit.service: Scheduled restart job, restart counter is at 5.
Nov 28 18:41:47 openhabian systemd[1]: Stopped Ping service.
Nov 28 18:41:47 openhabian systemd[1]: myunit.service: Start request repeated too quickly.
Nov 28 18:41:47 openhabian systemd[1]: myunit.service: Failed with result 'exit-code'.
Nov 28 18:41:47 openhabian systemd[1]: Failed to start Ping service.


There, as I understand it, there is a problem with the user. Just do not understand what to specify there or create? Tell me please!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karabanov, 2021-11-29
@karabanov

The www-root user does not exist. Either create it or use an existing one, such as your own.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question