ERROR: Phusion Passenger doesn't seem to be running

3,102 views
Skip to first unread message

Ram

unread,
Sep 21, 2010, 6:23:32 AM9/21/10
to Phusion Passenger Discussions
Hi,

Server A - Passenger 2.2.13, Rails 2.1.0, REE
Server B - Passenger 2.0.6, Rails 2.1.0, Stock Ruby 1.8.7

passenger-status on server A outputs "ERROR: Phusion Passenger doesn't
seem to be running." while
passenger-status on server B works fine.

I found a few similar issues raised but couldn't find a specific
resolution... ?

Any idea what's wrong in the configuration?

Thanks!

Radek Kotlarek

unread,
Sep 21, 2010, 6:36:28 AM9/21/10
to phusion-...@googlegroups.com
Do you have Passenger Module included in your apache config file?
I would also suggest examination of Apache logs files. Raising log level to debug might be helpful as well.

Ram

unread,
Sep 22, 2010, 8:29:44 AM9/22/10
to Phusion Passenger Discussions
Hi Radek,

I do have the Passenger Module in apache config. The funny thing is
Passenger is running. It's serving my app just fine. But passenger-
status insists otherwise. not sure why. Apache log doesn't have
anything suspicious on it. Any other ideas?

Thanks!

Hongli Lai

unread,
Sep 22, 2010, 9:24:59 AM9/22/10
to phusion-...@googlegroups.com
On Wed, Sep 22, 2010 at 2:29 PM, Ram <yourstru...@gmail.com> wrote:
> Hi Radek,
>
> I do have the Passenger Module in apache config. The funny thing is
> Passenger is running. It's serving my app just fine. But passenger-
> status insists otherwise. not sure why. Apache log doesn't have
> anything suspicious on it. Any other ideas?

passenger-status from one Phusion Passenger version doesn't work
properly in combination with running Phusion Passenger instances of
other versions. Is that the case for you?

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

Ram

unread,
Sep 23, 2010, 2:22:23 AM9/23/10
to Phusion Passenger Discussions
Hi Hongli,

I had Passenger 2.0.6 gem installed in stock ruby's RubyGems. And had
2.2.13 in REE's RubyGems. Running "passenger-status" gave me the
error.

I uninstalled 2.0.6 and installed 2.2.13 for stock Ruby's gems
instead. passenger-status worked. Started an ab test to check whether
the output was correct and it crashed the server. Managed to uninstall
passenger 2.2.13 from stock ruby gems before it crashed though. I'd
performed the very same test two days back successfully.

I haven't the faintest idea what's going on. And I've still got
trouble getting "gem" to point to REE's gem command. It worked
immediately but stopped working from the next day. I noticed warnings
in the logs because of this and thats why I wanted to get it fixed.
Looks like any script using the "gem" command still accesses only
stock ruby's "gem" command which is not good.

Got the server up again for now. Gonna poke around for a bit. Got any
suggestions on how to fix this?

Thanks.

On Sep 22, 6:24 pm, Hongli Lai <hon...@phusion.nl> wrote:
> On Wed, Sep 22, 2010 at 2:29 PM, Ram <yourstruly.vi...@gmail.com> wrote:
> > Hi Radek,
>
> > I do have the Passenger Module in apache config. The funny thing is
> > Passenger is running. It's serving my app just fine. But passenger-
> > status insists otherwise. not sure why. Apache log doesn't have
> > anything suspicious on it. Any other ideas?
>
> passenger-status from one Phusion Passenger version doesn't work
> properly in combination with running Phusion Passenger instances of
> other versions. Is that the case for you?
>
> --
> Phusion | The Computer Science Company
>
> Web:http://www.phusion.nl/
> E-mail: i...@phusion.nl

Ram

unread,
Sep 23, 2010, 2:39:33 AM9/23/10
to Phusion Passenger Discussions
Hi Hongli,

The app is currently being served fine by passenger. But here's what I
don't get :

Ram ~: gem list passenger

*** LOCAL GEMS ***

Ram ~: /opt/ruby-enterprise-1.8.7-2010.01/bin/gem list passenger

*** LOCAL GEMS ***

passenger (2.2.13)

Ram ~: sudo passenger-status
sudo: passenger-status: command not found

Ram ~: sudo passenger-memory-stats
sudo: passenger-memory-stats: command not found

If passenger is serving my app just fine, why are passenger-status and
passenger-memory-stats not working?

Hongli Lai

unread,
Sep 23, 2010, 3:37:42 AM9/23/10
to phusion-...@googlegroups.com
On Thu, Sep 23, 2010 at 8:22 AM, Ram <yourstru...@gmail.com> wrote:
> Hi Hongli,
>
> I had Passenger 2.0.6 gem installed in stock ruby's RubyGems. And had
> 2.2.13 in REE's RubyGems. Running "passenger-status" gave me the
> error.
>
> I uninstalled 2.0.6 and installed 2.2.13 for stock Ruby's gems
> instead. passenger-status worked. Started an ab test to check whether
> the output was correct and it crashed the server. Managed to uninstall
> passenger 2.2.13 from stock ruby gems before it crashed though. I'd
> performed the very same test two days back successfully.
>
> I haven't the faintest idea what's going on. And I've still got
> trouble getting "gem" to point to REE's gem command. It worked
> immediately but stopped working from the next day. I noticed warnings
> in the logs because of this and thats why I wanted to get it fixed.
> Looks like any script using the "gem" command still accesses only
> stock ruby's "gem" command which is not good.
>
> Got the server up again for now. Gonna poke around for a bit. Got any
> suggestions on how to fix this?

