Ssl – The proxy server received an invalid response from an upstream server

apache-2.2httpdssltomcat

I have tomcat server behind the apache. I am using mod_ssl and reverse proxy to the tomcat. All are running at default ports.

The full error is as follow.
ack
Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request POST /pages/doeditpage.action.

Reason: Error reading from remote server

If I clean the browser cache the error goes away and comes back after few attempts. I test the same on Chrome/Firefox/IE on Windows platform. Wondering it works perfectly on Linux based Chrome/Firefox.

I googled a lot there are few answers at stack overflow but I am not able to find my answer. Is this a server side problem? because so many browsers cant be wrong at same time on Windows.

Best Answer

Answering my own question. Basically such problem could occur if there are some issues with the Apache connector to Tomcat.

In my case, I had reduced the timeout value to 5 MS, I think this is really less for any internet based application. Moreover, I had opened a new connector at 8443 that would talk to apache.

As far as proxy and reverse proxy is concerned you could get away with the default not secure port 8080 and specify the secure and proxy port as 443 (apache secure port).

secure="true" scheme="https" proxyPort=443 in the default port 8080 connector resolved the problem. I know this may be very basic stuff for any one with Java/Web background, but for someone like me who has no knowledge of JAVA application servers whatsoever was a real pain to figure this out.