tomcat8 升级至apache-tomcat-9.0.31, Connector / AJP 配置报错问题

直接贴tomcat8中的 server.xml  关键配置

  <Service name="insuranceMall">
    <Connector port="6666" protocol="HTTP/1.1" connectionTimeout="20000"  redirectPort="8443" />
    <Connector port="6667" protocol="AJP/1.3" redirectPort="8443" />
    <Engine name="insuranceMall" defaultHost="localhost">
      <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">
      <Context docBase="/data/project/insurance-mall" path="" reloadable="false" />
     	 <Valve className="org.apache.catalina.valves.AccessLogValve" directory="/var/log/tomcat9" prefix="localhost_access_log_insuranceMall" suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" />
      </Host>
    </Engine>
  </Service>

同样在tomcat9 启动过程报错如下

22-Feb-2020 17:26:27.854 SEVERE [main] org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to start component [Connector[AJP/1.3-6667]]
	org.apache.catalina.LifecycleException: Protocol handler start failed
		at org.apache.catalina.connector.Connector.startInternal(Connector.java:1038)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.StandardService.startInternal(StandardService.java:438)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.lang.reflect.Method.invoke(Method.java:498)
		at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343)
		at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
	Caused by: java.lang.IllegalArgumentException: The AJP Connector is configured with secretRequired="true" but the secret attribute is either null or "". This combination is not valid.
		at org.apache.coyote.ajp.AbstractAjpProtocol.start(AbstractAjpProtocol.java:264)
		at org.apache.catalina.connector.Connector.startInternal(Connector.java:1035)
		... 12 more

The AJP Connector is configured with secretRequired="true" but the secret attribute is either null or "". This combination is not valid.

意思就是在tomcat9中 需要配置 一个属性 secretRequired

发布了59 篇原创文章 · 获赞 11 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/zhangjianming2018/article/details/104447164