当来自F5负载平衡器虚拟IP时,Tomcat 8.5不提供http请求

当来自F5负载平衡器虚拟IP时,Tomcat 8.5不提供http请求,tomcat,f5,Tomcat,F5,我在尝试从Tomcat 8.5.23访问页面时遇到问题 当使用安装Tomcat的Tomcat服务器的IP地址/主机名或从其他生产服务器访问Tomcat时,Tomcat能够提供页面服务,并且Tomcat服务器localhost\u access\u log被更新 URL就像http://localhost:8080/App/status-将返回日期、时间 但当请求使用F5虚拟IP地址http://F5ipaddress:8080/App/status,不提供任何页面,并且Tomcat服务器loca

我在尝试从Tomcat 8.5.23访问页面时遇到问题

当使用安装Tomcat的Tomcat服务器的IP地址/主机名或从其他生产服务器访问Tomcat时,Tomcat能够提供页面服务,并且Tomcat服务器
localhost\u access\u log
被更新

URL就像
http://localhost:8080/App/status
-将返回日期、时间

但当请求使用F5虚拟IP地址
http://F5ipaddress:8080/App/status
,不提供任何页面,并且Tomcat服务器
localhost\u access\u log
不会得到任何请求的更新

我已经用CORS过滤器更新了
web.xml
,认为这可能是由于IP差异造成的。但是没有运气

相同的应用程序和配置在开发和测试环境中运行良好

F5是Prod与其他环境之间的差异

Wireshark跟踪显示请求正在通过F5,并且没有来自Tomcat的响应

在其中一个wireshark数据包中,可以看到以下内容。但Tomcat日志中没有与此相关的更新

<title>Runtime Error</title>
<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>
<h2> <i>Runtime Error</i> </h2></span>
<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">
<b> Description: </b>An application error occurred on the server. The                   current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
<br><br>
<b>Details:</b> To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".<br><br>
运行时错误
“/”应用程序中出现服务器错误。
运行时错误 描述:服务器上发生应用程序错误。此应用程序的当前自定义错误设置阻止远程查看应用程序错误的详细信息(出于安全原因)。但是,本地服务器上运行的浏览器可以查看它。

详细信息:要在远程计算机上查看此特定错误消息的详细信息,请在位于当前web应用程序根目录中的“web.config”配置文件中创建一个标记。然后,此标记的“模式”属性应设置为“关闭”。


问题在于F5监视器配置

配置的F5监视器“接收字符串”参数与Tomcat 8.5头响应不匹配

F5“receive string”参数配置为“HTTP/1.1 200 OK”,其中as Tomcat 8.5响应为“HTTP/1.1 200”

由于字符串存在差异,F5无法为请求提供服务

一旦将F5“接收字符串”参数配置为“HTTP/1.1 200”,请求将通过F5服务

在测试环境中,F5“接收字符串”参数和Tomcat 8.5响应头与“HTTP/1.1 200 OK”相同


Tomcat 8.5放弃了对原因短语的支持

您可以在连接器配置中重新启用它,但它将在Tomcat9中消失