Closed anohren closed 4 years ago
SO_REUSEPORT
was stubbed, but it isn't immediately obvious to me whether stubbing SO_REUSEPORT
would address the problem. Windows already has a service listening on 5353. You fired up another service on the same port under WSL, but that doesn't mean the WSL service is going to get the request. Maybe someone out there could confirm they have actually got avahi-daemon
running satisfactorily, because #384 technically only says the Protocol not available
error was squashed, not that avahi-daemon
actually does what people are expecting.Or I could be talking out of my butt. Haven't tried it. But essentially you've set up (in principle) a load-balanced mDNS with two services on your box, and that tilts my head to the left. YRMV.
Ok, I see. I was led to believe that these lines from #384 was an indication that avahi was doing something useful:
:~# avahi-resolve-address 192.168.0.52
192.168.0.52 xxxxx.corp.microsoft.com
To be clear, I don't specifically know that it isn't doing something useful. I just did a netstat.exe -na | find "5353"
and know Windows is already there; which is "unusual" compared to what would be the case on a Real Linux box. My November post was fishing for someone to say "yep avahi-daemon is working great on WSL here", in which case we could wander down the path of figuring out why it is working for them but not you. It was more of a question than a statement.
If you are feeling motivated you can try posting a concise CLI repro from clean Ubuntu / unadulterated Windows and see if you get a bite.
Thanks for the clarification
please see https://github.com/Microsoft/WSL/issues/384 for a concise CLI repro from WSL and native Ubuntu.
I see #384 has been closed but this is still a problem for me. I don't mind how mDNS gets resolved in WSL, I just care that it should.
Here are ground-up repro steps to make the problem clear:
bunty
. 🐧sudo apt install avahi-daemon
sudo systemctl start avahi-daemon.service
ping bunty.local
avahi-browse -a
to get a list of all the local mDNS info. It should contain bunty
somewhere. ping bunty.local
ping bunty.local
Expected: it should be able to resolve the name like everything else on the network ✨ Actual: it has no clue 😢
Even worse: once WSL resolved my rpi.local address to a random internet server address. I was SSH-ing into it and I even got a prompt for my user password...
Bottom line, I accidentally sent my password to a random machine.
@anohren I had that too, but it turned out I had my work VPN up at the time and it was finding a raspberrypi.local
on the office LAN. Any chance you were doing something similar?
Do you mean you had vpn set up in WSL, or in windows?
I don't have any vpn set up though so I doubt it.
@anohren Windows VPN, no idea what crazy network config they had but it was making their .local addresses resolvable over regular DNS. I was just throwing that out there because there's no way a .local address should be resolvable over the public internet.
This is still an issue on Windows 1903.
+1! System ping
in cmd.exe
resolves correctly, but in WSL either with System error
(when some unsupported resolver is used in /etc/nsswitch.conf; hosts
) or just not being able to resolve.
Still not working in Version 10.0.17763 Build 17763
not working on winver 19041.1
Wrote how to use powershell.exe. It is not cool, but worked. I pray for COOL improvements. https://github.com/microsoft/WSL/issues/384#issuecomment-571566111
Ref #3365 avahi-daemon
is better on WSL2
Hello Guys, I am running the below command on my one of the board having custom linux OS , avahi-daemon --file=/system/etc/avahi/avahi-daemon.conf& the avahi-daemon started on my board and I am able to ping the Host Name on one of the windows PC available with me , using commnad ping Ingenic.local The only issue is i am not able to see the host name on bonjour application(add-on) running on Internet Explorer. what is missing?
Well, the m in mDNS is multicast... And I noticed there's comment in WSL2 docs about mirrored networking mode allowing multicast to work. Maybe that's what you want? https://learn.microsoft.com/en-us/windows/wsl/networking#mirrored-mode-networking ; I didn't really check if it is, but I was searching why a zeroconf name wasn't working for a host on a WSL2 instance, and this old closed issue came up and later I found that mirrored mode addressed my issue, so I thought there may be others reading this with a similar situation.
I can't figure out how to do it. I can't ssh into my .local address because it can't resolve the name.
I also have this unanswered question on Superuser: https://superuser.com/q/1262998/36197
I've followed the last example in this thread:
https://github.com/Microsoft/WSL/issues/384
In other words:
This was done after installing the packages listed in this answer.
rpi.local
can be resolved by Windows.Windows 10 Version 10.0.16299 build 16299
~$ lsb_release -a