gpt4 book ai didi

apache - (111)连接被拒绝 - Apache 反向代理和 Tomcat 8.5.51 - Docker Compose

转载 作者:行者123 更新时间:2023-12-02 19:00:40 25 4
gpt4 key购买 nike

这适用于 Tomcat 8.5.50 .但是,使用 Tomcat 8.5.51 , Apache 无法通过 AJP 连接,出现以下错误:

[Tue Mar 10 20:15:31.378937 2020] [proxy:error] [pid 42:tid 139841308157696] (111)Connection refused: AH00957: AJP: attempt to connect to 172.28.0.5:8009 (tomcatserver) failed
[Tue Mar 10 20:15:31.379336 2020] [proxy_ajp:error] [pid 42:tid 139841308157696] [client 192.168.0.1:58054] AH00896: failed to make connection to backend: tomcatserver

Apache 的版本是 2.4.38 :
Server version: Apache/2.4.38 (Debian)
Server built: 2019-10-15T19:53:42
server.xml 中的 AJP 连接器有 secretRequired="false" .一切都是通过 Docker Compose 设置的。

最佳答案

secretRequired的配置改变的不只是:

来自 https://tomcat.apache.org/migration-85.html#Upgrading_8.5.x

  • In 8.5.51 onwards, the default listen address of the AJP Connector was changed to the loopback address rather than all addresses.
  • In 8.5.51 onwards, the requiredSecret attribute of the AJP Connector was deprecated and replaced by the secret attribute.
  • In 8.5.51 onwards, the secretRequired attribute was added to the AJP Connector. If set to true, the default, the AJP Connector will not start unless a secret has been specified.
  • In 8.5.51 onwards, the allowedRequestAttributesPattern attribute was added to the AJP Connector. Requests with unrecognised attributes will now be blocked with a 403.

Reference: AJP connector.



最重要的是,库存 server.xml 甚至对 AJPConnector 进行了注释,因此如果没有明确启用它就不会处于事件状态。

关于apache - (111)连接被拒绝 - Apache 反向代理和 Tomcat 8.5.51 - Docker Compose,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60625395/

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