2015-07-20 583 views
-2

在等待幾分鐘後訪問承載在Microsoft Azure虛擬服務器中的網站時出現以下錯誤。Bad Gateway代理服務器收到來自上游服務器的無效響應 - 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 

阿帕奇工人的conf :

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

The followi NG是從日誌行:

[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

儘量做到:

$> 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