puma / puma-dev

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

`DNS Server failed: listen tcp 127.0.0.1:9253: bind: address already in use` error when starting the app with `puma-dev` command #334

Open oleksandr-danylchenko opened 1 year ago

oleksandr-danylchenko commented 1 year ago

I have the ~/.puma-dev folder config where one of the entries points to the folder with the app. So it automatically starts on ports :80 and :443 under webtexts.localhost domain:

image

I also want to run the puma-dev explicitly from the linked webtexts folder using the puma-dev --http-port 3333 --https-port 4444 command. I hope will allow me to access the underlying application from the mobile device via localhost:3333.

Unfortunately, on the command execution, I get such an error:

2023/03/16 12:23:54 Existing valid puma-dev CA keypair found. Assuming previously trusted.
* Directory for apps: /Users/oleksandr_danylchenko/.puma-dev
* Domains: test
* DNS Server port: 9253
* HTTP Server port: 3333
* HTTPS Server port: 4444
! Puma dev running...
! DNS Server failed: listen tcp 127.0.0.1:9253: bind: address already in use

Even after I ran the puma-dev -stop and tried the command above - I got the same error. Here's the output of the lsof -i :9253 right after the puma-dev -stop: image

Is it safe to kill the process running on the :9253? Can it be mitigated in a more "civilized" way?


P.S. I'm running the app on MacOS 13.2.1

oleksandr-danylchenko commented 1 year ago

Moreover, even after killing the processes on 9253, the puma-dev revives immediately image

ozgurtezel-kitmanlabs commented 1 month ago

Is there a solution for this issue? I run into the same problem on MacOS 14.6

oleksandr-danylchenko commented 1 month ago

Is there a solution for this issue?

IIRC, rebooting the Mac mitigates the issue for some time. But it can randomly reappear 🤷🏻‍♂️