That depends on what you mean by "crash". What errors are in the
Apache error log?

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl

Ram

unread,
Sep 23, 2010, 3:56:36 AM9/23/10
to Phusion Passenger Discussions
From the Apache error log

[Thu Sep 23 06:01:44 2010] [error] [client <ip_add>] Premature end of
script headers:
[Thu Sep 23 06:01:44 2010] [error] [client <ip_add>] Premature end of
script headers:
[ pid=21997 file=ext/apache2/Hooks.cpp:700 time=2010-09-23
06:01:45.114 ]:
The backend application (process 22782) did not send a valid HTTP
response; instead, it sent nothing at all. It is possible that it has
crashed; please check whether there are crashing bugs in this applicat
$
[ pid=21996 file=ext/apache2/Hooks.cpp:700 time=2010-09-23
06:01:45.114 ]:
The backend application (process 22775) did not send a valid HTTP
response; instead, it sent nothing at all. It is possible that it has
crashed; please check whether there are crashing bugs in this applicat
$
*** Exception Errno::ENOMEM in
PhusionPassenger::Railz::ApplicationSpawner (Cannot allocate memory -
fork(2)) (process 22805):
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/
passenger-2.2.13/lib/phusion_passenger/utils.rb:245:in `fork'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/
passenger-2.2.13/lib/phusion_passenger/utils.rb:245:in `safe_fork'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/
passenger-2.2.13/lib/phusion_passenger/railz/application_spawner.rb:
377:in `handle_spawn_application'
....

[ pid=22945 file=ext/apache2/Hooks.cpp:743 time=2010-09-23
06:03:01.711 ]:
Unexpected error in mod_passenger: The ApplicationPool server
unexpectedly closed the connection while we're reading a response for
the 'get' command.
Backtrace:
in 'virtual boost::shared_ptr<Passenger::Application::Session>
Passenger::ApplicationPoolServer::Client::get(const
Passenger::PoolOptions&)' (ApplicationPoolServer.h:424)
in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:534)


It seemed to have run out of memory and I couldn't get in at all. Had
to reboot it.

BTW ... The following is the warning I mentioned in my previous post

Missing the Rails 2.1.0 gem. Please `gem install -v=2.1.0 rails`,
update your RAILS_GEM_VERSION setting in config/environment.rb for the
Rails version you do have installed, or comment out RAILS_GEM_VERSION

But Rails 2.1.0 is installed and working fine. Feels like the two
issues are related... ?

On Sep 23, 12:37 pm, Hongli Lai <hon...@phusion.nl> wrote:
> E-mail: i...@phusion.nl

Ryan

unread,
Sep 23, 2010, 11:42:12 AM9/23/10
to Phusion Passenger Discussions
Ram,

It sounds like REE isn't in your path. In CentOS/RHEL create /etc/
profile.d/ruby-enterprise.sh with the following contents:
pathmunge /opt/ruby-enterprise-1.8.7-2010.01/bin

Then log out/in and you'll see REE's gem, etc are in your path.

Ryan

Hongli Lai

unread,
Sep 23, 2010, 12:58:23 PM9/23/10
to phusion-...@googlegroups.com
On Thu, Sep 23, 2010 at 9:56 AM, Ram <yourstru...@gmail.com> wrote:
> *** Exception Errno::ENOMEM in
> PhusionPassenger::Railz::ApplicationSpawner (Cannot allocate memory -
> fork(2)) (process 22805):

This.

It looks like you're either out of memory, or your kernel memory is so
fragmented that even though there is enough memory the kernel memory
allocator cannot allocate more memory.

Try making your swap file bigger.

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl

Ram

unread,
Sep 24, 2010, 1:23:02 AM9/24/10
to Phusion Passenger Discussions
Hello Ryan,

I'm running Ubuntu Intrepid 8.10. I tried what you suggested anyway
but it dint work. I DO have PassengerRoot and PassengerRuby set in
apache config and I suspect thats why my app is being served fine. But
Im unsure how to set these paths for my profile.

Hongli,

The server is live now and is responding fine. I just need to get
passenger-status and passenger-memory-stats working.

On Sep 23, 9:58 pm, Hongli Lai <hon...@phusion.nl> wrote:
> On Thu, Sep 23, 2010 at 9:56 AM, Ram <yourstruly.vi...@gmail.com> wrote:
> > *** Exception Errno::ENOMEM in
> > PhusionPassenger::Railz::ApplicationSpawner (Cannot allocate memory -
> > fork(2)) (process 22805):
>
> This.
>
> It looks like you're either out of memory, or your kernel memory is so
> fragmented that even though there is enough memory the kernel memory
> allocator cannot allocate more memory.
>
> Try making your swap file bigger.
>
> --
> Phusion | The Computer Science Company
>
> Web:http://www.phusion.nl/
> E-mail: i...@phusion.nl

Hongli Lai

unread,
Sep 25, 2010, 6:06:30 AM9/25/10
to phusion-...@googlegroups.com
On Fri, Sep 24, 2010 at 7:23 AM, Ram <yourstru...@gmail.com> wrote:
> Hongli,
>
> The server is live now and is responding fine. I just need to get
> passenger-status and passenger-memory-stats working.

'command not found' means that those commands are not in your $PATH.
You need to fix that. Please consult your Unix operating system's
manual or something for details about $PATH.

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl

Reply all
Reply to author
Forward
0 new messages