Please explain this 502 Bad Gateway error

Igor Sysoev is at
Thu Dec 27 20:13:27 MSK 2007

On Thu, Dec 27, 2007 at 10:36:00PM +0530, just starting wrote:

> hi,
> First of all my sincere thanks.
> Error Log Entry : [2007/12/27 10:44:07 [error] 2625#0: *7 connect()
> failed (111: Connection refused) while connecting to upstream, client:
>, server: localhost, request:
> "GET /KdocProj/dboard.html?_dc=1198726407859 HTTP/1.0", upstream: "
>", host: "
> Let me explain a few things.
> The machine where I am testing the hosting is
> nginx is hosted on port 8000 and jetty on 8080 on the same machine mentioned
> above.
> There is a statement in the error log like : "while connecting to upstream,
> client:,", please note that is the local proxy
> server for internet access. So, what i think happening here is that nginx is
> trying to access the local jetty server via proxy.

The "client:" means that someone on has connected
to nginx and request. nginx proxies the request to

Probably you should set "proxy_pass" instead

> For Igor:
> >>>>The "Connection refused" usually means that backend does not listen
> on or its listen queue is full: it can not handle all
> requests.
> I am the only one testing this implementation. So, I dont think the listen
> queue is full and also I made sure that jetty is listening on port 8080.

Then it's prbably firewall.

Igor Sysoev

More information about the nginx mailing list