-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
M1 Mac address already in use port 53 by mDnsResponder #7008
Comments
I encounter the same problem with version 4.24.0 on macos sonoma and a M1 chip. As soon as I start docker lsof shows the following:
Going back to version 4.23.0 solves the problem and can be used as a workaround. |
Same issue on Intel chip. |
Same issue on M1. Rolling back to 4.23.0 resolves the issue. |
That same issue on M1 and MacOS Sonoma. Downgrade to Docker 4.23.0 works correctly. |
Can you try this workaround?
|
@bsousaa For me that workaround works correctly. |
Yes, that does resolve the issue on 4.24 for me. |
Workaround works for me. Note workaround is now doc'd at https://docs.docker.com/desktop/release-notes/#4240 "known issues / for mac" |
Same issue with Docker 4.24.0 (122432) on Intel MBP running Monterey 12.6.9 (21G726). The suggested harry@Harrys-MacBook-Pro: ~$ sudo lsof -i :53 # with docker stopped
harry@Harrys-MacBook-Pro: ~$ sudo lsof -i :53 # with docker running
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mDNSRespo 314 _mdnsresponder 40u IPv4 0xb56646544beaa53d 0t0 UDP *:domain
mDNSRespo 314 _mdnsresponder 60u IPv6 0xb56646544beaa84d 0t0 UDP *:domain
mDNSRespo 314 _mdnsresponder 62u IPv4 0xb56646544df55115 0t0 TCP *:domain (LISTEN)
mDNSRespo 314 _mdnsresponder 67u IPv6 0xb56646544bd9490d 0t0 TCP *:domain (LISTEN)
harry@Harrys-MacBook-Pro: ~$ code ~/Library/Group\ Containers/group.com.docker/settings.json # workaround applied
harry@Harrys-MacBook-Pro: ~$ sudo lsof -i :53 # after restarting docker
harry@Harrys-MacBook-Pro: ~$ |
@bsousaa Is this considered a bug that will be fixed in a future version of Docker For Mac? Thanks 🙏 |
Workaround worked for me as well. Thanks! |
@alexlo03 yes it is considered a bug with a documented workaround. We will post news as soon as we can. |
Try to deactivate network acceleration by adding "kernelForUDP": false, in the settings.json file located at ~/Library/Group Containers/group.com.docker/settings.json This solve the issue on my mac. |
Thanks this actually solved my problem as well ! |
Adding my experience here hoping to add some additional element of thought to the conversation. My Also, by reading the mDNSResponder description here it looks like it should be listening to UDP:5353 so it feels like it's something else that is forcing to TCP:53 for some of you. |
I just started experiencing this after updating Docker Desktop to 4.24.2 (124339) @bsousaa's workaround fixed the issue for me. |
Little update, I'm running Docker Desktop to 4.24.2 (124339) on two different Mac one is an M1 Pro and the other is and M2 Pro. Both have mDNSRespo 664 _mdnsresponder 6u IPv4 0xca551a3476c9e4ed 0t0 UDP *:5353
mDNSRespo 664 _mdnsresponder 7u IPv6 0xca551a3476cbf0ed 0t0 UDP *:5353
mDNSRespo 664 _mdnsresponder 53u IPv4 0xca551a3476e1cced 0t0 UDP *:53
mDNSRespo 664 _mdnsresponder 59u IPv6 0xca551a3476e1d0ed 0t0 UDP *:53
mDNSRespo 664 _mdnsresponder 62u IPv4 0xca551a347312e36d 0t0 TCP *:53 (LISTEN)
mDNSRespo 664 _mdnsresponder 63u IPv6 0xca551a3e0fdf482d 0t0 TCP *:53 (LISTEN) And I don't see the port conflict error. |
The workaround does NOT solve the issue for me. I have tried 4.24.x and 4.25 and neither works with |
The kernelforUDP workaround doesn't work for me either with 4.25.1 |
@holyoaks @bmelton-mdsol next time you see this issue could you upload a diagnostics and quote the ID here? I installed a fresh download of build 4.25.1 (128006), edited my settings.json and started DD. I have nothing listening on port 53:
and my Linux VM doesn't have the vmnet.framework eth1 (it's the activation of the vmnet.framework or Internet connection sharing which causes mDNSresponder to allocate port 53):
When I set |
@adrianliegmann thanks so much have been tearing my hair out on this for so long. |
I've stopped using Docker for development, AFAIK this has been resolved, though some people still seem to have the issue. |
Before running your docker command, run this command in the terminal like this
|
There was a regression in 4.27.2 and this is once again a problem. |
Seems to work as expected for me on my M2 Mac having the "Use kernel networking for UDP" option under "Resources -> Network" deactivated. I updated from 4.26 to 4.27.2 without issues so far. |
Same for me, no DNS issues with 4.27.2 with "Use kernel networking for UDP" disabled. |
Confirmed fixed for me with 4.28.0 (Intel Mac). I still had the issue with 4.27.2, even though "Use kernel networking for UDP" was disabled. |
Still an issue on macOS 14.6.1 with 4.33.0 and with 4.34.0 |
As I am using Docker to run PiHole which needs TCP/UDP port 53 and decent support for UDP (not using kernel networking for UDP has annoying issues, some (LAN) DNS requests time out) I was hoping for a programmable workaround. I remember reading that there is a particular Docker terminal command to toggle "Use kernel networking for UDP" but I can not find it documented anywhere. The only way I know now to get PiHole running reliably after a system- or Docker reboot is this particular way: Create your Docker Container using "--restart=no" to prevent it from starting automatically. And after every reboot:
This is Docker 4.34.2 running under macOS 14.7 on a M1 Mac mini. 20241120 EDIT: Beware that using this trick will flush all custom pf firewall rules one might have set. |
This is still an Issue for my environment using an Intel Macbook:
With docker started:
And kernelForUDP set to false:
I still have this error when using port 53 for dnsmasq for example:
As soon as I quit Docker Desktop the port 53 isn't used any more. |
In the end I gave up, I wasn't able to get my virtual Pi-hole to run reliably using Docker on my M1 Mac. I have now switched to running my virtual Pi-hole using a faceless Debian 12 VM with Pi-hole using VirtualBox 7.1.4 and a custom LaunchAgent and using its own local IP address. Stable, auto-start after reboot and logging in, and using less memory. |
I am facing same issue (Error response from daemon: Ports are not available: exposing port UDP 127.0.0.1:53 -> 0.0.0.0:0: command failed)- System with intel chip and MacOS - sequoia 15.2.
docker desktop version -4.37.2 Client: Server: Docker Desktop 4.37.2 (179585) Docker Compose version v2.31.0-desktop.2 |
Description
I'm encountering this issue again, on MacOS Sonoma after the latest Docker Desktop update and restarting MacOS.
#5335
Macbook Air M1
MacOS 14.0 (23A344)
Docker Desktop 4.24.0 (122432)
Reproduce
docker run -p 53:53 -it --rm alpine ash
Expected behavior
No response
docker version
Client: Cloud integration: v1.0.35+desktop.5 Version: 24.0.6 API version: 1.43 Go version: go1.20.7 Git commit: ed223bc Built: Mon Sep 4 12:28:49 2023 OS/Arch: darwin/arm64 Context: desktop-linux Server: Docker Desktop 4.24.0 (122432) Engine: Version: dev API version: 1.44 (minimum version 1.12) Go version: go1.20.8 Git commit: HEAD Built: Tue Sep 26 11:52:32 2023 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.6.22 GitCommit: 8165feabfdfe38c65b599c4993d227328c231fca runc: Version: 1.1.8 GitCommit: v1.1.8-0-g82f18fe docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Diagnostics ID
7ABA3113-529E-442E-9D86-EE5D06BCD06A/20231003015243
Additional Info
Re-installing the previous version 4.23.0 does resolve the issue for me.
The text was updated successfully, but these errors were encountered: