502 Bad Gateway after server reboot

350 views
Skip to first unread message

Andrea

unread,
May 2, 2009, 1:01:47 PM5/2/09
to Phusion Passenger Discussions
I've installed on my server Ubuntu 9.04 x64 and nginx + passenger.
Everything work fine, but after a reboot if i try to reach my
application i get:

502 Error - Bad Gateway

With this logs:

2009/05/02 18:42:31 [error] 2567#0: *3 connect() to unix:/tmp/
passenger.2514/master/helper_server.sock failed (111: Connection
refused) while connecting to upstream, client: 127.0.0.1, server:
domain1.com, request: "GET /favicon.ico HTTP/1.1", upstream: "unix:/
tmp/passenger.2514/master/helper_server.sock:", host: "domain1.com"
2009/05/02 18:49:57 [error] 2567#0: *12 connect() to unix:/tmp/
passenger.2514/master/helper_server.sock failed (111: Connection
refused) while connecting to upstream, client: 127.0.0.1, server:
domain1.com, request: "GET / HTTP/1.1", upstream: "unix:/tmp/passenger.
2514/master/helper_server.sock:", host: "domain1.com"
2009/05/02 18:50:00 [error] 2567#0: *12 connect() to unix:/tmp/
passenger.2514/master/helper_server.sock failed (111: Connection
refused) while connecting to upstream, client: 127.0.0.1, server:
domain1.com, request: "GET /favicon.ico HTTP/1.1", upstream: "unix:/
tmp/passenger.2514/master/helper_server.sock:", host: "domain1.com"

If i then manually restart nginx, the application work again,
perfectly, so the problem is that everytime i reboot i need to
manually restart nginx...

If can help my application isin't using dns... i'm testing if
everything work adding the domain on the host file.

thanks, Andrea

Andrea

unread,
May 2, 2009, 1:05:44 PM5/2/09
to Phusion Passenger Discussions
the problem isin't the fav.ico because even if i start an application
with it, after a reboot the server always return me:

2009/05/02 18:49:49 [error] 2567#0: *9 connect() to unix:/tmp/
passenger.2514/master/helper_server.sock failed (111: Connection
refused) while connecting to upstream, client: 127.0.0.1, server:
domain2.com, request: "GET / HTTP/1.1", upstream: "unix:/tmp/passenger.
2514/master/helper_server.sock:", host: "domain2.com"
2009/05/02 18:49:52 [error] 2567#0: *9 connect() to unix:/tmp/
passenger.2514/master/helper_server.sock failed (111: Connection
refused) while connecting to upstream, client: 127.0.0.1, server:
domain2.com, request: "GET / HTTP/1.1", upstream: "unix:/tmp/passenger.
2514/master/helper_server.sock:", host: "domain2.com"

Andrea

unread,
May 3, 2009, 1:39:34 PM5/3/09
to Phusion Passenger Discussions
I've done some test with 3 virtual machines...
with ubuntu 8.10 x86, everything work fine, and after a reboot of the
server everything continue to work.

With ubuntu 9,04 x86 or x64, everything work fine, but i get the 502
bad gateway error after a reboot of the server,
and the only way to make it work it's to restart nginx manually.
Someone use ubuntu 9.04 with passenger fine? Even after a reboot (and
with the index.html removed from the public older)? If yes, wich init
file you use?
Thanks.

Jim

unread,
May 9, 2009, 12:25:04 AM5/9/09
to Phusion Passenger Discussions
Have you found a solution?

I'm also using Ubuntu 9.04 and passenger(nginx) 2.2.2 and getting the
same error. "/master/helper_server.sock failed..."

I'm using the instructions from http://www.hackido.com/2009/04/install-ruby-rails-on-ubuntu-904-jaunty.html

Jim

unread,
May 9, 2009, 12:58:55 AM5/9/09
to Phusion Passenger Discussions
I removed the nginx init file and started nginx from rc.local. Using
'/opt/nginx/sbin/nginx' in rc.local. This also has the same problem
after reboot. I have to kill the process and start nginx to make it
work. This is on Ubuntu 9.04 desktop version.

I also use the same instruction as in my previous posted link on
Ubuntu 8.04 server and it worked fine.

On May 9, 12:25 am, Jim <huang....@gmail.com> wrote:
> Have you found a solution?
>
> I'm also using Ubuntu 9.04 and passenger(nginx) 2.2.2 and getting the
> same error.   "/master/helper_server.sock failed..."
>
> I'm using the instructions fromhttp://www.hackido.com/2009/04/install-ruby-rails-on-ubuntu-904-jaunt...

Andrea

unread,
May 11, 2009, 6:38:09 AM5/11/09
to Phusion Passenger Discussions
Hello, no i haven't still found a solution, so i rolled back to Ubuntu
8.10, where everything work fine.
I think it's some sort of bug\issue between Ubuntu 9.04 and Passenger
or Nginx.
I hoped someone could give me an answer... but my messages were
ignored (so i thought i was the only one with this issue) :P

Fred

unread,
Jun 16, 2009, 9:02:31 AM6/16/09
to Phusion Passenger Discussions
Reply all
Reply to author
Forward
0 new messages