错误网关代理服务器从上游服务器 - Azure服务器收到无效响应

时间:2015-07-20 06:55:15

标签: apache tomcat azure timeout

在等待几分钟后访问 Microsoft Azure虚拟服务器中托管的站点时,我收到以下错误。

502 Bad Gateway The proxy server received an invalid response from an upstream server.

最令人困惑的部分是,如果我们刷新页面,它可以很好地工作并加载非常快

以下是配置:

OS: Windows Server 2012, VC 14

Webserver: Apache: 2.4.12

Tomcat: 8.0.23

Connector: Mod_JK 1.2.40

apache workers conf:

worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009

以下是日志中的行:

[Mon Jul 20 08:21:05 2015][2640:996] [info] ajp_connection_tcp_get_message::jk_ajp_common.c (1291): (w_tc) can't receive the response header message from tomcat, network problems or tomcat (xxx.xxx.xxx.xxx:8009) is down (errno=60)

[Mon Jul 20 08:21:05 2015][2640:996] [error] ajp_get_reply::jk_ajp_common.c (2176): (w_tc) Tomcat is down or refused connection. No response has been sent to the client (yet)

[Mon Jul 20 08:21:05 2015][2640:996] [info] ajp_service::jk_ajp_common.c (2673): (w_tc) sending request to tomcat failed (recoverable),  (attempt=1)

请参阅错误页面:

enter image description here

1 个答案:

答案 0 :(得分:-1)

尝试:

$> killall -9 httpd
$> rm -f /var/lock/subsys/httpd
$> service httpd restart

如果上述内容未修复,请尝试以下操作。在httpd.conf中注释掉以下模块,然后重新启动Apache服务器。

LoadModule unique_id_module modules/mod_unique_id.so

然后:

$> restart http server
$> /etc/init.d/httpd restart