Skip to content

[Bug]: system start reports success when the DNS server can't bind 127.0.0.1:2053 #2519

Open

Description

@resker

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

  1. Hold the port with any other process, e.g. python3 -c 'import socket,time; s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM); s.bind(("127.0.0.1", 2053)); time.sleep(600)' &
  2. container system stop && container system start
  3. container system status
  4. container run -d --name dnsprobe docker.io/library/alpine:3 sleep 300, then dig +short @127.0.0.1 -p 2053 dnsprobe.test
                    port free        port held
system start        exit 0           exit 0
system status       running          running
dig dnsprobe.test   192.168.64.2     connection timed out

Problem description

If something else already holds 127.0.0.1:2053, the DNS server for container names can't start, but nothing tells you. system start succeeds, system status says running, and container names just stop resolving. The only trace is one log line that doesn't say what failed:

container-apiserver: [com.apple.container:APIServer] API server task failed: bind(descriptor:ptr:bytes:): Address already in use) (errno: 48)

One way to hit this is a second macOS user running container on the same Mac, since the port is fixed. The original report in #1693 shows two users and port 2053 held by the other one, so it may be this.

From the code, the localhost resolver on 1053 fails the same way (not tested).

I'd expect system start to fail, or at least system status to show DNS isn't running, with the log naming the DNS server and port.

Environment

- OS: macOS 27.3
- Xcode: 27.0
- Container: main (c05a5604)

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions