部署到GCP的My Grails 4应用程序似乎在部署后试图启动,但始终无法正常启动。应用程序请求返回500响应。根级别的DEBUG日志级别输出没有错误或线索。
同一应用程序在开发模式下可以在本地正常运行。
生产配置按照Grails 3部署(至GCP)指南进行,除了进行使其适用于Grails 4 / Java 11所需的调整以外。
大多数自举似乎都按预期进行。
然后进入以下熟悉的输出日志记录行:
INFO --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
INFO --- [main] o.a.coyote.http11.Http11NioProtocol : Initializing ProtocolHandler ["http-nio-8080"]
INFO --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
INFO --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.17]
然后重启
通常情况下,引导的下一阶段(本地发生)将是;
[restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
[restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 42018 ms
可能是一个长期问题,但任何水平的线索或建议将不胜感激。
我用完了要打开的门。 :-(
最佳答案
您可以尝试更新Tomcat版本,以防万一。
But looking at Grails documentation:
https://docs.grails.org/latest/guide/upgrading.html
There's some configuration made when you upgrade to Grails 4 from Grails 3.3.x to prevents the server from restarting when views or message bundles are changed.
在Grails 4 M2中修改gsp都会导致应用程序重新启动。
https://github.com/grails/grails-core/issues/11284
关于spring - Grails 4-Google Cloud Platform部署不断重启,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58184950/