CF Spring启动应用程序无法开始接受连接

时间:2017-06-20 12:04:06

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

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

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

该应用程序工作正常至今。然后我想把这个应用程序作为服务代理。所以我再次使用spring boot cloud代工服务经纪人。 并实现了与示例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自动为我的应用程序分配一个端口

最诚挚的问候, Saurav

1 个答案:

答案 0 :(得分:0)

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

我知道这并不能说明根本原因。但可能是一个spring boot / cloud代工框架开发人员可以告诉根本原因。

我想强调一点。

该应用程序是作为Spring启动云代工服务代理开发的。最初,当我部署了应用程序时,它为我询问了用户名/密码。我之前不知道这件事。可能会给出错误的用户名和密码,然后按取消。 之后,应用程序抛出了上述错误。

但必须注意的是,Spring引导云代工服务代理应用程序已经内置了Spring启动身份验证,其中密码已经生成,用户名为“user”。

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

我不知道这是不是原因。但删除和重新部署与我合作。

最诚挚的问候, Saurav