Page 1 of 1

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

Posted: Wed Dec 04, 2019 9:24 pm
by PickyBiker
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:
spi@Mister:~ $ 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

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

Posted: Wed Dec 04, 2019 9:50 pm
by PickyBiker
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

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

Posted: Wed Apr 29, 2020 10:03 am
by oesel
Hi,
I have even a problem to start wsdd manually on a raspberry pi 3 B+.
When I use your systemd service file the following message appears:

● wsdd.service - Web Services Dynamic Discovery host daemon
Loaded: loaded (/etc/systemd/system/wsdd.service; enabled; vendor preset: enabled
Active: failed (Result: exit-code) since Wed 2020-04-29 11:22:25 CEST; 20s ago
Main PID: 28481 (code=exited, status=2)

avril 29 11:22:25 raspberrypi systemd[1]: Started Web Services Dynamic Discovery hos
avril 29 11:22:25 raspberrypi systemd[1]: wsdd.service: Main process exited, code=ex
avril 29 11:22:25 raspberrypi systemd[1]: wsdd.service: Unit entered failed state.
avril 29 11:22:25 raspberrypi systemd[1]: wsdd.service: Failed with result 'exit-cod

Could you help me?

P.S.: The installation was made according to the following instructions: https://devanswers.co/discover-ubuntu-m ... 0-network/, with the wsdd.service file modified according to you.