Hi. I have docker on my MacBook air 15 M2 and inside I have a container with DNS. For this container, I need port 53 for TCP and UDP. After the update, I can't run this container anymore. Looks like some system demon of macOS use this port and does not allow other application to use it.. How to fix it?
Accepted Reply
Hi - there is a workaround documented for this in the latest Docker release notes, which I found after updating to the latest Docker. I'm on an M2-Mac and changing the property in docker settings worked immediately. Note that although it says to 'add' the config line in the release notes, the config line is already there, and in my case I just had to change the property from true to false and it worked.
Known Issues: For Mac
Creating a container with the port 53 fails with the error address already in use. As a workaround, deactivate network acceleration by adding
"kernelForUDP": false,
in the settings.json file located at ~/Library/Group Containers/group.com.docker/settings.json_
Source: https:// docs.docker.com/desktop/release-notes/#known-issues (apple won't let me post the actual link... take out the spaces and you can navigate there)
-
Thanks. It also works for me. You make my day!))
Replies
Looks like some system demon of macOS use this port
That’s not my experience. Consider this:
% sw_vers
ProductName: macOS
ProductVersion: 14.0
BuildVersion: 23A339
% sudo nc -u -l 53
I can then message it using:
% nc -u 127.0.0.1 53
Can you reproduce this with nc
? If so, what does lsof
report?
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
alex@alex ~ % sw_vers
ProductName: macOS
ProductVersion: 14.0
BuildVersion: 23A344
For UDP looks like it can send and receive messages. But if I try TCP mode:
alex@alex ~ % sudo nc -l 53
nc: Address already in use
lsof report for port 53:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mDNSRespo 209 _mdnsresponder 54u IPv6 0x374deabe82ef1a55 0t0 UDP *:domain
mDNSRespo 209 _mdnsresponder 55u IPv4 0x374deacce7bb82ad 0t0 TCP *:domain (LISTEN)
mDNSRespo 209 _mdnsresponder 56u IPv6 0x374deabe73abbd95 0t0 TCP *:domain (LISTEN)
Interesting. That’s not what I’m seeing on my macOS 14 machine:
% sudo lsof | grep '*.domain'
%
And nc
works as well:
% nc -l 53
^C
Something has caused mDNSResponder
to listen on port 53 and I’m not sure what. Do you have Internet Sharing enabled?
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Internet sharing disabled. I took a few extra tests. So looks like if I switch off docker - port 53 is free. So the problem is related to Docker. I shure that other containers not using this port. I found information about a simular issue here: https://github.com/docker/for-mac/issues/5335
People propose to turn off Virtualization Framework feature - but for me it didn't help. Tommorow will try other solutions. If you have ideas what can help pls share them here.
I have the same problem on macos 13.6 on Intel macbook pro. Is it possible to make port 53 available on macos?
-
I tried it with my MacBook 15 2018. First I updated docker for the last version. Tried on Mac os Ventura - everything is ok. After that, I updated Mac OS to Sonoma and immediately got this problem. And the worst problem is that now I can't roll back Mac OS to Ventura. It just shows me an error((( I spent 5 hours yesterday. Now both machine is blocking my work with this problem((
I tried it with my MacBook 15 2018. First I updated docker for the last version. Tried on Mac os Ventura - everything is ok. After that, I updated Mac OS to Sonoma and immediately got this problem. And the worst problem is that now I can't roll back Mac OS to Ventura. It just shows me an error((( I spent 5 hours yesterday. Now both machine (macbook pro 15 2018 and macbook air 15 M2) are on Mac OS Sonoma and is blocking my work with this problem((
when I try to rollback on macbook air 15 m2 it shows me message like this (and something simular with macbook pro 15 2018):
Hi - there is a workaround documented for this in the latest Docker release notes, which I found after updating to the latest Docker. I'm on an M2-Mac and changing the property in docker settings worked immediately. Note that although it says to 'add' the config line in the release notes, the config line is already there, and in my case I just had to change the property from true to false and it worked.
Known Issues: For Mac
Creating a container with the port 53 fails with the error address already in use. As a workaround, deactivate network acceleration by adding
"kernelForUDP": false,
in the settings.json file located at ~/Library/Group Containers/group.com.docker/settings.json_
Source: https:// docs.docker.com/desktop/release-notes/#known-issues (apple won't let me post the actual link... take out the spaces and you can navigate there)
-
Thanks. It also works for me. You make my day!))
Thanks for helping out here.
Regrading this:
apple won't let me post the actual link
I’m able to post the link just fine:
https://docs.docker.com/desktop/release-notes/#known-issues
You just have to do it in the clear, per tip 14 in Quinn’s Top Ten DevForums Tips.
Did that not work for you?
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Thanks @eskimo , I'm new to the forum and didn't realize that was the proper format. I appreciate the tip! In any case, I hope the fix works for everyone as it did for me!