-
Notifications
You must be signed in to change notification settings - Fork 71
Description
This ticket is informational after I spent a few hours diagnosing my issue. I setup a Samba share and it was working great in macOS, but when navigating to "Network" on Windows, I'd see the Samba server listed, but trying to click into it would hang and eventually error. Checking Event Viewer under Applications and Services > Microsoft > Windows > SMBClient > Connectivity showed that it was attempting to connect to IPv6 link-local addresses and/or the wrong IPv4 address.
This makes sense because we are using network_mode: host and I have a number of other Docker networks on this host:
docker-media# docker exec -ti samba-samba-1 sh
/ # ip a | grep 192.168
inet 192.168.123.60/24 scope global defined1
inet 192.168.80.1/20 brd 192.168.95.255 scope global br-ed42c3f0d321
inet 192.168.96.1/20 brd 192.168.111.255 scope global br-6bf8cc62cb18
inet 192.168.32.1/20 brd 192.168.47.255 scope global br-91d96ca18c67
inet 192.168.68.35/22 brd 192.168.71.255 scope global dynamic eth0
inet 192.168.144.1/20 brd 192.168.159.255 scope global br-3b412949022f
inet 192.168.160.1/20 brd 192.168.175.255 scope global br-8281b46a5d05
inet 192.168.128.1/20 brd 192.168.143.255 scope global br-cd5c259ea12a
inet 192.168.48.1/20 brd 192.168.63.255 scope global br-b3d26bdd58e3
inet 192.168.16.1/20 brd 192.168.31.255 scope global br-c7bd15f100d8
inet 192.168.0.1/20 brd 192.168.15.255 scope global br-d1d6ae490f28
inet 192.168.176.1/20 brd 192.168.191.255 scope global br-348ceb049673
I was able to solve the issue by adding the following env var:
WSDD2_PARAMETERS: "-i eth0 -4"
This tells wsdd2 to listen on the eth0 interface for IPv4 traffic only.
This is essentially the same thing for Windows as AVAHI_INTERFACES: eth0 but for wsdd2.