我在同一臺機器上的每個服務器與本地主機。我在其他Windows Server 2008中安裝了相同的配置,並執行相同的操作。 但在我的筆記本電腦中,我安裝了相同的工作正常。只有在Windows服務器不起作用。 我做了這些步驟:
1.安裝Apache + 2 Tomcat與diferents,http,關機和AJP端口。
2.穿戴mod_jk的成APACHE_HOME /模塊
3.穿戴文件workers.properties到APACHE_HOME/CONF爲這樣:
workers.tomcat_home=C:\Servers2\t3
workers.java_home=C:\Program Files\Java\jdk1.7.0_51
worker.list=balancer
#Tomcat 1
worker.worker1.port=9202
worker.worker1.host=localhost
worker.worker1.type=ajp13
worker.worker1.lbfactor=1
#Tomcat 2
worker.worker2.port=9205
worker.worker2.host=localhost
worker.worker2.type=ajp13
worker.worker2.lbfactor=1
worker.balancer.type=lb
worker.balancer.balance_workers=worker1,worker2
worker.balancer.method=B
worker.balancer.sticky_session=true
4.添加在APACHE_HOME/CONF/http this:
LoadModule jk_module modules/mod_jk.so
JkWorkersFile C:\Servers2\apache\conf\workers.properties
JkMount /* balancer
5.添加在每個TOMCAT_HOME/conf目錄/服務器
Engine name="Catalina" defaultHost="localhost" jvmRoute="worker2"
而與此應的作品,我不和我的筆記本電腦知道沒有問題,當我安裝了這個在Windows Server不起作用。 我試圖起飛防火牆,添加入站和出站新規則,但沒有。
沒錯,我可以查看在我的雄貓端口,但是當我訪問Apache的端口給我502和503的錯誤,並在日誌中有這樣的。
[Thu Feb 13 17:38:04.856 2014] [3868:2996] [info]
ajp_connection_tcp_get_message::jk_ajp_common.c (1259): (worker2)
can't receive the response header message from tomcat, tomcat
(127.0.0.1:9205) has forced a connection close for socket 308 [Thu Feb
13 17:38:04.856 2014] [3868:2996] [error]
ajp_get_reply::jk_ajp_common.c (2126): (worker2) Tomcat is down or
refused connection. No response has been sent to the client (yet) [Thu
Feb 13 17:38:04.856 2014] [3868:2996] [info]
ajp_service::jk_ajp_common.c (2623): (worker2) sending request to
tomcat failed (recoverable), (attempt=2) [Thu Feb 13 17:38:04.856
2014] [3868:2996] [error] ajp_service::jk_ajp_common.c (2643):
(worker2) connecting to tomcat failed. [Thu Feb 13 17:38:04.856 2014]
[3868:2996] [info] service::jk_lb_worker.c (1478): service failed,
worker worker2 is in error state [Thu Feb 13 17:38:04.856 2014]
[3868:2996] [info] service::jk_lb_worker.c (1558): All tomcat
instances are busy or in error state [Thu Feb 13 17:38:04.856 2014]
[3868:2996] [error] service::jk_lb_worker.c (1563): All tomcat
instances failed, no more workers left [Thu Feb 13 17:38:04.856 2014]
[3868:2996] [info] jk_handler::mod_jk.c (2788): Service error=0 for
worker=balancer
看來你的Apache安裝/配置有問題。你能描述Apache配置和系統佈局(每臺機器上安裝的是什麼) – Kazaag