puma / puma-dev

A tool to manage rack apps in development with puma
BSD 3-Clause "New" or "Revised" License
1.74k stars 107 forks source link

puma-dev DNS stops responding on MacOS 15.0 #345

Open mreinsch opened 1 month ago

mreinsch commented 1 month ago

I'm seeing quite odd behaviour with puma-dev on MacOS 15.0. The symptoms are that after some time the browser can't resolve my .test domains anymore and returns an error.

After digging a bit, I can reproduce this now using dig @127.0.0.1 -p 9253 service.test. which contacts puma-dev's DNS directly. For the first two requests I was getting a good response, something like:

; <<>> DiG 9.10.6 <<>> @127.0.0.1 -p 9253 service.test.
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48314
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;service.test.      IN  A

;; ANSWER SECTION:
service.test.   0   IN  A   127.0.0.1

;; Query time: 0 msec
;; SERVER: 127.0.0.1#9253(127.0.0.1)
;; WHEN: Fri Sep 20 15:58:51 CEST 2024
;; MSG SIZE  rcvd: 66

But then on the third try I'm getting after some delay:

; <<>> DiG 9.10.6 <<>> @127.0.0.1 -p 9253 service.test.
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

I can reproduce this by killing puma-dev and running dig three times.

There isn't anything in the logs, I only see three times the following in the MacOS console app:

kernel  puma-dev:79089 accept() error 35: non-blocking  empty queue

On an older computer still running MacOS 13 all seems to be working fine. Also didn't have any issues with puma-dev before the update to MacOS 15.

dentarg commented 1 month ago

You're not the only one: https://obdev.at/blog/should-i-upgrade-to-macos-sequoia-now/

mreinsch commented 1 month ago

Thanks, I can confirm that disabling the MacOS firewall resolves this issue.

So probably nothing puma-dev can do here, but hopefully this will help others.

tur-wtag commented 1 month ago

If disabling the MacOS firewall is not an option then adding static entries in /private/etc/hosts can be another workaround.