我正在尝试在同一项目下的App Engine(GCP)上部署两个服务。我已经使用以下 yaml文件部署了第一个服务(默认):
runtime: nodejs
env: flex
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
此第一项服务已正确部署。几天后,我尝试以不同的服务名称:
部署新应用service: test-app
runtime: nodejs
env: flex
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
第二个应用程序是创建新的React应用程序时拥有的初始“空白”应用程序。但是,我遇到以下错误:
Updating service [test-app] (this may take several minutes)...failed.
ERROR: (gcloud.app.deploy) Error Response: [9]
Application startup error! Code: APP_CONTAINER_CRASHED
我尝试删除每个文件的资源(在网上找到此解决方案之后),但是并没有解决我的问题。我在网上找不到很多有关此问题的文档。从我可以在GCP上访问的日志来看,第二项服务似乎已正确构建。
如果您对这个问题有任何想法,请告诉我。
将详细程度设置为要调试,我有:
Updating service [test-app] (this may take several minutes)...\DEBUG: Operation [apps/***/operations/***-***-***-***-***] not complete. Waiting to retry.
Updating service [test-app] (this may take several minutes)...-DEBUG: Operation [apps/***/operations/***-***-***-***-***] complete. Result: {
"metadata": {
"user": "***",
"target": "***",
"@type": "type.googleapis.com/google.appengine.v1.OperationMetadataV1",
"insertTime": "2020-04-14T17:12:37.283Z",
"method": "google.appengine.v1.Versions.CreateVersion"
},
"done": true,
"name": "***",
"error": {
"message": "Application startup error! Code: APP_CONTAINER_CRASHED>
test-app@0.1.0 start /app>
react-scripts start
[34m\u2139\u001b[39m \u001b[90m\uff62wds\uff63\u001b[39m: Project is running at http://172.
[34m\u2139\u001b[39m \u001b[90m\uff62wds\uff63\u001b[39m: webpack output is served from
[34m\u2139\u001b[39m \u001b[90m\uff62wds\uff63\u001b[39m: Content not from webpack is served from /app/public
[34m\u2139\u001b[39m \u001b[90m\uff62wds\uff63\u001b[39m: 404s will fallback to
Starting the development server...",
"code": 9
}
}
Updating service [test-app] (this may take several minutes)...failed.
DEBUG: (gcloud.app.deploy) Error Response: [9]
Application startup error! Code: APP_CONTAINER_CRASHED