Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS resolver not starting (?) when started via launchd #169

Closed
madrobby opened this issue Aug 21, 2018 · 9 comments
Closed

DNS resolver not starting (?) when started via launchd #169

madrobby opened this issue Aug 21, 2018 · 9 comments

Comments

@madrobby
Copy link

I'm on 10.13.6 & puma-dev v0.12 from homebrew.

I keep getting this error in my ~/Library/Logs/puma-dev.log. I've tried removing and reinstalling several times according to the instructions, no luck.

* Directory for apps: /var/root/.puma-dev
* Domains: test
* DNS Server port: 9253
* HTTP Server port: inherited from launchd
* HTTPS Server port: inherited from launchd
! Puma dev listening on http and https
2018/08/21 12:19:10 Error listening: accept tcp 0.0.0.0:0: accept: invalid argument

When I start puma-dev manually, it works fine:

* Directory for apps: /Users/thomasfuchs/.puma-dev
* Domains: test
* DNS Server port: 9253
* HTTP Server port: 9280
* HTTPS Server port: 9283
! Puma dev listening on http and https
@evanphx
Copy link
Member

evanphx commented Aug 21, 2018

Hm, I'll take a look. Maybe the launchd socket stuff isn't working right...

@madrobby
Copy link
Author

@evanphx LMK if there's any other logfiles etc. you want. This is literally on a freshly set up stock MacBook Pro, which I got new yesterday.

@evanphx
Copy link
Member

evanphx commented Aug 23, 2018

Hm, so that's an issue not on DNS but on the http listeners, which makes more sense. I'm thinking something did change with launchd, i'm looking into it now.

@evanphx
Copy link
Member

evanphx commented Aug 23, 2018

Is there anything else in that log file? Or anything else listening on port 80 or 443 of your system?

@madrobby
Copy link
Author

madrobby commented Aug 23, 2018

@evanphx No, it's the DNS server not staring. It does start when I start it manually.

$ sudo lsof -PiTCP -sTCP:LISTEN | grep "launchd"
COMMAND     PID        USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
launchd       1        root    7u  IPv4 0xb906b7465f2e3c77      0t0  TCP *:80 (LISTEN)
launchd       1        root   16u  IPv4 0xb906b746707cb9b7      0t0  TCP *:443 (LISTEN)
$ telnet localhost 9253
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
Trying ::1...
telnet: connect to address ::1: Connection refused
telnet: Unable to connect to remote host

I'll double check if anything else is trying to start up on 80/443. When I do a curl to 80/443 it connects but just hangs.

@evanphx
Copy link
Member

evanphx commented Aug 24, 2018

Ah! That's great info. I'll keep looking down the DNS train. Is there anything else in /etc/resolvers except for the puma-dev bits?

@madrobby
Copy link
Author

@evanphx Just the test file from puma-dev:

# Generated by puma-dev
nameserver 127.0.0.1
port 9253
-rw-r--r--  1 thomasfuchs  staff  55 Aug 23 14:41 /etc/resolver/test

@amitsaxena
Copy link

In case it helps someone who is having a similar error message in log - I also switched from pow to puma-dev which failed to start. Restarting my mac machine seems to have fixed it (for some reason). May be the port was in use or something similar.

@nonrational
Copy link
Member

Don't think this is a bug, but a machine-specific configuration issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants