Closed daha76 closed 4 years ago
Thanks for the report. I have some questions: What is the command in the systemd unit file you use to start wsdd? Does the error also occur, when you start wsdd on the command line with the exact same arguments? What does the hostname on your machine looks like (hostname
)?
Hi,
so my wsdd.conf looks like this:
# command line parameters for wsdd (consult man page) WSDD_PARAMS="-w WORKGROUP"
starting from command line with the same parameter as in config file is not a problem and it works. Starting it as a service causing error:
root@raspberrypi:/home/pi# systemctl status wsdd ● wsdd.service - Web Services Dynamic Discovery host daemon Loaded: loaded (/lib/systemd/system/wsdd.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2020-10-14 23:17:01 CEST; 9h ago Main PID: 680 (python3) Tasks: 1 (limit: 2094) CGroup: /system.slice/wsdd.service └─680 python3 /usr/bin/wsdd -w WORKGROUP
Oct 15 04:15:54 raspberrypi wsdd[680]: File "/usr/bin/wsdd", line 1026, in handle_deleted_address Oct 15 04:15:54 raspberrypi wsdd[680]: if not self.is_address_handled(addr_family, raw_addr, interface): Oct 15 04:15:54 raspberrypi wsdd[680]: File "/usr/bin/wsdd", line 982, in is_address_handled Oct 15 04:15:54 raspberrypi wsdd[680]: addr_str = socket.inet_ntop(addr_family, addr) Oct 15 04:15:54 raspberrypi wsdd[680]: TypeError: an integer is required (got type bytes) Oct 15 07:58:04 raspberrypi wsdd[680]: 2020-10-15 07:58:04,081:wsdd WARNING(pid 680): invalid resolve request: a Oct 15 07:58:06 raspberrypi wsdd[680]: 2020-10-15 07:58:06,532:wsdd WARNING(pid 680): invalid resolve request: a Oct 15 07:59:09 raspberrypi wsdd[680]: 2020-10-15 07:59:09,815:wsdd WARNING(pid 680): invalid resolve request: a Oct 15 08:13:34 raspberrypi wsdd[680]: 2020-10-15 08:13:34,586:wsdd WARNING(pid 680): invalid resolve request: a Oct 15 08:29:24 raspberrypi wsdd[680]: 2020-10-15 08:29:24,765:wsdd WARNING(pid 680): invalid resolve request: a
So I tried to reinstall WSDD again, and then the interesting things pop up. After reinstall when I started WSDD service manually, it was working fine. I mean via systemctl start wsdd
. But after I restarted my RPi 3B+ the systemctl status wsdd
show already posted error. Then I stopped WSDD service and started it again manually and it started OK, without errors, and also appeared in the network. So something wrong happening when RPi is restarted/booted... Host name is simple RASPBERRYPI
My RPi is connected via Wifi, maybe this is the issue as wifi needs some time to get connected to the router, just my assumption.
That's my findings.
Thanks for your analysis. The error messages from the systemd status output indicate a problem in wsdd handles a change in the network configuration, i.e. an address removal. This may happen on system startup when the wifi receives an address (via DHCP or SLAAC, e.g.) and drops an old one in favor for the new one. I'll look into this...
Ok, you actually faced two issues here. The one in your original post was encountered when new addresses are added, and the second one occurred when addresses are removed. Both of the issues are should be resolved within the issue-62 branch. Could give that a try?
OK, I can test it, but is it enough just to make an update via apt or the procedure to get the isue-62 branch is different?
is it enough just to make an update via apt
No.
or the procedure to get the isue-62 branch is different?
Yes. Please do the following
/usr/bin/wsdd
(based on your systemctl output)Ok I will test it and let you know.
So it looks like now it works even after restart, so from my point of view this bug is fixed ;-) Thanks.
Thanks to you for testing. Pushed the fixes into the master branch an released a new version (together with other fixes).
Hi,
today I found that WSDD service throws error at startup. This is what I get when I run following command:
systemctl status wsdd
and result is:
Oct 10 20:59:45 raspberrypi wsdd[664]: super().init(mch.listen_address, RequestHandlerClass) Oct 10 20:59:45 raspberrypi wsdd[664]: File "/usr/lib/python3.7/socketserver.py", line 452, in init Oct 10 20:59:45 raspberrypi wsdd[664]: self.server_bind() Oct 10 20:59:45 raspberrypi wsdd[664]: File "/usr/bin/wsdd", line 805, in server_bind Oct 10 20:59:45 raspberrypi wsdd[664]: super().server_bind() Oct 10 20:59:45 raspberrypi wsdd[664]: File "/usr/lib/python3.7/http/server.py", line 137, in server_bind Oct 10 20:59:45 raspberrypi wsdd[664]: socketserver.TCPServer.server_bind(self) Oct 10 20:59:45 raspberrypi wsdd[664]: File "/usr/lib/python3.7/socketserver.py", line 466, in server_bind Oct 10 20:59:45 raspberrypi wsdd[664]: self.socket.bind(self.server_address) Oct 10 20:59:45 raspberrypi wsdd[664]: socket.gaierror: [Errno -9] Address family for hostname not supported
I has a latest version of WSDD and I run it on Raspberry Pi 3B+ and Buster.