- 浏览: 1466721 次
- 性别:
- 来自: 青岛人在北京
文章分类
最新评论
-
yhxf_ie:
azheng270 写道 永远是0知道答案了, inser ...
使用MySQL的LAST_INSERT_ID -
yhxf_ie:
insert了还是0... 可能还要设置些什么?
使用MySQL的LAST_INSERT_ID -
一如年少:
123123
Flex使用ribbit.com的服务给手机发送短信SMS -
pointdew:
poincare 写道您好,请教一个问题,如果我的 swf 文 ...
Flex:使用FlexPaper显示PDF文档 -
pointdew:
swf远程加载问题 : flexpaper无法加载http方式 ...
Flex:使用FlexPaper显示PDF文档
Apache + Tomcat 集群配置
一、 环境说明
Windows XP
apache_2.0.59-win32-x86-no_ssl.msi http://httpd.apache.org/
mod_jk-apache-2.0.59.so http://tomcat.apache.org/download-connectors.cgi
apache-tomcat-5.5.23.zip http://tomcat.apache.org/download-55.cgi
我的程序分别安装到
D:\webserver\Apache Group\Apache2
D:\webserver\TomcatCluster\tomcat1
D:\webserver\TomcatCluster\tomcat2
Apache安装完后,在右下角状态栏中可以看到 Apache Service Monitor 可以控制Apache的状态。
验证Apache是否安装成功,可以访问http://localhost 如果能看到Apache的预制页面,说明安装成功,如果不行,可以访问http://localhost:8080 试试(可能因为IIS已经使用了80端口, 我的就是8080, 可以修改Apache的配置文件来修改)
二、 负载均衡
找到Apache安装目录下conf目录中的httpd.conf文件。
在文件最后添加一句:
include "D:\webserver\Apache Group\Apache2\conf\mod_jk.conf"
接着在conf目录中新建文件mod_jk.conf并添加下面的内容:
#加载mod_jk Module
LoadModule jk_module modules/mod_jk-apache-2.0.59.so
#指定 workers.properties文件路径
JkWorkersFile conf/workers.properties
#指定哪些请求交给tomcat处理,"controller"为在workers.propertise里指定的负载分配控制器名
JkMount /*.jsp controller
在conf目录下新建workers.properties文件并添加如下内容:
#server
worker.list = controller
#========tomcat1========
worker.tomcat1.port=11009
worker.tomcat1.host=localhost
worker.tomcat1.type=ajp13
worker.tomcat1.lbfactor = 1
#========tomcat2========
worker.tomcat2.port=12009
worker.tomcat2.host=localhost
worker.tomcat2.type=ajp13
worker.tomcat2.lbfactor = 1
#========controller,负载均衡控制器========
worker.controller.type=lb
worker.controller.balanced_workers=tomcat1,tomcat2
worker.controller.sticky_session=1
(解释一下AJP13是 Apache JServ Protocol version 1.3)
将mod_jk-apache-2.0.59.so 复制到Apache的modules目录中。
接下来配置2个Tomcat
打开tomcat1\conf\ server.xml
将Server port 改为11005
<Server port="11005" shutdown="SHUTDOWN">
将Define Connector port改为11080
<Connector port="11080" maxHttpHeaderSize="8192"
将AJP13 Connector port改为11009
<Connector port="11009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
打开tomcat2\conf\server.xml
将Server port 改为12005
<Server port="12005" shutdown="SHUTDOWN">
将Define Connector port改为12080
<Connector port="12080" maxHttpHeaderSize="8192"
将AJP13 Connector port改为12009
<Connector port="12009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
好了,现在建立一个测试程序
分别在两个Tomcat的webapps中建立test目录,并新建test.jsp文件,内容如下:
<%
System.out.println("===========");
%>
启动apache, tomcat1, tomcat2
访问http://localhost:8080/test/test.jsp (或者 http://localhost/test/test.jsp)不断刷新页面,可以在两个Tomcat的控制台中看到,交替输出"===========", 这样就实现了负载均衡。
三、 集群配置
集群除了负载均衡,另一个主要功能是Session Replication。
打开tomcat1\conf\ server.xml将<Cluster>部分的注释去掉。
再打开tomcat2\conf\ server.xml将<Cluster>部分的注释也去掉,并将<Cluster>中<Receiver>的tcpListenPort的值改为4002。以避免与Tomcat1冲突。
添加一个新的测试程序test2.jsp
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.util.*" %>
<html><head><title>Cluster App Test</title></head>
<body>
Server Info:
<%
out.println(request.getLocalAddr() + " : " + request.getLocalPort()+"<br>");%>
<%
out.println("<br> ID " + session.getId()+"<br>");
// 如果有新的 Session 属性设置
String dataName = request.getParameter("dataName");
if (dataName != null && dataName.length() > 0) {
String dataValue = request.getParameter("dataValue");
session.setAttribute(dataName, dataValue);
}
out.println("<b>Session 列表</b><br>");
System.out.println("============================");
Enumeration e = session.getAttributeNames();
while (e.hasMoreElements()) {
String name = (String)e.nextElement();
String value = session.getAttribute(name).toString();
out.println( name + " = " + value+"<br>");
System.out.println( name + " = " + value);
}
%>
<form action="test2.jsp" method="POST">
名称:<input type=text size=20 name="dataName">
<br>
值:<input type=text size=20 name="dataValue">
<br>
<input type=submit>
</form>
</body>
</html>
分别在2个tomcat的webapps\test中新建WEB-INF目录,在WEB-INF中添加web.xml内容如下:
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
<display-name>TomcatDemo</display-name>
<distributable/>
</web-app>
主要是添加<distributable/>,distributable元素用来告诉servlet容器,程序将部署在分布式Web容器中。
重新启动tomcat1和tomcat2. 访问http://localhost:8080/test/test2.jsp (或http://localhost/test/test2.jsp)
随意添加key-value, 可以看到两个tomcat交替显示session中的值,各个tomcat的session是同步的。
再来修改tomcat1\conf\server.xml,找到
<Engine name="Catalina" defaultHost="localhost">
为其添加jvmRoute属性,值为apache的conf\workers.properties中配置的tomcat名字。
<Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat1">
同样修改tomcat2\conf\server.xml的相同部分
<Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat2">
jvmRoute是tomcat路由标示,由此区分两台tomcat主机。一次会话,就有一个sessionID,这个sessionID后面会跟上jvmRoute设置的值,这样一次会话,就只会让一个tomcat处理。
重新启动tomcat1, tomcat2
访问http://localhost:8080/test/test2.jsp 可以看到session.getId()的值在原session id后面多了jvmRoute的值。
ID 46A5843FF4A1E0A84338225AC02F6430.tomcat1
随意添加key-value,可以看到session信息只在tomcat1中输出。
再打开一个浏览器,并访问http://localhost:8080/test/test2.jsp 其session id可能变为
ID 11478E5BE5FE388E4845205B4133A30F.tomcat2
其值也只会在tomcat2中输出。
现在把tomcat1关闭,再次刷新访问tomcat1的那个浏览器,可以看到session信息输出到了tomcat2的控制台中,并且session信息仍然保留着。
参考文章
http://hi.baidu.com/luodaijun/blog/item/5bbe4cfb5ffef864034f56a1.html
http://www-128.ibm.com/developerworks/cn/java/l-jetspeed/
http://tomcat.apache.org/tomcat-5.0-doc/balancer-howto.html
http://tomcat.apache.org/tomcat-5.0-doc/cluster-howto.html
http://hi.baidu.com/abocai/blog/item/c18314f4d8e4a1ef7609d70f.html
http://hi.baidu.com/injava/blog/item/c8df882f136f21391e30896d.html
另外推荐一篇文章《Remotely monitor Tomcat clusters using MC4J》,使用JMX技术监测Tomcat集群。
中文名《用MC4J远程监测Tomcat集群-JMX技术助力Tomcat》
英文地址 http://www.javaworld.com/javaworld/jw-08-2005/jw-0801-jmx.html
中文地址 http://www.matrix.org.cn/resource/article/2005-09-01/Tomcat_MC4J_43706.html
一、 环境说明
Windows XP
apache_2.0.59-win32-x86-no_ssl.msi http://httpd.apache.org/
mod_jk-apache-2.0.59.so http://tomcat.apache.org/download-connectors.cgi
apache-tomcat-5.5.23.zip http://tomcat.apache.org/download-55.cgi
我的程序分别安装到
D:\webserver\Apache Group\Apache2
D:\webserver\TomcatCluster\tomcat1
D:\webserver\TomcatCluster\tomcat2
Apache安装完后,在右下角状态栏中可以看到 Apache Service Monitor 可以控制Apache的状态。
验证Apache是否安装成功,可以访问http://localhost 如果能看到Apache的预制页面,说明安装成功,如果不行,可以访问http://localhost:8080 试试(可能因为IIS已经使用了80端口, 我的就是8080, 可以修改Apache的配置文件来修改)
二、 负载均衡
找到Apache安装目录下conf目录中的httpd.conf文件。
在文件最后添加一句:
include "D:\webserver\Apache Group\Apache2\conf\mod_jk.conf"
接着在conf目录中新建文件mod_jk.conf并添加下面的内容:
#加载mod_jk Module
LoadModule jk_module modules/mod_jk-apache-2.0.59.so
#指定 workers.properties文件路径
JkWorkersFile conf/workers.properties
#指定哪些请求交给tomcat处理,"controller"为在workers.propertise里指定的负载分配控制器名
JkMount /*.jsp controller
在conf目录下新建workers.properties文件并添加如下内容:
#server
worker.list = controller
#========tomcat1========
worker.tomcat1.port=11009
worker.tomcat1.host=localhost
worker.tomcat1.type=ajp13
worker.tomcat1.lbfactor = 1
#========tomcat2========
worker.tomcat2.port=12009
worker.tomcat2.host=localhost
worker.tomcat2.type=ajp13
worker.tomcat2.lbfactor = 1
#========controller,负载均衡控制器========
worker.controller.type=lb
worker.controller.balanced_workers=tomcat1,tomcat2
worker.controller.sticky_session=1
(解释一下AJP13是 Apache JServ Protocol version 1.3)
将mod_jk-apache-2.0.59.so 复制到Apache的modules目录中。
接下来配置2个Tomcat
打开tomcat1\conf\ server.xml
将Server port 改为11005
<Server port="11005" shutdown="SHUTDOWN">
将Define Connector port改为11080
<Connector port="11080" maxHttpHeaderSize="8192"
将AJP13 Connector port改为11009
<Connector port="11009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
打开tomcat2\conf\server.xml
将Server port 改为12005
<Server port="12005" shutdown="SHUTDOWN">
将Define Connector port改为12080
<Connector port="12080" maxHttpHeaderSize="8192"
将AJP13 Connector port改为12009
<Connector port="12009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
好了,现在建立一个测试程序
分别在两个Tomcat的webapps中建立test目录,并新建test.jsp文件,内容如下:
<%
System.out.println("===========");
%>
启动apache, tomcat1, tomcat2
访问http://localhost:8080/test/test.jsp (或者 http://localhost/test/test.jsp)不断刷新页面,可以在两个Tomcat的控制台中看到,交替输出"===========", 这样就实现了负载均衡。
三、 集群配置
集群除了负载均衡,另一个主要功能是Session Replication。
打开tomcat1\conf\ server.xml将<Cluster>部分的注释去掉。
再打开tomcat2\conf\ server.xml将<Cluster>部分的注释也去掉,并将<Cluster>中<Receiver>的tcpListenPort的值改为4002。以避免与Tomcat1冲突。
添加一个新的测试程序test2.jsp
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.util.*" %>
<html><head><title>Cluster App Test</title></head>
<body>
Server Info:
<%
out.println(request.getLocalAddr() + " : " + request.getLocalPort()+"<br>");%>
<%
out.println("<br> ID " + session.getId()+"<br>");
// 如果有新的 Session 属性设置
String dataName = request.getParameter("dataName");
if (dataName != null && dataName.length() > 0) {
String dataValue = request.getParameter("dataValue");
session.setAttribute(dataName, dataValue);
}
out.println("<b>Session 列表</b><br>");
System.out.println("============================");
Enumeration e = session.getAttributeNames();
while (e.hasMoreElements()) {
String name = (String)e.nextElement();
String value = session.getAttribute(name).toString();
out.println( name + " = " + value+"<br>");
System.out.println( name + " = " + value);
}
%>
<form action="test2.jsp" method="POST">
名称:<input type=text size=20 name="dataName">
<br>
值:<input type=text size=20 name="dataValue">
<br>
<input type=submit>
</form>
</body>
</html>
分别在2个tomcat的webapps\test中新建WEB-INF目录,在WEB-INF中添加web.xml内容如下:
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
<display-name>TomcatDemo</display-name>
<distributable/>
</web-app>
主要是添加<distributable/>,distributable元素用来告诉servlet容器,程序将部署在分布式Web容器中。
重新启动tomcat1和tomcat2. 访问http://localhost:8080/test/test2.jsp (或http://localhost/test/test2.jsp)
随意添加key-value, 可以看到两个tomcat交替显示session中的值,各个tomcat的session是同步的。
再来修改tomcat1\conf\server.xml,找到
<Engine name="Catalina" defaultHost="localhost">
为其添加jvmRoute属性,值为apache的conf\workers.properties中配置的tomcat名字。
<Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat1">
同样修改tomcat2\conf\server.xml的相同部分
<Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat2">
jvmRoute是tomcat路由标示,由此区分两台tomcat主机。一次会话,就有一个sessionID,这个sessionID后面会跟上jvmRoute设置的值,这样一次会话,就只会让一个tomcat处理。
重新启动tomcat1, tomcat2
访问http://localhost:8080/test/test2.jsp 可以看到session.getId()的值在原session id后面多了jvmRoute的值。
ID 46A5843FF4A1E0A84338225AC02F6430.tomcat1
随意添加key-value,可以看到session信息只在tomcat1中输出。
再打开一个浏览器,并访问http://localhost:8080/test/test2.jsp 其session id可能变为
ID 11478E5BE5FE388E4845205B4133A30F.tomcat2
其值也只会在tomcat2中输出。
现在把tomcat1关闭,再次刷新访问tomcat1的那个浏览器,可以看到session信息输出到了tomcat2的控制台中,并且session信息仍然保留着。
参考文章
http://hi.baidu.com/luodaijun/blog/item/5bbe4cfb5ffef864034f56a1.html
http://www-128.ibm.com/developerworks/cn/java/l-jetspeed/
http://tomcat.apache.org/tomcat-5.0-doc/balancer-howto.html
http://tomcat.apache.org/tomcat-5.0-doc/cluster-howto.html
http://hi.baidu.com/abocai/blog/item/c18314f4d8e4a1ef7609d70f.html
http://hi.baidu.com/injava/blog/item/c8df882f136f21391e30896d.html
另外推荐一篇文章《Remotely monitor Tomcat clusters using MC4J》,使用JMX技术监测Tomcat集群。
中文名《用MC4J远程监测Tomcat集群-JMX技术助力Tomcat》
英文地址 http://www.javaworld.com/javaworld/jw-08-2005/jw-0801-jmx.html
中文地址 http://www.matrix.org.cn/resource/article/2005-09-01/Tomcat_MC4J_43706.html
- tomcat集群配置.rar (107.1 KB)
- 描述: tomcat集群配置.doc apache,tomcat1,tomcat2修改后的配置文件,及测试程序
- 下载次数: 770
评论
10 楼
putonyuer
2011-12-11
好个屁 到处copy没一点技术含量
balance都写错了
balance都写错了
9 楼
kaider_qiu110
2011-09-20
试过,不行地
8 楼
wangcheng
2007-09-17
一般是Apache配的有问题
动态资源jsp,servlet由apache转发给tomcat处理
其他静态资源是由Apache处理的
我也遇到过类似情况,看下面
http://wangcheng.iteye.com/blog/103726
其中第3条可能是你需要的
动态资源jsp,servlet由apache转发给tomcat处理
其他静态资源是由Apache处理的
我也遇到过类似情况,看下面
http://wangcheng.iteye.com/blog/103726
其中第3条可能是你需要的
7 楼
piaoyaohou
2007-09-17
再补充一下:
apeche的地址172.20.56.75
tomcat1 :172.20.56.76
tomcat2 :172.20.56.77
apeche的地址172.20.56.75
tomcat1 :172.20.56.76
tomcat2 :172.20.56.77
6 楼
piaoyaohou
2007-09-17
access.log
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/v-login.jsp HTTP/1.1" 200 3859
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/base/lookAndFeel/css/base.css HTTP/1.1" 404 325
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/base/lookAndFeel/css/component.css HTTP/1.1" 404 330
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/base/behavior/base.js HTTP/1.1" 404 317
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/base/component/tree/lookAndFeel/css/tree.css HTTP/1.1" 404 340
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/base/component/tree/behavior/tree.js HTTP/1.1" 404 332
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/base/component/grid/lookAndFeel/css/grid.css HTTP/1.1" 404 340
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/base/component/grid/behavior/grid.js HTTP/1.1" 404 332
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logonlookAndFeel/css//logon.css HTTP/1.1" 404 327
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/logon.js HTTP/1.1" 404 310
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/lookAndFeel/css/logon.css HTTP/1.1" 404 327
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/lookAndFeel/image/loginButton2.gif HTTP/1.1" 404 336
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/logon.js HTTP/1.1" 404 310
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/lookAndFeel/image/loginButton1.gif HTTP/1.1" 404 336
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/lookAndFeel/image/content_bg.gif HTTP/1.1" 404 334
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/lookAndFeel/image/header.jpg HTTP/1.1" 404 330
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/lookAndFeel/image/login_icon.gif HTTP/1.1" 404 334
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/lookAndFeel/image/password_icon.gif HTTP/1.1" 404 337
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/lookAndFeel/image/bottom.gif HTTP/1.1" 404 330
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/v-login.jsp HTTP/1.1" 200 3859
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/base/lookAndFeel/css/base.css HTTP/1.1" 404 325
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/base/lookAndFeel/css/component.css HTTP/1.1" 404 330
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/base/behavior/base.js HTTP/1.1" 404 317
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/base/component/tree/lookAndFeel/css/tree.css HTTP/1.1" 404 340
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/base/component/tree/behavior/tree.js HTTP/1.1" 404 332
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/base/component/grid/lookAndFeel/css/grid.css HTTP/1.1" 404 340
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/base/component/grid/behavior/grid.js HTTP/1.1" 404 332
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logonlookAndFeel/css//logon.css HTTP/1.1" 404 327
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/logon.js HTTP/1.1" 404 310
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/lookAndFeel/css/logon.css HTTP/1.1" 404 327
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/lookAndFeel/image/loginButton2.gif HTTP/1.1" 404 336
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/logon.js HTTP/1.1" 404 310
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/lookAndFeel/image/loginButton1.gif HTTP/1.1" 404 336
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/lookAndFeel/image/content_bg.gif HTTP/1.1" 404 334
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/lookAndFeel/image/header.jpg HTTP/1.1" 404 330
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/lookAndFeel/image/login_icon.gif HTTP/1.1" 404 334
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/lookAndFeel/image/password_icon.gif HTTP/1.1" 404 337
172.20.56.75 - - [17/Sep/2007:14:00:34 +0800] "GET /MyViki/logon/lookAndFeel/image/bottom.gif HTTP/1.1" 404 330
5 楼
piaoyaohou
2007-09-17
mod_jk.log
[Mon Sep 17 14:00:27 2007] [2300:2880] [warn] jk_map.c (379): The attribute 'worker.controller.balanced_workers' is deprecated - please check the documentation for the correct replacement.
[Mon Sep 17 14:00:27 2007] [3036:2024] [warn] jk_map.c (379): The attribute 'worker.controller.balanced_workers' is deprecated - please check the documentation for the correct replacement.
[Mon Sep 17 14:00:27 2007] [3036:2024] [warn] jk_map.c (379): The attribute 'worker.controller.balanced_workers' is deprecated - please check the documentation for the correct replacement.
[Mon Sep 17 14:00:27 2007] [2300:2880] [warn] jk_map.c (379): The attribute 'worker.controller.balanced_workers' is deprecated - please check the documentation for the correct replacement.
[Mon Sep 17 14:00:27 2007] [3036:2024] [warn] jk_map.c (379): The attribute 'worker.controller.balanced_workers' is deprecated - please check the documentation for the correct replacement.
[Mon Sep 17 14:00:27 2007] [3036:2024] [warn] jk_map.c (379): The attribute 'worker.controller.balanced_workers' is deprecated - please check the documentation for the correct replacement.
4 楼
piaoyaohou
2007-09-17
错误日志我帖出来
error.log
[Mon Sep 17 14:00:27 2007] [notice] Parent: Received restart signal -- Restarting the server.
[Mon Sep 17 14:00:27 2007] [notice] Child 3744: Exit event signaled. Child process is ending.
[Mon Sep 17 14:00:27 2007] [notice] Apache/2.0.59 (Win32) mod_jk/1.2.21 configured -- resuming normal operations
[Mon Sep 17 14:00:27 2007] [notice] Server built: Jul 27 2006 15:55:03
[Mon Sep 17 14:00:27 2007] [notice] Parent: Created child process 3036
[Mon Sep 17 14:00:27 2007] [notice] Child 3036: Child process is running
[Mon Sep 17 14:00:28 2007] [notice] Child 3744: Released the start mutex
[Mon Sep 17 14:00:28 2007] [notice] Child 3036: Acquired the start mutex.
[Mon Sep 17 14:00:28 2007] [notice] Child 3036: Starting 250 worker threads.
[Mon Sep 17 14:00:29 2007] [notice] Child 3744: Waiting for 250 worker threads to exit.
[Mon Sep 17 14:00:29 2007] [notice] Child 3744: All worker threads have exited.
[Mon Sep 17 14:00:29 2007] [notice] Child 3744: Child process is exiting
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
error.log
[Mon Sep 17 14:00:27 2007] [notice] Parent: Received restart signal -- Restarting the server.
[Mon Sep 17 14:00:27 2007] [notice] Child 3744: Exit event signaled. Child process is ending.
[Mon Sep 17 14:00:27 2007] [notice] Apache/2.0.59 (Win32) mod_jk/1.2.21 configured -- resuming normal operations
[Mon Sep 17 14:00:27 2007] [notice] Server built: Jul 27 2006 15:55:03
[Mon Sep 17 14:00:27 2007] [notice] Parent: Created child process 3036
[Mon Sep 17 14:00:27 2007] [notice] Child 3036: Child process is running
[Mon Sep 17 14:00:28 2007] [notice] Child 3744: Released the start mutex
[Mon Sep 17 14:00:28 2007] [notice] Child 3036: Acquired the start mutex.
[Mon Sep 17 14:00:28 2007] [notice] Child 3036: Starting 250 worker threads.
[Mon Sep 17 14:00:29 2007] [notice] Child 3744: Waiting for 250 worker threads to exit.
[Mon Sep 17 14:00:29 2007] [notice] Child 3744: All worker threads have exited.
[Mon Sep 17 14:00:29 2007] [notice] Child 3744: Child process is exiting
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
[Mon Sep 17 14:00:34 2007] [error] [client 172.20.56.75] File does not exist: D:/Apache Group/Apache2/htdocs/MyViki, referer: http://172.20.56.75/MyViki/logon/v-login.jsp
3 楼
piaoyaohou
2007-09-17
我按照您的写法做的,怎么网站的图片地址访问不到啊?
我在三台机器上进行测试的,一台运行apeche,另两台运行tomcat,通过apeche 的机器访问网站地址
我在三台机器上进行测试的,一台运行apeche,另两台运行tomcat,通过apeche 的机器访问网站地址
2 楼
cowboy811004
2007-09-12
好东西,获益了!
1 楼
wlghd
2007-07-11
这么好的东西怎么没人顶啊?过段时间试下!
发表评论
-
实时监控服务器的工具
2011-06-24 10:37 1570http://newrelic.com/ h ... -
设置Tomcat的JAVA_OPTS参数
2011-06-23 14:17 38970修改 TOMCAT/bin/catalina.bat 添加s ... -
PD4ML将Html导出PDF
2011-04-21 22:34 2326http://pd4ml.com/ 可以通过命令行,或 ... -
Google Data Centers List for SEO
2010-08-18 10:00 1777爬取Google的数据,有时被Block,可以让程序随机跳换I ... -
Google AuthenticationException: 403: Invalid AuthSub token
2010-08-06 23:04 2462给客户的网站做了Google Authentication认证 ... -
JavaMail配置SSL服务器及安装证书
2010-02-26 17:40 25489客户给的邮件服务器要SSL,使用Spring的JavaMail ... -
使用apache-cxf-2.2.5生成WebService客户端时List属性没有Setter方法
2010-01-25 14:14 7469用apache-cxf-2.2.5来生成Google Adwo ... -
使用Gson将Java对象转换为JSON
2009-12-17 19:55 32198Gson是Google的一个开源项目,可以将Java对象转换成 ... -
从Quartz数据库中删除cron trigger
2009-09-22 12:24 3644要删除quartz的cron类型的trigger,从qrtz_ ... -
解决Spring中使用quartz发生NotSerializableException methodInvoker的问题
2009-09-15 21:52 18174Spring2.5 + quartz1.6.5 发生如下异常 ... -
Hibernate的HQL中使用left join
2009-09-02 12:50 8042业务为: 消费者 - 订单 - 所购产品 - 产品评论 ... -
htmlparser在分析RemarkNode注释时的bug
2009-07-29 22:44 2947在使用 htmlparser1.6 分析一段Html时发现 ... -
Java查询获取Google PageRank
2009-06-19 11:44 3660Java代码如下 import java.net.UR ... -
Eclipse快捷键
2009-06-12 15:49 1383Eclipse 快捷键 Ctrl + Shift + ... -
使用TCPMonitor监控WebService SOAP消息
2009-05-11 16:13 10228使用Apache axis的TCPMonitor可以监控Web ... -
在EJB3的WebService方法中获取HttpServletRequest对象
2009-04-16 17:18 3373在EJB3写的WebService中获取HttpServlet ... -
修改server.xml文件从外网访问JBoss
2009-04-15 21:55 6526从外网访问JBoss,可以加启动参数 run -b 0.0.0 ... -
通过IP访问JBoss失败的问题
2008-10-29 16:04 2133用WTP启动JBoss,通过IP访问JBoss Server ... -
禁用Eclipse的Subclipse插件
2008-09-05 12:06 4539要禁用Eclipse的Subclipse插件 Help - ... -
POJO加Annotation做validation验证
2008-08-27 12:22 2175写了一个POJO + Annotation来做validati ...
相关推荐
【标题】:“Tomcat集群配置” 在Web应用的高可用性和可扩展性需求日益增长的今天,Tomcat集群成为了一个重要的解决方案。Tomcat集群能够通过负载均衡和故障转移来提高服务的稳定性和性能。以下是对Tomcat集群配置...
Apache + Tomcat 集群配置 Apache + Tomcat 集群配置是指将 Apache 服务器与 Tomcat 服务器集成,以提高服务器的性能和可扩展性。本文将详细介绍如何配置 Apache + Tomcat 集群,包括安装 Apache 和 Tomcat 服务器...
Apache+Tomcat集群配置,Apache+Tomcat集群配置,Apache+Tomcat集群配置
当我们需要处理高并发、负载均衡或提高应用可用性时,单个Tomcat实例可能无法满足需求,这时就需要进行Tomcat集群配置。本资料包包含了“tomcat集群配置”的程序及文档,提供了现成的例子,帮助我们理解和实践Tomcat...
当我们谈论“tomcat集群配置文件”时,我们指的是将多个Tomcat实例组织成一个集群,以提高应用程序的可用性和可伸缩性。在集群环境中,负载均衡、故障转移和资源共享是关键特性。 首先,要配置Tomcat集群,你需要...
**二、Tomcat集群配置步骤** 1. **安装多个Tomcat实例**:首先,你需要在不同的服务器上或同一服务器的不同端口上安装并启动多个Tomcat实例。 2. **配置共享目录**:为确保集群内的节点共享session信息,需要设置...
Apache+Tomcat集群配置续Apache+Tomcat集群配置续Apache+Tomcat集群配置续Apache+Tomcat集群配置续
nginx + tomcat 集群配置 负载 nginx 下载地址: http://nginx.org/en/download.html 联合tomcat 实现集群 windows: Nginx.conf 配置 //见文件夹下面的nginx.conf 更改tomcat的配置: 第一处端口...
### Apache和Tomcat集群配置详解 #### 一、软件准备 在进行Apache和Tomcat集群配置之前,首先需要准备所需的软件资源。 - **Apache 2.2**: - Windows平台: 从官方网站 [http://httpd.apache.org/download.cgi]...
### Tomcat集群配置详解 #### 1. 配置方案 在描述中提到了三种配置方案: 1. **使用Apache2.2中的mod_ajp集成Tomcat5.5**:这种方案通过Apache的mod_ajp模块,使Apache能够与Tomcat通过AJP协议通信,从而实现请求...
以下是对Apache与Tomcat集群配置的详细解析: 1. **Apache HTTP Server配置**: - Apache通常作为前端代理服务器,接收来自客户端的HTTP请求,并通过AJP协议将这些请求转发给Tomcat实例。 - 在`httpd.conf`配置...
本篇文章将详细探讨如何在Redis+Tomcat集群配置中实现Session共享。 首先,我们需要理解什么是Session。Session是Web应用中用于存储用户状态的一种机制,通常用于保存用户的登录信息、购物车等数据。在单台服务器...
**二、Tomcat集群配置** 1. **安装Tomcat**:下载并安装两个Tomcat实例,分别监听不同的端口(如上述8080和8081)。 2. **复制共享session配置**:由于集群中的各个Tomcat实例需要共享session,所以需要在每个...
以下将详细介绍Nginx与Tomcat集群配置以及Redis配置的相关知识点。 ### Nginx的编译与安装 1. **安装编译环境**:在安装Nginx前,需要确保系统已经安装了必要的编译工具,如GCC、Make等。同时,可能还需要安装pcre...