puma-dev icon indicating copy to clipboard operation
puma-dev copied to clipboard

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

Open oleksandr-danylchenko opened this issue 2 years ago • 3 comments

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 avatar Mar 16 '23 10:03 oleksandr-danylchenko

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

oleksandr-danylchenko avatar Mar 16 '23 10:03 oleksandr-danylchenko

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

ozgurtezel-kitmanlabs avatar Aug 07 '24 07:08 ozgurtezel-kitmanlabs

Is there a solution for this issue?

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

oleksandr-danylchenko avatar Aug 07 '24 10:08 oleksandr-danylchenko