Hello all.
I have topology as follows:
client->NGINX->haproxy-> 4xapache servers.
Problem is, that on one page, we have option to download file - it is
done through changing header. Resulting header is as follows:
Content-type: application/txt
I’m getting 502 Bad Gateway, The server returned an invalid or
incomplete response error everytime after clicking on link. In logs,
there is nothing weird. When trying it directly through HAPROXY or
directly through nginx (pointed to one of that apache servers) it is
working correctly.
Do you have any idea about how to resolve it? Have anybody experienced
something like this?
Many thanks for any reply concerning this.
Hello all.
I have topology as follows:
client->NGINX->haproxy-> 4xapache servers.
Problem is, that on one page, we have option to download file - it is
done through changing header. Resulting header is as follows:
Content-type: application/txt
how do you change header, and can you please post complete headers
from successful request[s] and from unsuccessful request?
I’m getting 502 Bad Gateway, The server returned an invalid or
incomplete response error everytime after clicking on link. In logs,
there is nothing weird.
please post any relevant log entries
When trying it directly through HAPROXY or
directly through nginx (pointed to one of that apache servers) it is
working correctly.
we need to see the headers
Do you have any idea about how to resolve it? Have anybody experienced
something like this?
Many thanks for any reply concerning this.
Logs from nginx debug: http://pastebin.com/UrMXgYyf
(I have more - all from logging into system to 502, but there are so
large actually )
Actually, I don’t have any successful header…
Let me know if you want something, I can debug/prepare it if you need
more informations.
Many thanks for all the help.
mmm you are the man
Well, its confirmed now - it is working when I removed ; from header. I
missed it before…
Great - many thanks again - you made my day
On Sun, Oct 16, 2011 at 07:24:34AM -0400, sogi wrote:
pre-check=0
Pragma: no-cache
Content-Length: 77032;
The “;” is incorrect and shouldn’t be here. If it’s indeed
present in headers returned by your backend - there is no surprise
haproxy rejects such responses (see below).
Logs from nginx debug: http://pastebin.com/UrMXgYyf
(I have more - all from logging into system to 502, but there are so
large actually )
Debug log shows response from backend was already 502:
2011/10/13 21:47:05 [debug] 15881#0: *33 http proxy status 502 “502 Bad
Gateway”
That is, most likely it’s haproxy who returned 502. See above for
possible reason.
Maxim D.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.