The service is not available. Please try again later

I’m trying to get a Bitnami Rails running with Nginx and Thin.

I’ve got Thin servers running on:

[email protected]:/opt/bitnami$ thin -C
projects/ndeavor/current/config/thin.yml start

Starting server on 127.0.0.1:3000 …

Starting server on 127.0.0.1:3001 …

Starting server on 127.0.0.1:3002 …

Starting server on 127.0.0.1:3003 …

Starting server on 127.0.0.1:3004 …

I’ve got Nginx running:

[email protected]:/opt/bitnami$ sudo ./ctlscript.sh start nginx
/opt/bitnami/nginx/scripts/ctl.sh : Nginx started

And after I start Nginx, then the thin.3000.log has:

>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on 127.0.0.1:3000, CTRL+C to stop

So, I believe that Nginx is connected to the 5 Thin app servers.

I have the nginx.conf listen on port 80

But, when I try to connect using a browser, I get this:

“The service is not available. Please try again later.”

It’s the same message I get if nginx is not running.

Is something in Ubuntu stopping http port 80 from reaching nginx?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,237379,237379#msg-237379

This is my nginx.conf file. Does it look OK?
https://dl.dropbox.com/u/35302780/nginx.conf

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,237379,237381#msg-237381

From: “Reddirt” [email protected]

2013/03/14 14:22:10 [error] 1537#0: *1 connect() failed (111: Connection
ndeavor.ameipro.com
2013/03/14 14:22:27 [error] 1537#0: *1 connect() failed (111: Connection
refused) while connecting to upstream, client: 192.168.20.3, server: ,
request: “GET /clients HTTP/1.1”, upstream: "
http://127.0.0.1:3004/clients",
host: “ndeavor.ameipro.com
2013/03/14 14:22:27 [error] 1537#0: *1 connect() failed (111: Connection
refused) while connecting to upstream, client: 192.168.20.3, server: ,
request: “GET /clients HTTP/1.1”, upstream: "
http://127.0.0.1:3000/clients",
host: “ndeavor.ameipro.com
2013/03/14 14:22:27 [error] 1537#0: *1 connect() failed (111: Connection
refused) while connecting to upstream, client: 192.168.20.3, server: ,
request: “GET /clients HTTP/1.1”, upstream: "
http://127.0.0.1:3001/clients",
host: “ndeavor.ameipro.com
2013/03/14 14:22:27 [error] 1537#0: *1 connect() failed (111: Connection
refused) while connecting to upstream, client: 192.168.20.3, server: ,
request: “GET /clients HTTP/1.1”, upstream: "
http://127.0.0.1:3002/clients",
host: “ndeavor.ameipro.com
2013/03/14 14:22:27 [error] 1537#0: *1 connect() failed (111: Connection
refused) while connecting to upstream, client: 192.168.20.3, server: ,
request: “GET /clients HTTP/1.1”, upstream: "
http://127.0.0.1:3003/clients",
host: “ndeavor.ameipro.com
2013/03/14 14:22:28 [error] 1537#0: *12 no live upstreams while
connecting
to upstream, client: 192.168.20.3, server: , request: “GET / HTTP/1.1”,
upstream: “http://backend/”, host: “ndeavor.ameipro.com
2013/03/14 14:23:09 [info] 1537#0: *1 client 192.168.20.3 closed
keepalive
connection
2013/03/14 14:23:09 [info] 1537#0: *15 client 192.168.20.3 closed
keepalive
connection

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,237379,
237382#msg-237382


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Is the application listening on those ports? What does netstat show?
Can
you telnet to the app server on those ports? Could the app not be
listening on 127.0.0.1 and only on the non-loopback address?

Confidentiality Notice:
This electronic message and any attachments may contain confidential or
privileged information, and is intended only for the individual or
entity
identified above as the addressee. If you are not the addressee (or the
employee or agent responsible to deliver it to the addressee), or if
this
message has been addressed to you in error, you are hereby notified that
you may not copy, forward, disclose or use any part of this message or
any
attachments. Please notify the sender immediately by return e-mail or
telephone and delete this message from your system.

OK - I now have Nginx running the 5 Thin app servers!

Thanks for the help!

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,237379,237441#msg-237441

I got past that error and now the nginx error log has this:

2013/03/14 14:22:10 [error] 1537#0: *1 connect() failed (111: Connection
refused) while connecting to upstream, client: 192.168.20.3, server: ,
request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:3000/”, host:
ndeavor.ameipro.com
2013/03/14 14:22:10 [error] 1537#0: *1 connect() failed (111: Connection
refused) while connecting to upstream, client: 192.168.20.3, server: ,
request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:3001/”, host:
ndeavor.ameipro.com
2013/03/14 14:22:10 [error] 1537#0: *1 connect() failed (111: Connection
refused) while connecting to upstream, client: 192.168.20.3, server: ,
request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:3002/”, host:
ndeavor.ameipro.com
2013/03/14 14:22:10 [error] 1537#0: *1 connect() failed (111: Connection
refused) while connecting to upstream, client: 192.168.20.3, server: ,
request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:3003/”, host:
ndeavor.ameipro.com
2013/03/14 14:22:10 [error] 1537#0: *1 connect() failed (111: Connection
refused) while connecting to upstream, client: 192.168.20.3, server: ,
request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:3004/”, host:
ndeavor.ameipro.com
2013/03/14 14:22:27 [error] 1537#0: *1 connect() failed (111: Connection
refused) while connecting to upstream, client: 192.168.20.3, server: ,
request: “GET /clients HTTP/1.1”, upstream:
http://127.0.0.1:3004/clients”,
host: “ndeavor.ameipro.com
2013/03/14 14:22:27 [error] 1537#0: *1 connect() failed (111: Connection
refused) while connecting to upstream, client: 192.168.20.3, server: ,
request: “GET /clients HTTP/1.1”, upstream:
http://127.0.0.1:3000/clients”,
host: “ndeavor.ameipro.com
2013/03/14 14:22:27 [error] 1537#0: *1 connect() failed (111: Connection
refused) while connecting to upstream, client: 192.168.20.3, server: ,
request: “GET /clients HTTP/1.1”, upstream:
http://127.0.0.1:3001/clients”,
host: “ndeavor.ameipro.com
2013/03/14 14:22:27 [error] 1537#0: *1 connect() failed (111: Connection
refused) while connecting to upstream, client: 192.168.20.3, server: ,
request: “GET /clients HTTP/1.1”, upstream:
http://127.0.0.1:3002/clients”,
host: “ndeavor.ameipro.com
2013/03/14 14:22:27 [error] 1537#0: *1 connect() failed (111: Connection
refused) while connecting to upstream, client: 192.168.20.3, server: ,
request: “GET /clients HTTP/1.1”, upstream:
http://127.0.0.1:3003/clients”,
host: “ndeavor.ameipro.com
2013/03/14 14:22:28 [error] 1537#0: *12 no live upstreams while
connecting
to upstream, client: 192.168.20.3, server: , request: “GET / HTTP/1.1”,
upstream: “http://backend/”, host: “ndeavor.ameipro.com
2013/03/14 14:23:09 [info] 1537#0: *1 client 192.168.20.3 closed
keepalive
connection
2013/03/14 14:23:09 [info] 1537#0: *15 client 192.168.20.3 closed
keepalive
connection

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,237379,237382#msg-237382

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs