【问题标题】:CF Spring boot app failed to start accepting connectionsCF Spring boot 应用程序无法开始接受连接
【发布时间】:2017-06-20 12:04:06
【问题描述】:

我开发了一个 Spring boot 应用程序,连接到本地运行的 Postgresql 实例。

现在我将应用程序部署到 Cloud Foundry 本地 bosh lite 安装。我为 postgresql 创建了一个用户提供的服务并将其绑定到我的应用程序。

到目前为止,该应用程序运行良好。然后我想将此应用程序作为服务代理。所以我再次使用了 Spring Boot Cloud Foundry 服务代理。 并实现了与示例 mongodb spring boot 服务代理相同的代码。 https://github.com/spring-cloud-samples/cloudfoundry-service-broker

但是现在当我尝试启动应用程序时。它失败并出现以下错误。

    2017-06-20T17:16:19.82+0530 [DEA/0] OUT Starting app instance (index 0) with guid 65b656e1-fbe4-4a7f-bc34-6c410dbb3a4e
2017-06-20T17:16:23.07+0530 [DEA/0] ERR Instance (index 0) failed to start accepting connections
2017-06-20T17:16:23.09+0530 [API/0] OUT App instance exited with guid 65b656e1-fbe4-4a7f-bc34-6c410dbb3a4e payload: {"cc_partition"=>"default", "droplet"=>"65b656e1-fbe4-4a7f-bc34-6c410dbb3a4e", "version"=>"432ef489-14e3-44d7-bab8-bdd64bc8d9d3", "instance"=>"9bf4bd1c3a8741508a6b33da9ba76400", "index"=>0, "reason"=>"CRASHED", "exit_status"=>127, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1497959183}
2017-06-20T17:16:23.09+0530 [API/0] OUT App instance exited with guid 65b656e1-fbe4-4a7f-bc34-6c410dbb3a4e payload: {"cc_partition"=>"default", "droplet"=>"65b656e1-fbe4-4a7f-bc34-6c410dbb3a4e", "version"=>"432ef489-14e3-44d7-bab8-bdd64bc8d9d3", "instance"=>"9bf4bd1c3a8741508a6b33da9ba76400", "index"=>0, "reason"=>"CRASHED", "exit_status"=>127, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1497959183}

我在网上搜索,似乎错误与端口有关,并且端口无法访问。 https://github.com/cloudfoundry/cf-release/issues/649

但我没有为我的应用程序定义任何端口,我希望 CF 自动为我的应用程序分配一个端口

最好的问候, 索拉夫

【问题讨论】:

    标签: spring spring-boot cloud-foundry spring-cloud spring-cloud-connectors


    【解决方案1】:

    我已删除应用程序,然后再次部署。 它开始工作了。

    我知道这并不能说明根本原因。但可能是spring boot/cloud Foundry框架的开发者能说出根本原因。

    我想强调一点。

    该应用程序是作为 Spring Boot Cloud Foundry 服务代理开发的。最初,当我部署该应用程序时,它要求我输入用户名/密码。我之前并不知道这件事。可能输入了错误的用户名和密码,然后按了取消。 之后应用程序抛出上述错误。

    但需要注意的是,Spring Boot Cloud Foundry 服务代理应用程序已经内置了 Spring Boot 身份验证,其中密码已经生成,用户名为“user”。

    在此处查看更多详细信息https://github.com/spring-cloud/spring-cloud-cloudfoundry-service-broker#security

    不知道是不是这个原因。但是删除和重新部署对我有用。

    最好的问候, 索拉夫

    【讨论】:

    • failed to start accepting connections 错误表明 CF 认为应用程序没有在预期的“健康检查超时”期限内成功启动。从提供的信息中很难说出原因。安全不应该与此有任何关系。如果它再次像这样失败,来自代理应用程序的更多日志会有所帮助。
    猜你喜欢
    • 2020-06-25
    • 1970-01-01
    • 1970-01-01
    • 2020-03-22
    • 2020-06-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-29
    相关资源
    最近更新 更多