CF Spring boot app failed to start accepting connections

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 11:52:22

问题


I have developed a Spring boot application connecting to Postgresql instance running on my local.

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.

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}

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

but i have not defined any port for my application and i hope CF automatically assigns a port for my application

Best Regards, Saurav


回答1:


I have deleted the application and then deployed again. It started working.

I know this does not tell the root cause . But may be a spring boot /cloud foundry framework developer can tell the root cause.

There was one point i would like to highlight.

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.

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".

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.

Best Regards, Saurav



来源:https://stackoverflow.com/questions/44652549/cf-spring-boot-app-failed-to-start-accepting-connections

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!