runner-images icon indicating copy to clipboard operation
runner-images copied to clipboard

MacOS: mDNSResponder is turned off during CI and it's failing to make requests to localhost

Open damusix opened this issue 10 months ago • 1 comments

Description

See https://github.com/hapijs/hapi/actions/runs/8545413008

This issue is replicable on a local mac that doesn't have any sharing features enabled (file sharing, screen sharing, display mirroring, etc; anything that enables mdnsresponder). I have been able to successfully replicate the issue on my M2 on the latest MacOS version (14)

See https://discussions.apple.com/thread/7707202?sortBy=best for reference

This doesn't allow any tests that use the ifconfig given network for running a local server. For example, I tried opening a server using the node builtinhttp and the library @hapi/hapi and was unable to access any routes via browser or curl to local DNS.

It seems this is a functioning workaround: https://github.com/actions/runner-images/issues/9346#issuecomment-1957461928 but it seems silly to have to patch what should be an inherent feature of an OS.

Platforms affected

  • [ ] Azure DevOps
  • [X] GitHub Actions - Standard Runners
  • [ ] GitHub Actions - Larger Runners

Runner images affected

  • [ ] Ubuntu 20.04
  • [ ] Ubuntu 22.04
  • [ ] macOS 11
  • [ ] macOS 12
  • [ ] macOS 13
  • [ ] macOS 13 Arm64
  • [X] macOS 14
  • [X] macOS 14 Arm64
  • [ ] Windows Server 2019
  • [ ] Windows Server 2022

Image version and build link

See https://github.com/hapijs/hapi/actions/runs/8545413008

Is it regression?

works in macos-11 (see https://github.com/hapijs/.github/commit/6c1069a71572334379e643c6cb6242b6916cc83e)

Expected behavior

to be able to bind programs to $(hostname -f) and $(hostname -s)

Actual behavior

requests never resolve

Repro steps

Run @hapijs/hapi tests in mac-latest

damusix avatar Apr 03 '24 22:04 damusix

Hello @damusix. Thanks for the report, we will take a look

shamil-mubarakshin avatar Apr 04 '24 09:04 shamil-mubarakshin

Hello @damusix, we understand that the problem exists, however if you run sudo launchctl list com.apple.mDNSResponder.reloaded you will see that mDNSResponder service is up and running. We will continue to investigate the issue, please check progress on the #8649 issue.

Duplicate of #8649

Alexey-Ayupov avatar Apr 05 '24 11:04 Alexey-Ayupov