gpt4 book ai didi

tomcat - Docker 为 Tomcat 集群编写错误加载 conf/server.xml 文件

转载 作者:行者123 更新时间:2023-11-28 22:26:01 25 4
gpt4 key购买 nike

我在运行 docker-compose 文件时遇到此错误。

WARNING [main] org.apache.catalina.startup.Catalina.load Catalina.start 
using conf/server.xml: Error at (134, 114) :
org.apache.catalina.tribes.group
.interceptors.MessageDispatch15Interceptor

SEVERE [main] org.apache.catalina.startup.Catalina.start Cannot start server.
Server instance is not configured.

Tomcat 配置文件/server.xml :

<?xml version='1.0' encoding='utf-8'?>

<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>

<Service name="Catalina">

<Connector port="10080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="10443" />

<Connector port="10009" protocol="AJP/1.3" redirectPort="10443" />

<Engine name="Catalina" defaultHost="localhost">

<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="8">

<Manager className="org.apache.catalina.ha.session.DeltaManager"
expireSessionsOnShutdown="false"
notifyListenersOnReplication="true"/>

<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="auto"
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"/>
</Sender>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
</Channel>

<Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
filter=""/>
<Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>


<ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
</Cluster>

<Realm className="org.apache.catalina.realm.LockOutRealm">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
</Realm>

<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">

<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />

</Host>
</Engine>
</Service>
</Server>

最佳答案

仅供引用:我能够通过降级到 Tomcat7 并且不使用 MessageDispatch15Interceptor 来让它工作:https://github.com/djangofan/docker-tomcat7-cluster

关于tomcat - Docker 为 Tomcat 集群编写错误加载 conf/server.xml 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44338276/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com