This repository has been archived by the owner. It is now read-only.

Pow doesn't launch, doesn't write logs, does nothing #100

Closed
endymion opened this Issue Apr 13, 2011 · 25 comments

Comments

Projects
None yet
8 participants
@endymion

endymion commented Apr 13, 2011

I installed Pow on a 10.6.6 i7 iMac that I use every day for Ruby/Rails development. According to Lunchy, the Pow daemon is running. According to the Activity Monitor, there is no "pow" process as indicated in the documentation. There are no log files in ~/Library/Logs/Pow. There is not even a folder ~/Library/Logs/Pow. I linked a Rack app into ~/.pow but I have no indication that anything is running. http://my-app.dev does not respond.

How can I troubleshoot from here to figure out why it isn't running? The installation was uneventful:

[~] curl get.pow.cx | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2722  100  2722    0     0   3975      0 --:--:-- --:--:-- --:--:-- 12316
*** Installing Pow 0.2.2...
*** Installing local configuration files...
/Users/rap/Library/LaunchAgents/cx.pow.powd.plist
*** Installing system configuration files as root...
Password:
/etc/resolver/dev
/Library/LaunchDaemons/cx.pow.firewall.plist
*** Starting the Pow server...
*** Installed

Beyond that installation, I have no indication that Pow is even attempting to do anything. Is there a way to get more feedback from the Pow daemon as it attempts to start?

@Nerian

This comment has been minimized.

Show comment
Hide comment
@Nerian

Nerian Apr 13, 2011

Same situation here. There is no Pow process running. No error messages. I followed the screencast, including running resque, but nothing happens.

And there is no pow binary in the path. Is it the same situation as you @endymion?

I use HomeBrew and Zsh. I used to have Nginx and Passenger, but I removed them before installing Pow.

Nerian commented Apr 13, 2011

Same situation here. There is no Pow process running. No error messages. I followed the screencast, including running resque, but nothing happens.

And there is no pow binary in the path. Is it the same situation as you @endymion?

I use HomeBrew and Zsh. I used to have Nginx and Passenger, but I removed them before installing Pow.

@jeremy

This comment has been minimized.

Show comment
Hide comment
@jeremy

jeremy Apr 13, 2011

Member

Same as #44?

Member

jeremy commented Apr 13, 2011

Same as #44?

@Nerian

This comment has been minimized.

Show comment
Hide comment
@Nerian

Nerian Apr 13, 2011

Ok, After doing

launchctl load -Fw ~/Library/LaunchAgents/cx.pow.powd.plist

and

chmod 644 ~/Library/LaunchAgents/cx.pow.powd.plist
curl get.pow.cx | sh
*** Installing Pow 0.2.2...
*** Installing local configuration files...
*** Starting the Pow server...
*** Installed

It works like a charm :)

Nerian commented Apr 13, 2011

Ok, After doing

launchctl load -Fw ~/Library/LaunchAgents/cx.pow.powd.plist

and

chmod 644 ~/Library/LaunchAgents/cx.pow.powd.plist
curl get.pow.cx | sh
*** Installing Pow 0.2.2...
*** Installing local configuration files...
*** Starting the Pow server...
*** Installed

It works like a charm :)

@jeremy jeremy closed this Apr 13, 2011

@endymion endymion reopened this Apr 14, 2011

@endymion

This comment has been minimized.

Show comment
Hide comment
@endymion

endymion Apr 14, 2011

Thanks, Nerian. Didn't work for me though.

The problem with this is that there is no way to troubleshoot it. Pow is apparently supposed to work like magic but if it doesn't then how can I determine what went wrong? There is no feedback of any kind from the launch so I can't tell why Pow presumably crashed on startup.

Is there a way to manually start Pow so that I can see why it's failing to start?

[~] launchctl load -Fw ~/Library/LaunchAgents/cx.pow.powd.plist
cx.pow.powd: Already loaded
%                                                                                                   
[~] 
[~] chmod 644 ~/Library/LaunchAgents/cx.pow.powd.plist
[~] curl get.pow.cx | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2722  100  2722    0     0   3253      0 --:--:-- --:--:-- --:--:-- 11294
*** Installing Pow 0.2.2...
*** Installing local configuration files...
*** Starting the Pow server...
*** Installed
[~] 

endymion commented Apr 14, 2011

Thanks, Nerian. Didn't work for me though.

The problem with this is that there is no way to troubleshoot it. Pow is apparently supposed to work like magic but if it doesn't then how can I determine what went wrong? There is no feedback of any kind from the launch so I can't tell why Pow presumably crashed on startup.

