CF Spring启动应用程序无法开始接受连接 [英] CF Spring boot app failed to start accepting connections
问题描述
我已经开发了一个Spring Boot应用程序,该应用程序连接到在本地运行的Postgresql实例。
I have developed a Spring boot application connecting to Postgresql instance running on my local.
现在,我将该应用程序部署到了Cloud Foundry本地bosh lite安装中。我为postgresql创建了一个用户提供的服务,并将其绑定到我的应用程序。
Now i deployed the application to Cloud foundry local bosh lite installation. I created one user provided service for postgresql and bound it to my application.
该应用程序到目前为止运行良好。然后,我想将此应用程序作为服务代理。所以我再次使用了Spring Boot Cloud Foundry Service Broker。
并实现了与示例mongodb spring boot服务代理相同的代码。
https://github.com/spring-cloud-samples/ cloudfoundry-service-broker
The app is working fine till now. Then i wanted to make this application as a service broker. So i again used spring boot cloud foundry service broker. And implemented my code same as the sample mongodb spring boot service broker. https://github.com/spring-cloud-samples/cloudfoundry-service-broker
但是现在当我尝试启动该应用程序时。失败并出现以下错误。
But now when i am trying to start the application. It is failing with following error.
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
I searched over the net, it seems the error is related to ports and when the port is inaccessible. https://github.com/cloudfoundry/cf-release/issues/649
但我尚未为我的应用程序定义任何端口,我希望CF为我的应用程序自动分配一个端口
but i have not defined any port for my application and i hope CF automatically assigns a port for my application
最好的问候,
Saurav
Best Regards, Saurav
推荐答案
我已经删除了应用程序,然后再次部署。
它开始工作。
I have deleted the application and then deployed again. It started working.
我知道这并不能说明根本原因。但是也许是一个春季启动/ cloud铸造框架开发人员可以说出根本原因。
I know this does not tell the root cause . But may be a spring boot /cloud foundry framework developer can tell the root cause.
我想强调一点。
该应用程序是作为Spring Boot Cloud Foundry Service Broker开发的,最初,当我部署该应用程序时,它向我询问用户名/密码。我以前不知道这一点。可能输入了错误的用户名和密码,然后按取消。
之后,该应用程序将引发上述错误。
The application is developed as a spring boot cloud foundry service broker Initally when i had deployed the application, it asked an username/password for me . I did not know about this earlier. Might have given wrong usernames and password and then pressed cancel. After that the application was throwing the above error.
但是必须注意,Spring Boot Cloud Foundry Service Broker应用程序已经内置了Spring Boot身份验证
But it has to be noted that a spring boot cloud foundry service broker application already has spring boot authentication built in where password is already generated with username being "user".
在此处查看更多详细信息 https://github.com/spring-cloud/spring-cloud-cloudfoundry-service-broker#security
Check more details here https://github.com/spring-cloud/spring-cloud-cloudfoundry-service-broker#security
我不知道这是为什么。但是删除和重新部署与我合作。
I don't know if this was the reason. But a delete and redeploy worked with me.
最好的问候,
Saurav
Best Regards, Saurav
这篇关于CF Spring启动应用程序无法开始接受连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!