【问题标题】:Varnish failing to detect valid probe pageVarnish 无法检测到有效的探测页面
【发布时间】:2017-02-02 02:33:55
【问题描述】:

SpringBoot 应用程序 (1.4) 中的 Varnish 3.x 探测页面出现问题。 Varnish 未能检测到探测页面(返回 503 SERVICE NOT AVAILABLE),因此无法路由。

当我手动 ping 探测 URL 时,它工作正常,但 Varnish 将探测页面标记为已关闭。

删除探测页面,一切正常。

指向静态探测页面 (my.css) 或任何其他静态或动态 URL 失败。

查看日志,响应头是这样的:

HTTP/1.1 200 
Content-Type: text/plain;charset=utf-8
Content-Length: 72
Date: Wed, 01 Feb 2017 15:20:48 GMT
Proxy-Connection: Keep-Alive
Connection: Keep-Alive

将此与其他工作(非 Spring Boot)应用程序进行比较,唯一的区别是工作应用程序在响应后有一个 OK,而坏的则没有: HTTP/1.1 200 正常 这意味着什么?

例如,这是一个很好的例子:

HTTP/1.1 200 OK
Date: Wed, 01 Feb 2017 14:04:18 GMT
Last-Modified: Fri, 11 Nov 2016 22:00:02 GMT
Content-Type: text/css
Content-Length: 129
Server: Jetty(9.3.z-SNAPSHOT)
Proxy-Connection: Keep-Alive
Connection: Keep-Alive

这是 SpringBoot 问题吗?不知道还能去哪里看!

有什么线索吗?

【问题讨论】:

    标签: spring-boot varnish


    【解决方案1】:

    清漆支持已回复

    您发现了问题:https://github.com/varnishcache/varnish-cache/issues/2069

    这在 master 中是“固定的”。但也许你可以修复你的后端?

    现在看看如何更改 Spring Boot 响应消息!

    【讨论】:

      猜你喜欢
      • 2014-06-22
      • 2018-02-04
      • 1970-01-01
      • 2021-01-31
      • 2020-12-30
      • 2018-02-07
      • 1970-01-01
      • 2022-07-19
      • 1970-01-01
      相关资源
      最近更新 更多