Is there a way to manually start Pow so that I can see why it's failing to start?

[~] launchctl load -Fw ~/Library/LaunchAgents/cx.pow.powd.plist
cx.pow.powd: Already loaded
%                                                                                                   
[~] 
[~] chmod 644 ~/Library/LaunchAgents/cx.pow.powd.plist
[~] curl get.pow.cx | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2722  100  2722    0     0   3253      0 --:--:-- --:--:-- --:--:-- 11294
*** Installing Pow 0.2.2...
*** Installing local configuration files...
*** Starting the Pow server...
*** Installed
[~] 
@Arcath

This comment has been minimized.

Show comment
Hide comment
@Arcath

Arcath Apr 15, 2011

I followed Nerains solution and it worked fine until I restarted, then I had to re run

launchctl load -Fw ~/Library/LaunchAgents/cx.pow.powd.plist

and it worked fine after that.

Arcath commented Apr 15, 2011

I followed Nerains solution and it worked fine until I restarted, then I had to re run

launchctl load -Fw ~/Library/LaunchAgents/cx.pow.powd.plist

and it worked fine after that.

@JonKernPA

This comment has been minimized.

Show comment
Hide comment
@JonKernPA

JonKernPA Apr 16, 2011

Such a shame this isn't working on first go. Pow looks like such cool magic. Alas, not for hacker newbs like me I guess.

I did get farther along doing nerian's suggestion. At least now I get:
Cannot GET /
for every project I try to add :-\

JonKernPA commented Apr 16, 2011

Such a shame this isn't working on first go. Pow looks like such cool magic. Alas, not for hacker newbs like me I guess.

I did get farther along doing nerian's suggestion. At least now I get:
Cannot GET /
for every project I try to add :-\

@endymion

This comment has been minimized.

Show comment
Hide comment
@endymion

endymion Apr 18, 2011

You see those messages in ~/Library/Logs/Pow? I don't even have that folder. As far as I can tell it isn't running at all.

[~] ls ~/Library/Logs/Pow 
ls: /Users/rap/Library/Logs/Pow: No such file or directory

endymion commented Apr 18, 2011

You see those messages in ~/Library/Logs/Pow? I don't even have that folder. As far as I can tell it isn't running at all.

[~] ls ~/Library/Logs/Pow 
ls: /Users/rap/Library/Logs/Pow: No such file or directory
@Nerian

This comment has been minimized.

Show comment
Hide comment
@Nerian

Nerian Apr 18, 2011

What does your sudo ipfw list returns?

It should return this line:

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

Nerian commented Apr 18, 2011

What does your sudo ipfw list returns?

It should return this line:

00100 fwd 127.0.0.1,20559 tcp from any to me dst-port 80 in
@JonKernPA

This comment has been minimized.

Show comment
Hide comment
@JonKernPA

JonKernPA Apr 18, 2011

I re-installed to try it again, and I had just created a fresh dummy Rails3 app to test against.
After spinning for a while, it get nothing.
So I did your "trick" above, and it WORKED.

However, it does not work for any of my existing Rails2 apps.

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

JonKernPA commented Apr 18, 2011

I re-installed to try it again, and I had just created a fresh dummy Rails3 app to test against.
After spinning for a while, it get nothing.
So I did your "trick" above, and it WORKED.

However, it does not work for any of my existing Rails2 apps.

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

@JonKernPA

This comment has been minimized.

Show comment
Hide comment
@JonKernPA

JonKernPA Apr 18, 2011

@endymion, yes, after following nerian's instructions (which includes a re-install of pow) I do see the folder:

jon$ ls ~/Library/Logs/Pow/ 
access.log

JonKernPA commented Apr 18, 2011

@endymion, yes, after following nerian's instructions (which includes a re-install of pow) I do see the folder:

jon$ ls ~/Library/Logs/Pow/ 
access.log
@JonKernPA

This comment has been minimized.

Show comment
Hide comment
@JonKernPA

JonKernPA Apr 18, 2011

oddly enough, IIRC, i got your error when i didn't have the symlink quite right. Once I got the symlink correct, then I got the seeming route not found error.

I believe that you should symlink to one directory above the "script" directory. Which is typically what you get when you create a rails app. That is:

railsprojects
    first_app
        app
        ...
        script

gets symlinked as follows:

ln -s ~/railsprojects/first_app jkfirstapp

Or click here to see it visually

JonKernPA commented Apr 18, 2011

