Tomcat 8.5.51 - secretRequired="false" 的问题

Tomcat 8.5.51 - Issues with secretRequired="false"

添加到 AJP 连接器的 secretRequired="false" 选项是 server.xml。但是,连接器不以 Protocol handler start failed 错误开头。它支持 Apache 服务器版本 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.

谢谢

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

有关此问题的详细信息,请参阅以下网址:
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

添加 address 属性并指定环回地址是我在 Tomcat 8.5.54 上工作的方法。

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" address="0.0.0.0" secretRequired="false" />