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

Couldn't resolve configured domains #172

Closed
harith opened this issue Jun 23, 2011 · 61 comments
Closed

Couldn't resolve configured domains #172

harith opened this issue Jun 23, 2011 · 61 comments

Comments

@harith
Copy link

harith commented Jun 23, 2011

I get the following when install pow. What am I doing wrong?

$ curl get.pow.cx | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6813  100  6813    0     0   5153      0  0:00:01  0:00:01 --:--:--  7429
**\* Installing Pow 0.3.1...
**\* Installing local configuration files...
/Users/harith/Library/Application Support/Pow/Current/bin/pow:6: warning: Insecure world writable dir /usr/local in PATH, mode 040777
/Users/harith/Library/Application Support/Pow/Current/bin/pow:6: warning: Insecure world writable dir /usr/local in PATH, mode 040777
**\* Starting the Pow server...
**\* Performing self-test...
**\* 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

To uninstall Pow, `curl get.pow.cx/uninstall.sh | sh`
@elight
Copy link

elight commented Jul 26, 2011

Same issue here. Troubleshooting steps didn't lead me to a resolution.

Didn't have the /usr/local/ issues. Just:

!!! Couldn't resolve configured domains (dev)

@zachinglis
Copy link

Installing from node package manager fixed this problem for me :)

@campbell
Copy link

Same issue, haven't tried using NPM.

@synapticarbors
Copy link