oddly enough, IIRC, i got your error when i didn't have the symlink quite right. Once I got the symlink correct, then I got the seeming route not found error.

I believe that you should symlink to one directory above the "script" directory. Which is typically what you get when you create a rails app. That is:

railsprojects
    first_app
        app
        ...
        script

gets symlinked as follows:

ln -s ~/railsprojects/first_app jkfirstapp

Or click here to see it visually

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Apr 18, 2011

I am also seeing this issue. the workaround doesn't work. lanchctl gives 'Already loaded.' localhost does show the 'no app configured' error, though. No ~/Library/Logs/Pow/ though.

If there's anything else that I can do to help figure out wtf is going on here, I'll do it.

steveklabnik commented Apr 18, 2011

I am also seeing this issue. the workaround doesn't work. lanchctl gives 'Already loaded.' localhost does show the 'no app configured' error, though. No ~/Library/Logs/Pow/ though.

If there's anything else that I can do to help figure out wtf is going on here, I'll do it.

@sstephenson

This comment has been minimized.

Show comment
Hide comment
@sstephenson

sstephenson Apr 18, 2011

Contributor

Folks, you shouldn't be hitting http://localhost/ with Pow. Please have a look at the manual to see how Pow virtual hosts work. The name of the symlink is the name of the domain (sans .dev) that you use to access the app.

Contributor

sstephenson commented Apr 18, 2011

Folks, you shouldn't be hitting http://localhost/ with Pow. Please have a look at the manual to see how Pow virtual hosts work. The name of the symlink is the name of the domain (sans .dev) that you use to access the app.

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Apr 18, 2011

To be clear, when I hit myapp.dev, it just shows nothing, but when I hit
localhost, it gives the 'no app configured,' as it should.

Just verifying at what stage the problem is, it does install and run
correctly, it's something in the resolution that's fubar'd

steveklabnik commented Apr 18, 2011

To be clear, when I hit myapp.dev, it just shows nothing, but when I hit
localhost, it gives the 'no app configured,' as it should.

Just verifying at what stage the problem is, it does install and run
correctly, it's something in the resolution that's fubar'd

@sstephenson

This comment has been minimized.

Show comment
Hide comment
@sstephenson

sstephenson Apr 18, 2011

Contributor

It sounds like you may be running into issue #21.

Contributor

sstephenson commented Apr 18, 2011

It sounds like you may be running into issue #21.

@endymion

This comment has been minimized.

Show comment
Hide comment
@endymion

endymion Apr 18, 2011

Yes, I also did not use "localhost". I'm almost certain that Pow has never run in the first place because I don't see it in my Activity Monitor and I don't have a log folder. It seems obvious enough that Pow is failing to start when the daemon launches, but I have no way to troubleshoot to find out why.

Is there a way to manually launch Pow so that I can look for some kind of error message? I've got an ecosystem of many apps built around a central app with a REST API and Pow seems like it could be very useful, but it works by "magic" and when magic doesn't work there aren't many options. How do I run it manually, not as a daemon?

endymion commented Apr 18, 2011

Yes, I also did not use "localhost". I'm almost certain that Pow has never run in the first place because I don't see it in my Activity Monitor and I don't have a log folder. It seems obvious enough that Pow is failing to start when the daemon launches, but I have no way to troubleshoot to find out why.

Is there a way to manually launch Pow so that I can look for some kind of error message? I've got an ecosystem of many apps built around a central app with a REST API and Pow seems like it could be very useful, but it works by "magic" and when magic doesn't work there aren't many options. How do I run it manually, not as a daemon?

@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Apr 18, 2011

@sstephenson Ahh, I will check that, thank you.

steveklabnik commented Apr 18, 2011

@sstephenson Ahh, I will check that, thank you.

@JonKernPA

This comment has been minimized.

Show comment
Hide comment
@JonKernPA

JonKernPA Apr 18, 2011

So it seems that my error is in getting my Rails2 apps to have a working config.ru in the base directory.

See #12

Not being a rackup expert, I looked to here

Might be nice if the Pow manual describes that

Pow is awesomely great for Rails3 because config.ru is automatically created. However, for Rails2 you may need to create:

require "./config/environment"
use Rails::Rack::LogTailer
use Rails::Rack::Static
run ActionController::Dispatcher.new

JonKernPA commented Apr 18, 2011

So it seems that my error is in getting my Rails2 apps to have a working config.ru in the base directory.

See #12

Not being a rackup expert, I looked to here

Might be nice if the Pow manual describes that

