Feedback
2009-08-29 19:06 |
你好,我把Apache和Tomcat整合的时候用的是jk,可以运行,但是一直存在一些问题。麻烦你一下,可以给我发一个比较完整的配置文件吗?谢谢你了。我的邮箱是xiezhuogang@126.com.
再次十分感谢
回复 更多评论
2009-08-31 00:09 |
<Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat1">
<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>-->
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="8">
<!--<Manager className="org.apache.catalina.ha.session.DeltaManager"
expireSessionsOnShutdown="false"
notifyListenersOnReplication="true"/> -->
<Manager className="org.apache.catalina.ha.session.BackupManager"
expireSessionsOnShutdown="false"
notifyListenersOnReplication="true"
mapSendOptions="6"/>
<Channel className="org.apache.catalina.tribes.group.GroupChannel">
<Membership className="org.apache.catalina.tribes.membership.McastService"
address="228.0.0.4"
port="45564"
frequency="500"
dropTime="3000"/>
<Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
address="10.25.71.35"
port="4000"
autoBind="100"
selectorTimeout="5000"
maxThreads="6"/>
<Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
<Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"
timeout="60000" keepAliveCount="0" keepAliveTime="120000" maxRetryAttempts="10"/>
</Sender>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
</Channel>
<Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
filter=""/>
<Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
<Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
tempDir="/tmp/war-temp/"
deployDir="/tmp/war-deploy/"
watchDir="/tmp/war-listen/"
watchEnabled="false"/>
<ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
<ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
</Cluster>
回复 更多评论
2009-08-31 00:10 |
注意另一台要修改为
<Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat2">
<Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
address="10.25.71.36"
回复 更多评论
2009-08-31 00:12 |
Apache的配置
workers.properties文件
# BEGIN workers.properties
# setting tomcat_home and java_home
workers.tomcat_home=/usr/local/bcinfo/webapp/apache-tomcat-6.0.20
workers.java_home=/usr/local/bcinfo/java/jdk1.6.0_10
worker.list = controller,tomcat1,tomcat2,status #server 列表
#========tomcat1========
worker.tomcat1.port=8009 #ajp13 端口号,在tomcat下server.xml配置,默认8009
worker.tomcat1.host=10.25.71.35 #tomcat的主机地址,如不为本机,请填写ip地址
worker.tomcat1.type=ajp13
worker.tomcat1.lbfactor=1 #server的加权比重,值越高,分得的请求越多
worker.tomcat1.connection_pool_timeout=750
worker.tomcat1.socket_keepalive=0
worker.tomcat1.socket_timeout=300000
worker.tomcat1.connect_timeout=10000
worker.tomcat1.reply_timeout=330000
#========tomcat2========
worker.tomcat2.port=8009 #ajp13 端口号,在tomcat下server.xml配置,默认8009
worker.tomcat2.host=10.25.71.36 #tomcat的主机地址,如不为本机,请填写ip地址
worker.tomcat2.type=ajp13
worker.tomcat2.lbfactor=1 #server的加权比重,值越高,分得的请求越多
worker.tomcat2.connection_pool_timeout=750
worker.tomcat2.socket_keepalive=0
worker.tomcat2.socket_timeout=300000
worker.tomcat2.connect_timeout=10000
worker.tomcat2.reply_timeout=330000
#========controller,负载均衡控制器========
worker.controller.type=lb
worker.controller.balance_workers=tomcat1,tomcat2 #指定分担请求的tomcat
worker.controller.sticky_session=1
worker.status.type=status
回复 更多评论
2009-09-02 17:18 |
@谢卓刚
你用的是哪个版本的apache tomcat
回复 更多评论