-
1. Re: JBoss & Apache mod_proxy Proxy Error 502
mahnsc May 6, 2010 9:41 AM (in response to wuschelz)Can you post the full text of the mod_proxy error from the apache log? Also, is this a mod_proxy_http configuration or a mod_proxy_balancer configuration?
-
2. Re: JBoss & Apache mod_proxy Proxy Error 502
cullendw May 6, 2010 3:50 PM (in response to wuschelz)we experienced something vaguely similar. We got around it using port rerouting : try reroute port 8180 to port 80. In our case, the pages returned referenced port 8080, but we connect to the reverse proxy on port 80 which caused issues. The port reroute (on Linux) did the trick. As mentioned by the previous reply, please can you supply both the log files.
-
3. Re: JBoss & Apache mod_proxy Proxy Error 502
mahnsc May 6, 2010 6:19 PM (in response to cullendw)I was going to suggest setting a proxyPort value of 80 in the container but without really knowing what the actual error is, it's just a guess (and maybe a bad guess!)
-
4. Re: JBoss & Apache mod_proxy Proxy Error 502
cullendw May 7, 2010 1:55 AM (in response to mahnsc)If the apache server is binding to a different IP to the jboss server, then setting jboss to use port 80 may work. The problem comes if the apache server and jboss server on binding to the same IP, then you would get a port conflict. The port rerouting would then be a way of getting around that :
/sbin/iptables -t nat -I PREROUTING -p tcp --dport 8180 -j REDIRECT --to-port 80
you need to execute it as root.
However, I feel that both these solutions are potentially solving the symptom and not the underlying cause.
-
5. Re: JBoss & Apache mod_proxy Proxy Error 502
wuschelz May 10, 2010 9:36 AM (in response to wuschelz)Thanks for all the answers and sorry for not answering. I had to find my password again.
The sitation goes wired more and more. First i enabled dumpio in apache to see wich requests are sent and wich response go through the wire:
when connecting to apache and make a ProxyPass it ends up with (i obfuscated IPs and URL):
[Wed May 05 15:03:13 2010] [error] [client 10.99.99.99] (20014)Internal error: proxy: error reading status line from remote server 10.99.99.99, referer: http://someurl/someURI/timeRecording.do
The same with 8180 works fine.
When i change ProxyPass to AJP, i get a Bad Request, so i assume that jboss is answering wrong.
I tried to dump out all the tomcat requests in log4j for class org.jboss.web.tc5.tomcat in trace level but didn't succeed.
Is it possible to see wich http requests or responses are sent by jboss? So perhaps i will find my error there.
The idea about the iptables is very good. We us snoop instead but i think the result will be the same. When i good it i will post status.
Regards
wuschelz
-
6. Re: JBoss & Apache mod_proxy Proxy Error 502
mahnsc May 11, 2010 9:00 AM (in response to wuschelz)You could probably get the information you want by setting the apache error log to Debug level, too.
The quickest way to set the connector on your jboss server without making too many drastic changes to your config: make a backup of your log4j.xml then open it up and change the logging level for category: 'org.apache' to DEBUG from INFO. Save it and within 60 seconds, you'll see DEBUG messages show up in your server.log. This will give you a lot of messages though.
-
7. Re: JBoss & Apache mod_proxy Proxy Error 502
wuschelz Apr 11, 2011 2:50 AM (in response to wuschelz)We have been able to solve the problem.
The http connector MaxHTTPHeader was too small. We doubled it and everything is fine.
We found this out with wireshark tracing.