DNS resolver not starting (?) when started via launchd
madrobby opened this issue · comments
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
Hm, I'll take a look. Maybe the launchd socket stuff isn't working right...
@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.
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.
Is there anything else in that log file? Or anything else listening on port 80 or 443 of your system?
@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.
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?
@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
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.
Don't think this is a bug, but a machine-specific configuration issue.