Skip to content
This repository has been archived by the owner on May 15, 2020. It is now read-only.

.dev domains are not working in OS 10.9 Mavericks dev preview GM #415

Closed
glebe opened this issue Oct 25, 2013 · 12 comments
Closed

.dev domains are not working in OS 10.9 Mavericks dev preview GM #415

glebe opened this issue Oct 25, 2013 · 12 comments

Comments

@glebe
Copy link

glebe commented Oct 25, 2013

All my .dev domains are not working now, however localhost:20559 says "pow is installed".

myapp.dev symlink is created in ~/.pow

Here is the config:
$ ./pow --print-config
POW_BIN='/Users/gleb/Library/Application Support/Pow/Versions/0.4.1/bin/pow'
POW_DST_PORT='80'
POW_HTTP_PORT='20559'
POW_DNS_PORT='20560'
POW_TIMEOUT='900'
POW_WORKERS='2'
POW_DOMAINS='dev'
POW_EXT_DOMAINS=''
POW_HOST_ROOT='/Users/gleb/Library/Application Support/Pow/Hosts'
POW_LOG_ROOT='/Users/gleb/Library/Logs/Pow'
POW_RVM_PATH='/Users/gleb/.rvm/scripts/rvm'

Here's my traceback of a request route

$ dns-sd -G v4 myapp.dev
DATE: ---Fri 25 Oct 2013---
23:45:54.334 ...STARTING...
Timestamp A/R Flags if Hostname Address TTL
23:45:54.353 Add 2 0 myapp.dev. 127.0.0.1 752

$ scutil --dns
...
resolver #9
domain : dev
nameserver[0] : 127.0.0.1
port : 20560
flags : Request A records, Request AAAA records
reach : Reachable,Local Address

$ lsof -i | grep 20560
node 1140 gleb 13u IPv4 0x9988a42a9b6ffbab 0t0 UDP *:20560

$ sudo ipfw list
Password:
00100 fwd 127.0.0.1,20559 tcp from any to me dst-port 80 in
65535 allow ip from any to any

$ lsof -i | grep 20559
node 1140 gleb 12u IPv4 0x9988a42aa0fd47c3 0t0 TCP *:20559 (LISTEN)

$ curl myapp.dev
curl: (7) Failed connect to media.dev:80; Connection refused

Tried reinstalling, it does not help and fails on the step where checking of dev domains goes.

Can anyone help or give some fresh ideas on what could cause that?

@glebe
Copy link
Author

glebe commented Oct 25, 2013

Problem solved!

Apparently fw was disabled and I had to set

sysctl -w net.inet.ip.fw.enable=1
to enable port forwarding

Don't know if that's an issue with developer preview or some other software but this should be kept in mind while setting up pow.

This thread helped:
#172 (comment)

@guidobouman
Copy link

This is already part of the cx.pow.firewall.plist template. Should have been installed like that.

@joachimVdH
Copy link

sudo sysctl -w net.inet.ip.fw.enable=1

helped me to get pow working on mavericks.

I tried reinstalling but got following message :

*** Reloading system network configuration...
!!! Couldn't resolve configured domains (dev)

For troubleshooting instructions, please see the Pow wiki:
https://github.com/37signals/pow/wiki/Troubleshooting

since the sysctl it works fine.
Thanks

@joachimVdH
Copy link

Except you have to run the command after every reboot

@RLovelett
Copy link

sysctl -w net.inet.ip.fw.enable=1 worked for me too

@linjunpop
Copy link

The sysctl -w net.inet.ip.fw.enable=1 worked for me.

@paradox460
Copy link

@joachimVdH https://discussions.apple.com/message/13220705#13220705

Basically you need to create a launchd task that runs this every boot. Not ideal, but it works ¯_(ツ)_/¯


Nevermind, the default launchd task created by the installer is supposed to do this, but doesn't do it properly (relative path to su). See my pull request

@glebe
Copy link
Author

glebe commented Jan 16, 2014

@paradox460, another permanent solution is to add this line to /etc/sysctl.conf so that fw enables on boot.

@paradox460
Copy link

Unfortunately, OS X has a history of ignoring and overwriting that file.
There are several StackOverflow questions about that. I tried it and found
it to be non permanent.

I'm mobile right now, so I can't link to the individual questions, but if
you want to see them I'll put them in a follow up comment

@gtmtech
Copy link

gtmtech commented Oct 30, 2014

Do you have an /etc/resolver/dev file ?

@glebe
Copy link
Author

glebe commented Nov 5, 2014

@gtmtech yes i have it, the problem is not in resolver but in firewall blocked by default with the update

@gtmtech
Copy link

gtmtech commented Nov 5, 2014

Fair enough, just thought I'd post that the contents of this file is why OSX resolves .dev domains differently to everything else - removing this fixed most of my issues with all .dev problems everywhere, might be useful to people on this thread, but not sure!

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

No branches or pull requests

7 participants