PickyBiker
Posts: 84
Joined: Tue Nov 26, 2013 6:26 pm
Location: Texas

Can't start wsdd on boot, but work when done manually

Wed Dec 04, 2019 9:24 pm

I don't seem t be able to start wsdd from a systemd service but it starts an runs fine if I start it manually.
Not sure what I an doing wrong.

The error is:
[email protected]:~ $ sudo systemctl status wsdd
● wsdd.service - WSD Service
Loaded: loaded (/etc/systemd/system/wsdd.service; enabled; vendor preset: ena
Active: failed (Result: exit-code) since Wed 2019-12-04 15:12:36 CST; 7min ag
Process: 337 ExecStart=/usr/bin/python3 wsdd.py (code=exited, status=1/FAILURE
Main PID: 337 (code=exited, status=1/FAILURE)

Dec 04 15:12:34 Mister systemd[1]: Started WSD Service.
Dec 04 15:12:36 Mister python3[337]: 2019-12-04 15:12:36,470:wsdd WARNING(pid 33
Dec 04 15:12:36 Mister python3[337]: 2019-12-04 15:12:36,516:wsdd ERROR(pid 337)
Dec 04 15:12:36 Mister systemd[1]: wsdd.service: Main process exited, code=exite
Dec 04 15:12:36 Mister systemd[1]: wsdd.service: Failed with result 'exit-code'.
lines 1-11/11 (END)...skipping...
● wsdd.service - WSD Service
Loaded: loaded (/etc/systemd/system/wsdd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2019-12-04 15:12:36 CST; 7min ago
Process: 337 ExecStart=/usr/bin/python3 wsdd.py (code=exited, status=1/FAILURE)
Main PID: 337 (code=exited, status=1/FAILURE)

Dec 04 15:12:34 Mister systemd[1]: Started WSD Service.
Dec 04 15:12:36 Mister python3[337]: 2019-12-04 15:12:36,470:wsdd WARNING(pid 337): no interface given, using all interfaces
Dec 04 15:12:36 Mister python3[337]: 2019-12-04 15:12:36,516:wsdd ERROR(pid 337): No multicast addresses available. Exiting.
Dec 04 15:12:36 Mister systemd[1]: wsdd.service: Main process exited, code=exited, status=1/FAILURE
Dec 04 15:12:36 Mister systemd[1]: wsdd.service: Failed with result 'exit-code'.


The wsdd.service file is:
[Unit]
Description=WSD Service
After=syslog.target
Wants=local-fs.target

[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/
ExecStart=/usr/bin/python3 wsdd.py

[Install]
WantedBy=network-online.target

PickyBiker
Posts: 84
Joined: Tue Nov 26, 2013 6:26 pm
Location: Texas

Re: Can't start wsdd on boot, but work when done manually

Wed Dec 04, 2019 9:50 pm

This is now working. Changed the systemd service file to the following which now waits until the network is online before starting wsdd. Several reboots now result in this daemon running okay.
[Unit]
Description=WSD Service
After=syslog.target
Wants=network-online.target
After=network-online.target

[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/
ExecStart=/usr/bin/python3 wsdd.py

[Install]
WantedBy=multi-user.target

Return to “General discussion”