17

secretRequired="false"添加到AJP连接器的选项是server.xml。但是,连接器不会以Protocol handler start failed错误开始。它位于 Apache Server 版本 2.4.25 之后。

    <Connector port="8009"
               address="127.0.0.1" tomcatAuthentication="false" URIEncoding="UTF-8" enableLookups="false"
               protocol="AJP/1.3" redirectPort="8663" connectionTimeout="600000" secretRequired="false" />

错误:

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.

谢谢

4

2 回答 2

9

address在 Tomcat 8.5.54 上添加属性并指定环回地址对我有用。

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" address="0.0.0.0" secretRequired="false" />
于 2020-05-13T20:29:23.300 回答
4

Tomcat 9.0.34 现在默认将 secretReqiured 设置为 true 以解决 CVS 问题。

有关此问题的详细信息,请参阅以下 URL:
https://access.redhat.com/solutions/4851251 https://tomcat.apache.org/tomcat-9.0-doc/config/ajp.html https://github.com/spring-projects/spring-boot/issues/20377

于 2020-04-30T01:00:12.093 回答