我已经在 openshift 中部署了在 spring boot 上运行的服务。spring boot 服务初始化良好,我们看到下面的日志很好。
2020-05-06 19:32:33.930 INFO 1 --- [ main] c.a.r.l.MyApplication : Started MyApplication in 44.227 seconds (JVM running for 67.578)
2020-05-06 19:32:38.706 INFO 1 --- [nio-8198-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-05-06 19:32:38.709 INFO 1 --- [nio-8198-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2020-05-06 19:32:38.802 INFO 1 --- [nio-8198-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 93 ms
但是容器就绪状态显示 0/1,5 分钟后我看到此警告并且 pod 重新启动。
The container has been running for more than five minutes and has not passed its readiness check
我明白了
Readiness probe failed: HTTP probe failed with statuscode: 404
有什么问题?