Pow is awesomely great for Rails3 because config.ru is automatically created. However, for Rails2 you may need to create:

require "./config/environment"
use Rails::Rack::LogTailer
use Rails::Rack::Static
run ActionController::Dispatcher.new
@steveklabnik

This comment has been minimized.

Show comment
Hide comment
@steveklabnik

steveklabnik Apr 18, 2011

@sstephenson running

sudo touch /etc/resolver/dev

Did the trick for me, thanks!

Now for some reason, my app is throwing some kind of error on boot, but I don't think it's pow related. It does work with rackup though...

steveklabnik commented Apr 18, 2011

@sstephenson running

sudo touch /etc/resolver/dev

Did the trick for me, thanks!

Now for some reason, my app is throwing some kind of error on boot, but I don't think it's pow related. It does work with rackup though...

@JonKernPA

This comment has been minimized.

Show comment
Hide comment
@JonKernPA

JonKernPA Apr 19, 2011

I wrote up a blog post aggregating the common solutions that worked for me: Is it okay to post here?

http://technicaldebt.com/?p=811

JonKernPA commented Apr 19, 2011

I wrote up a blog post aggregating the common solutions that worked for me: Is it okay to post here?

http://technicaldebt.com/?p=811

@endymion

This comment has been minimized.

Show comment
Hide comment
@endymion

endymion Apr 19, 2011

Can anybody tell me how to run Pow manually to look for startup errors? Pow is not even attempting to run on my system. I have no way to troubleshoot it because it works by "magic". If the magic doesn't work then how can I troubleshoot to find out what went wrong? There is no "pow" process running at all.

endymion commented Apr 19, 2011

Can anybody tell me how to run Pow manually to look for startup errors? Pow is not even attempting to run on my system. I have no way to troubleshoot it because it works by "magic". If the magic doesn't work then how can I troubleshoot to find out what went wrong? There is no "pow" process running at all.

@Nerian

This comment has been minimized.

Show comment
Hide comment
@Nerian

Nerian Apr 19, 2011

@endymion

cd ~/Library/Application Support/Pow/Versions/0.2.2/bin/pow
./pow

Look for the output.

Nerian commented Apr 19, 2011

@endymion

cd ~/Library/Application Support/Pow/Versions/0.2.2/bin/pow
./pow

Look for the output.

@JonKernPA

This comment has been minimized.

Show comment
Hide comment
@JonKernPA

JonKernPA Apr 19, 2011

for example, my installation is working and this is what I did:

cd ~/Library/Application\ Support/Pow/Current/bin
jonsmac2-2:bin jon$ ./pow

Results in:

node.js:134
    throw e; // process.nextTick error, or 'error' event on first tick
    ^
Error: EADDRINUSE, Address already in use
at HttpServer._doListen (net.js:1089:5)
at net.js:1060:14
at Object.lookup (dns.js:159:5)
at HttpServer.listen (net.js:1054:20)
at Array.<anonymous> (/Users/jon/Library/Application Support/Pow/Versions/0.2.2/lib/daemon.js:34:27)
at EventEmitter._tickCallback (node.js:126:26)

JonKernPA commented Apr 19, 2011

for example, my installation is working and this is what I did:

cd ~/Library/Application\ Support/Pow/Current/bin
jonsmac2-2:bin jon$ ./pow

Results in:

node.js:134
    throw e; // process.nextTick error, or 'error' event on first tick
    ^
Error: EADDRINUSE, Address already in use
at HttpServer._doListen (net.js:1089:5)
at net.js:1060:14
at Object.lookup (dns.js:159:5)
at HttpServer.listen (net.js:1054:20)
at Array.<anonymous> (/Users/jon/Library/Application Support/Pow/Versions/0.2.2/lib/daemon.js:34:27)
at EventEmitter._tickCallback (node.js:126:26)
@JonKernPA

This comment has been minimized.

Show comment
Hide comment
@JonKernPA

JonKernPA Apr 19, 2011

@endymion, did you try all the things suggested? I tried to collect what worked for me in my blog post

JonKernPA commented Apr 19, 2011

@endymion, did you try all the things suggested? I tried to collect what worked for me in my blog post

@pusewicz

This comment has been minimized.

Show comment
Hide comment
@pusewicz

pusewicz May 5, 2011

Weird, it does not work for me on my home machine (had no trouble doing that on my work one).

It does not seem to resolve.

pusewicz commented May 5, 2011

Weird, it does not work for me on my home machine (had no trouble doing that on my work one).

It does not seem to resolve.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.