basecamp / pow

Zero-configuration Rack server for Mac OS X
http://pow.cx/
MIT License
3.41k stars 261 forks source link

Couldn't resolve configured domains #172

Closed harith closed 12 years ago

harith commented 13 years ago

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 commented 13 years ago

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 commented 13 years ago

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

campbell commented 13 years ago

Same issue, haven't tried using NPM.

synapticarbors commented 13 years ago

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 commented 13 years ago

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 commented 13 years ago

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 commented 13 years ago

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 commented 13 years ago

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

ptufts commented 13 years ago

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

jrichard commented 13 years ago

10.7.1 same sad story

alduro commented 13 years ago

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

curl get.pow.cx | sh -x

codyrobbins commented 13 years ago

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 commented 13 years ago

back to rails s unfortunately

masukomi commented 13 years ago

Same problem - Lion 10.7.1

cobyism commented 13 years ago

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 commented 13 years ago

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: https://github.com/37signals/pow/issues/172#issuecomment-2205998

masukomi commented 13 years ago

I never installed OS X Lion Server

stan commented 13 years ago

Same issue, Lion 10.7.1 Server

epipheus commented 13 years ago

definitely an issue on Lion server

rfunduk commented 13 years ago

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 commented 13 years ago

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 commented 13 years ago

@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 commented 13 years ago

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 commented 13 years ago

@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 commented 13 years ago

@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 commented 13 years ago

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 commented 12 years ago

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 commented 12 years ago

+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: https://github.com/37signals/pow/issues/172#issuecomment-2605569

ivanoats commented 12 years ago

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

skull-squadron commented 12 years ago

Still broken.

elliterate commented 12 years ago

This started happening to me and a coworker on a previously working machine running OS X 10.7.2.

We were able to narrow down the cause to our creation of the file /etc/launchd.conf (to address an issue with RubyMine). We were using it to set our $PATH environment variable, but we had apparently given it a bad value (some missing/unnecessary directories). Although it fixed RubyMine, it had inadvertently broken Pow. We were able to tweak it until we found a $PATH that worked for both.

codyrobbins commented 12 years ago

I don’t even have an /etc/launchd.conf on my machine, though, so while that might cause the problem I think it must not be the only cause?

ivanoats commented 12 years ago

yeah i don't have an /etc/launchd.conf either

cobyism commented 12 years ago

@elliterate Are you able to share your $PATH that worked for you? I'd like to compare with mine and see if there's anything I might have missed.

constantine-nikolaou commented 12 years ago

Same here (OS X Lion). Any plans for a fix?

lazyatom commented 12 years ago

I think this is really a bug in Lion when it was installed as an upgrade, rather than a bug in pow, alas.

hojberg commented 12 years ago

No, I am experiencing this in snow leopard

epipheus commented 12 years ago

I bought a brand new Lion server and have the issue so this is not an upgrade issue.

Sent from my mobile device

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

480 Cowper Street, Suite 300, Palo Alto, CA 94301

On Jan 17, 2012, at 7:27 AM, James Adam reply@reply.github.com wrote:

I think this is really a bug in Lion when it was installed as an upgrade, rather than a bug in pow, alas.


Reply to this email directly or view it on GitHub: https://github.com/37signals/pow/issues/172#issuecomment-3529463

cobyism commented 12 years ago

When I originally came across this issue back in August, I thought it must be because of some configuration conflict with something else I was running. Over the weekend however, my macbook died, so I've literally just bought a new MBP and I thought this would be an excellent opportunity to see if I could get finally get Pow working on my new setup without the Apache config workaround I'd been using on the old laptop.

Alas, even on a brand-spanking-new vanilla macbook I get the same error:

$ 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   3632      0  0:00:01  0:00:01 --:--:-- 10734
*** Installing Pow 0.3.2...
*** Installing local configuration files...
*** Installing system configuration files as root...
Password:
/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

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

So it's not just me and some obscure conflict on my box—it would appear that something else is going on.

I'm going to have a real go at hunting down the cause of this, but I'll be the first to admit I don't know that much about the internals of Pow's interface with OSX. If anyone has any pointers for places to look, your suggestions will be welcome.

michaek commented 12 years ago

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

michaek commented 12 years ago

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 commented 12 years ago

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 commented 12 years ago

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 commented 12 years ago

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 commented 12 years ago

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 commented 12 years ago

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

cobyism commented 12 years ago

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).

:cry:

cemeng commented 12 years ago

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 commented 12 years ago

@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 commented 12 years ago

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