【问题标题】:Spring boot admin server cannot reach instances deployed in herokuSpring Boot 管理服务器无法访问部署在 Heroku 中的实例
【发布时间】:2020-01-08 13:34:42
【问题描述】:

我正在使用spring-boot-admin 库。我在 heroku 中部署了一个 Spring Boot 管理客户端。 客户端能够将自己注册到 admin-server,并将 managementUrl、healthUrl 和 serviceUrl 发送回服务器。

问题是管理客户端的执行器端点在 heroku 中无法访问。管理服务器抱怨

 Couldn't retrieve status for Instance(id=156385483, version=0, registration=Registration(name=spring-boot-application, managementUrl=http://example.heroku.com:23349/actuator, healthUrl=http://example.com:23349/actuator/health, serviceUrl=http://example,heroku.com:23349/, source=http-api), registered=true, statusInfo=StatusInfo(status=UNKNOWN, details={}), statusTimestamp=2020-01-08T13:13:32.710Z, info=Info(values={}), endpoints=Endpoints(endpoints={health=Endpoint(id=health, url=http://example.heroku.com:23349/actuator/health)}), buildVersion=null, tags=Tags(values={}))

在本地机器上运行时,管理服务器和客户端工作正常。是否可能是 heroku 的端口问题,无法访问并拒绝服务器进行的调用?

【问题讨论】:

    标签: heroku port spring-boot-admin


    【解决方案1】:

    根据documentation有一个配置管理url、服务url和健康url的规定

    因此更改它们以反映我的应用程序的公共 heroku url,而不是自动生成的 url(通过端口访问)。改变后的工作就像一个魅力。

    【讨论】:

      猜你喜欢
      • 2018-12-21
      • 2018-06-07
      • 1970-01-01
      • 2022-12-04
      • 2017-06-01
      • 2018-03-24
      • 2018-04-17
      • 2019-10-20
      • 2017-11-03
      相关资源
      最近更新 更多