部署到PCF:“在1分0秒后超时:从未通过运行状况检查”

问题描述 投票:1回答:1

我正在将Spring Boot服务推向PCF。因为它连接到许多数据库,所以启动需要一分钟多的时间,超出了PCF的默认1分钟限制。这导致部署被PCF终止。当发生这种情况时,这就是我在日志中看到的内容:

2019-10-24T14:11:44.162+01:00 [CELL/0] [ERR] Timed out after 1m0s: health check never passed.
2019-10-24T14:11:44.162+01:00 [HEALTH/0] [ERR] Failed to make TCP connection to port 8080: connection refused
2019-10-24T14:11:44.168+01:00 [CELL/SSHD/0] [OUT] Exit status 0
2019-10-24T14:11:44.368+01:00 [APP/PROC/WEB/0] [OUT] Exit status 143

是否有增加1分钟超时以允许服务启动的方法?

cloudfoundry
1个回答
1
投票

在我的manifest.yml的应用程序属性中添加以下行,将超时增加到3分钟,并允许我的部署完成:

timeout: 180

可以在命令行上执行以下操作:

cf push -t 180
© www.soinside.com 2019 - 2024. All rights reserved.