Same issue using OS X 10.7.1 from the install script (haven't tried using NPM):

*** Installing Pow 0.3.2...
*** Installing local configuration files...
/Users/lev/Library/LaunchAgents/cx.pow.powd.plist
*** Installing system configuration files as root...
/Library/LaunchDaemons/cx.pow.firewall.plist
*** Starting the Pow server...
*** Performing self-test...
*** 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

@cobyism
Copy link

cobyism commented Aug 18, 2011

Ditto here on 10.7.1. Output:

cobychapple at shiva in ~/.pow
➜ curl get.pow.cx | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6795  100  6795    0     0   4005      0  0:00:01  0:00:01 --:--:--  9977
*** Installing Pow 0.3.2...
*** Installing local configuration files...
/Users/cobychapple/Library/LaunchAgents/cx.pow.powd.plist
*** Starting the Pow server...
*** Performing self-test...
*** 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

To uninstall Pow, `curl get.pow.cx/uninstall.sh | sh`

However, I can access my pow applications on port 20559 (i.e. http://myapp.dev:20559), so I can handle that just fine. Would be nice to not have to type the port # though.

In case it helps, I tried changing my MAMP server to run on port 80 to test whether there was any problem setting something up on that port (I usually run it on port 8888, as per their default), which I was able to do just fine, so it seems as though nothing else is hogging port 80. When I change MAMP back to 8888, and then uninstall + reinstall pow, I am faced with the same "Couldn't resolve configured domains (dev)" message.

@lantins
Copy link

lantins commented Aug 22, 2011

Same issue here with v0.3.2 of Pow on OS X 10.6.6

Oddly though it does work, most of the time.

@cobyism
Copy link

cobyism commented Aug 24, 2011

I've found a quick work-around for my setup. Even though I wasn't running OSX's built-in version of apache before, I followed these instructions, and I now have the built-in apache install forwarding all *.dev requests to Pow on port 20559.

I'm sure there's more than one thing that could cause this issue though, so YMMV.

@lazyatom
Copy link

I'm also seeing this issue (https://gist.github.com/1211551)

@ptufts
Copy link

ptufts commented Sep 12, 2011

Seeing this on OS X 10.7.1 Lion, fresh install via 'curl get.pow.cx|sh'

@jrichard
Copy link

10.7.1 same sad story

@alduro
Copy link

alduro commented Sep 14, 2011

if you want to debug shell script install add -x after sh

curl get.pow.cx | sh -x

@codyrobbins
Copy link

I’m having the same problem on OS X Lion Server 10.7.1. To provide some more information: running scutil --dns shows the resolver in place for the .dev domain; and sudo ipfw list shows the 65534 fwd 127.0.0.1,20559 tcp from any to me dst-port 80 in rule. Accessing neither http://localhost nor an app domain receives any response.

@alduro
Copy link

alduro commented Sep 20, 2011

back to rails s unfortunately

@masukomi
Copy link

Same problem - Lion 10.7.1

@cobyism
Copy link

cobyism commented Sep 27, 2011

Out of interest, how many of you guys experiencing this issue have installed OS X Lion Server (as opposed to those who have never had the Lion Server app installed)? I have a sneaking suspicion it may have something to do with the issue.

@lazyatom
Copy link

I've never installed Server.

On 27 Sep 2011, at 02:04, Coby Chapple wrote:

Out of interest, how many of you guys experiencing this issue have installed OS X Lion Server (as opposed to those who have never had the Lion Server app installed)? I have a sneaking suspicion it may have something to do with the issue.

Reply to this email directly or view it on GitHub:
#172 (comment)

@masukomi
Copy link

I never installed OS X Lion Server

@stan
Copy link

stan commented Oct 14, 2011

Same issue, Lion 10.7.1 Server

@epipheus
Copy link

definitely an issue on Lion server

@rfunduk
Copy link

rfunduk commented Oct 19, 2011

Not only Lion Server, a fresh install of Pow on regular Lion 10.7.2 behaves like this log.

I dug into it a bit and it looks like the stuff that goes on in installer.coffee never happens; and obviously without the files destined for LaunchDaemons/etc... well, Bob is not your uncle.

Lion changed a lot related to ~/Library, so, maybe some kind of permissions problem...? I'm hoping to get Lion running in a virtual machine soon and attempting to do some poking at the pow install process to try and get it working.

@codyrobbins
Copy link

I’m not seeing @rfunduk’s problem where the launch daemons aren’t being set up—perhaps there’s two things going on here? I’m only seeing the same issue as @cobychapple whereby requests to http://localhost and http://*.dev don’t resolve, but you can access http://localhost:20559 and http://*.dev:20559 directly—which indicates that Pow is at least up and running.

@rfunduk
Copy link

rfunduk commented Oct 19, 2011

@codyrobbins, you are able to uninstall (and verify all the bits are gone) and reinstall pow on 10.7.2? Nothing at all works for me, not localhost, not *.dev and not localhost:20559. From the gist, the biggest problem is pretty obviously the node.js error:

*** Installing system configuration files as root...

node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
execvp(): No such file or directory

After that, on future 'reinstalls', none of the domains resolve, so it may be that I'm actually seeing an unrelated issue. There are several tickets about this general "doesn't work at all" problem (such as #107 and #226).

@cobyism
Copy link

cobyism commented Oct 19, 2011

I don't recall ever seeing a node.js error like @rfunduk as part of this "Couldn't resolve configured domains" problem. What about other people? This might be a separate issue, as I definitely wouldn't call this a "doesn't work at all" problem—I'm using Pow right now (through the workaround with Apache I linked to above).

@codyrobbins
Copy link

@rfunduk—Yeah, I don’t get that error when installing on 10.7.2. For me the domains just don’t resolve to the Rack app without explicitly including the port Pow uses in the URL.

@rfunduk
Copy link

rfunduk commented Oct 19, 2011

@codyrobbins, that's unfortunate since this laptop is practically brand new (~2 weeks) with a fresh Lion install on it and it outright fails to install for me... :(

@cobychapple, the fact that it fails to install (possibly only for me, and the people in #107, I suppose) means it doesn't work at all IMO :) I feel like getting apache involved means I might as well just install passenger and skip pow altogether.

Stopping here so as not to fully hijack this issue with the install explosion problem. Anyone with access want to reopen #107?

@cobyism
Copy link

cobyism commented Oct 19, 2011

Pow failing to install and finding that it doesn't work at all for you seems to be a different issue than the one people are reporting in this issue thread, so I'd imagine the node exception issue (#107) will probably be a better place to discuss your issue (as that's what you're experiencing, unless I've misunderstood).

As for Apache/Passenger, use whatever works. A five command workaround that lets me keep the convenience of Pow is all I need.

@skull-squadron
Copy link

10.7.2 with Server, all webservers stopped and disabled.

http://[appname].dev:20559/ works great.

Might be a nice refinement if pow simply indicated it's running on an alternate port because of [program].

Update 1: Determined the issue is not the node server, which runs perfectly. The issue seems to be related to the firewall rule that does the magic forwarding from 20559 => 80.

Update 2: I've opened a feature request with one of the pow wrappers, powder, to ask for support of nonstandard ports specified in ~/.powconfig.

@epipheus
Copy link

epipheus commented Nov 2, 2011

+1 on this.

Sent from my mobile device.

Michael K. Madison II.
Managing Director
Cocoon Ventures
http://www.cocoonventures.com

On Nov 2, 2011, at 9:20 AM, Barry Allard
reply@reply.github.com
wrote:

10.7.2 with Server, all webservers stopped and disabled.

http://.dev:20559/ works great. Would be a nice refinement if pow simply indicated it's running on an alternate port because of .

Reply to this email directly or view it on GitHub:
#172 (comment)

@ivanoats
Copy link

ivanoats commented Nov 7, 2011

does anyone have a resolution to this yet? still getting this error.

@skull-squadron
Copy link

Still broken.

@michaek
Copy link

michaek commented Feb 9, 2012

I run into this error consistently, but only when I set POW_DOMAINS to something other than "dev".

@michaek
Copy link

michaek commented Feb 10, 2012

I don't think my error is relevant to this issue - I resolved it by copying the dev resolver in /etc/resolver for my other TLDs.

@aeonstructure
Copy link

I have OS X 10.7.3 Server and the only way I can get to Pow hosted applications is to use port 20559. The ipfw rule is not getting added. I tried the Apache suggestion from above and that doesn't appear to work either. I have a OS X 10.7.3 laptop that everything works great on.

Here is the output from 'ipfw show' on the 10.7.3 Server:
01000 0 0 allow ip from any to any via lo0
01010 0 0 deny ip from any to 127.0.0.0/8
01020 0 0 deny ip from 224.0.0.0/4 to any in
01030 0 0 deny tcp from any to 224.0.0.0/4 in
12300 0 0 allow tcp from any to any established
12301 0 0 allow tcp from any to any out
12302 0 0 allow tcp from any to any dst-port 22
12302 0 0 allow udp from any to any dst-port 22
12303 0 0 allow udp from any to any dst-port 68
12304 0 0 allow udp from any to any out keep-state
12305 0 0 allow tcp from any to any dst-port 53 out keep-state
12305 0 0 allow udp from any to any dst-port 53 out keep-state
12306 0 0 allow udp from any to any in frag
12307 0 0 allow tcp from any to any dst-port 311
12308 0 0 allow tcp from any to any dst-port 625
12309 0 0 allow icmp from any to any icmptypes 8
12310 0 0 allow icmp from any to any icmptypes 0
12311 0 0 allow igmp from any to any
12312 0 0 allow esp from any to any
65534 0 0 deny ip from any to any
65535 0 0 allow ip from any to any

That is right after a reboot and logging in.

@mikebulaj
Copy link

I fixed this by editing /Library/LaunchDaemons/cx.pow.firewall.plist and changing the firewall rule

ipfw add fwd 127.0.0.1,20559 tcp from any to me dst-port 80 in

to

ipfw add 1 fwd 127.0.0.1,20559 tcp from any to me dst-port 80 in

Then reload the rules

sudo launchctl load -Fw /Library/LaunchDaemons/cx.pow.firewall.plist

You may also want to delete the old rule, which was number 01104 for me.

sudo ipfw delete 01104

@codyrobbins
Copy link

The above fix by @altovideo doesn’t resolve the issue for me. I should note that as of Pow 0.3.2 I no longer get the original error when installing. However, Pow still doesn’t work without explicitly using port 20559.

@edwinmoss
Copy link

altovideo, Thanks! That worked.

I was following https://github.com/37signals/pow/wiki/Running-Pow-with-Apache and both solutions failed.

Finally, For the Impatient worked with the help of altovideo

I didn't know how to delete the old rule. I am not familiar enough with ipfw.

@vrinek
Copy link

vrinek commented Apr 5, 2012

Had the same error on Lion 10.7.3 but got over it with the solution of altovideo

@cobyism
Copy link

cobyism commented May 3, 2012

After a few months, tonight I decided to uninstall/reinstall Pow and it installed without issues. No idea why this problem presented three months ago and doesn't now—it's not as if Pow's version changed at all.

The bad news: now my apps won't start at all any more because I'm running into an issue that could be either #147 or #278 (except I'm using rbenv, not RVM like the people in those threads).

😢

@cemeng
Copy link

cemeng commented May 8, 2012

Had same issue this morning when suddenly my rails app was not accessible. Reading @altovideo solution, I worked out that the forwarding rule from port 80 to 20559 just simply not there (not sure why this is the case since I didn't restart anything).

Checking it by issuing:
sudo ipfw list

It only listed: 65535 allow ip from any to any

Then running:sudo launchctl load -Fw /Library/LaunchDaemons/cx.pow.firewall.plist fixed it for me, no need to edit the firewall rule at all.

Running the ipfw list, now I can see the port 80 to 20559 forward rule is there.

@skippy
Copy link

skippy commented Jun 9, 2012

@sstephenson this was still broken for me, as of today, on a clean 10.7.4 system. @altovideo fix worked perfectly for me!

the ipfw went from

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

to (after sudo ipfw delete 00100)

$ sudo ipfw show
00100     153      16279 fwd 127.0.0.1,20559 tcp from any to me dst-port 80 in
65535 3326404 2910955132 allow ip from any to any

@espen
Copy link

espen commented Jun 11, 2012

sudo ipfw delete 00100 and a reboot fixed this issue for me. Got the error after disabling Apache and reinstalling Pow.

@buerogeschwister
Copy link

Did @altovideo 's fix work for anyone using Lion Server 10.7.4 and pow 0.4.0? Tried it with no luck at all. Pow is running but port forwarding doesn't seem to work. Using apache proxy didn't work either so I completely disabled httpd using launchctl.

ipfw rule after pow installation:

01000 0 0 allow ip from any to any via lo0
01010 0 0 deny ip from any to 127.0.0.0/8
01020 0 0 deny ip from 224.0.0.0/4 to any in
01030 0 0 deny tcp from any to 224.0.0.0/4 in
12300 0 0 allow tcp from any to any established
12301 0 0 allow tcp from any to any out
12302 0 0 allow tcp from any to any dst-port 22
12302 0 0 allow udp from any to any dst-port 22
12303 0 0 allow udp from any to any dst-port 68
12304 0 0 allow udp from any to any out keep-state
12305 0 0 allow tcp from any to any dst-port 53 out keep-state
12305 0 0 allow udp from any to any dst-port 53 out keep-state
12306 0 0 allow udp from any to any in frag
12307 0 0 allow tcp from any to any dst-port 311
12308 0 0 allow tcp from any to any dst-port 625
12309 0 0 allow icmp from any to any icmptypes 8
12310 0 0 allow icmp from any to any icmptypes 0
12311 0 0 allow igmp from any to any
65534 0 0 deny ip from any to any
65534 0 0 fwd 127.0.0.1,20559 tcp from any to me dst-port 80 in
65535 0 0 allow ip from any to any

after @altovideo fix:

00001 0 0 fwd 127.0.0.1,20559 tcp from any to me dst-port 80 in
01000 0 0 allow ip from any to any via lo0
01010 0 0 deny ip from any to 127.0.0.0/8
01020 0 0 deny ip from 224.0.0.0/4 to any in
01030 0 0 deny tcp from any to 224.0.0.0/4 in
12300 0 0 allow tcp from any to any established
12301 0 0 allow tcp from any to any out
12302 0 0 allow tcp from any to any dst-port 22
12302 0 0 allow udp from any to any dst-port 22
12303 0 0 allow udp from any to any dst-port 68
12304 0 0 allow udp from any to any out keep-state
12305 0 0 allow tcp from any to any dst-port 53 out keep-state
12305 0 0 allow udp from any to any dst-port 53 out keep-state
12306 0 0 allow udp from any to any in frag
12307 0 0 allow tcp from any to any dst-port 311
12308 0 0 allow tcp from any to any dst-port 625
12309 0 0 allow icmp from any to any icmptypes 8
12310 0 0 allow icmp from any to any icmptypes 0
12311 0 0 allow igmp from any to any
65535 0 0 allow ip from any to any

MBP running 10.7.4 non-server worked fine from the start.

@mrichman
Copy link

mrichman commented Jul 4, 2012

Same issue, Lion 10.7.4 Server. Back to Thin. Sorry guys.

@cernyjakub
Copy link

Hi Guys, this was driving me nuts, because I also have Lion Server (because I wanted to get quad-core Mac Mini...) So I spend a half-day chasing for this crazy issue.

Here are my final notes:

On Lion server, there are basically 2 issues:

  1. There are some default rules in ipfw chain present, one of them being: "12300 allow ip from any to any" in my case. Pow forward rule is added after this, and so it is never reached. To fix: specify rule order in /Library/LaunchDaemons/cx.pow.firewall.plist (by adding 1 into it) just like altovideo recommends. So the working rule is: ipfw add 1 fwd 127.0.0.1,20559 tcp from any to me dst-port 80 in
  2. But there is one more! On Lion server, it is not enough to set net.inet.ip.forwarding=1 to actually enable it. I had to also set net.inet.ip.fw.enable=1 - then, the forwarding begun! Again, this should be added as an easy patch to cx.pow.firewall.plist. On normal Lion this seems to be the default, so setting it for all users should be harmless.

Let me know if this helps!

@codyrobbins
Copy link

Finally! The changes suggested by @kupinus above do indeed fix the problem for me on Lion Server 10.7.4.

@cernyjakub
Copy link

There is one remaining issue. On Lion Server, the ipfw rules are flushed periodically, probably by some daemon. I am now experimenting with adding the rule right into Server Admin GUI. As far as I know, this tool modifies the files in /etc/ipfilter. So I expect if we put the forward rule there, it might be loaded by the daemon..

I would happily disable this 'server' daemon, but I have read reports that it might block login, etc. So it would be better to not touch it and just add the forward rule to some "server friendly" location....

Does anyone know what is the correct way to programmatically add ipfw rules in Lion Server, so that it survives more than 2 hours?

@cernyjakub
Copy link

So it is working by adding the ipfw command line to /etc/ipfilter/ipfw.conf. I don't know what is the correct way to manipulate this file at pow setup phase. Maybe a quick & dirty sed invocation would work.

Probably the clean way would be to call serveradmin tool. But its syntax is very complex and maybe it is not installed by default! I was installing Server Admin.app as a separate download...

Also, I noticed (by reading /etc/rc.server), that probably the cleanest way of enabling IP forwarding is by touching /etc/ipfilter/ipfwstate-on. The code in /etc/rc.server is this:

if [ -f /etc/ipfilter/ipfwstate-on ]; then
    sysctl -w net.inet.ip.fw.enable=1
else
    sysctl -w net.inet.ip.fw.enable=0
fi

But because we need to stay compatible with standard Lion, probably the best way is to keep forwarding init where it is now.

Only the ipwf rule needs to go to /etc/ipfilter. But on normal Lion /etc/ipfilter is not present. So to ma it bullet-proof, we will need to check for existence of /etc/ipfilter and append ipfw params into ipfw.conf if it is present...

Having a strong Linux background, I am more and more surprised, how messy the OS X internals are :)

@jwechsler
Copy link

@kupinus is correct, above, but also know that it's still crazy because under Mountain Lion, the ipfw rules are flushed by, er, something that I couldn't find. You can see evidence of the rule flush in the console log. Therefore, here's what I do (and perhaps what pow will need to do):

sysctl -w net.inet.ip.forwarding=1
touch /etc/ipfilter/ipfwstate-on
echo "add 100 fwd 127.0.0.1,20559 tcp from any to me dst-port 80 in" >> /etc/ipfilter/ipfw.conf

/etc/ipfilter/ipfw.conf is where the admin for the box is supposed to put custom rules. Adding them in a launchdaemon works, but only until this random rule flush/recreate process happens. You could probably just write the ip.fw.enable directly on install to get it going, but it will get reset on restart by rc.server unless you add the rule the ipfw.conf

I've successfully gotten this to work on three Mountain Lion machines that were struggling.

@samanthamjohn
Copy link

After installing Xcode5 developer preview on my mac pow stopped working.
I uninstalled and attempted to reinstall pow but am getting this issue. I'm running Mountain Lion 10.8.4 but another computer running Lion is having the same problem.

@thekeith
Copy link

I was about to make a long post about how I could not get Pow to work, but then found a simple one that others may not know is a solution (if using Chrome):

  1. Navigate to chrome://flags
  2. Set "Built-in Asynchronous DNS Mac, Windows, Linux, Chrome OS" to "Disable"
  3. Restart Chrome

@DougPuchalski
Copy link

+1

@pratik60
Copy link

I was getting this too !!! Couldn't resolve configured domains (dev) on Sierra

and on inspecting curl http://app.dev/ --verbose

*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connection failed
* connect to 127.0.0.1 port 80 failed: Connection refused
* Failed to connect to app.dev port 80: Connection refused
* Closing connection 0
curl: (7) Failed to connect to app.dev port 80: Connection refused

, turned out the fix for me was indicated by the following

Verify this work sudo pfctl -f /etc/pf.conf

I was getting an error like this: pfctl: Syntax error in config file: pf rules not loaded

The default file contains a bunch of comments followed by

scrub-anchor "com.apple/*"
nat-anchor "com.apple/*"
rdr-anchor "com.apple/*"
dummynet-anchor "com.apple/*"
anchor "com.apple/*"
load anchor "com.apple" from "/etc/pf.anchors/com.apple"

Some other app, had pushed this in pass in proto tcp from any to any port 80 but not deleted it. After deleting it, ran sudo pfctl -f /etc/pf.conf followed by sudo pfctl -e and boom, everything started working.

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

Successfully merging a pull request may close this issue.