简体   繁体   中英

Deploying Angular-Fullstack (MEAN) on Google App Engine

I've generated a project with Yeoman Angular-Fullstack generator ( https://github.com/angular-fullstack/generator-angular-fullstack ).

I created an app.yaml and tried to deploy the project on GAE with command:

gcloud app deploy

But I'm getting an error:

ERROR: (gcloud.app.deploy) Error Response: [13] Timed out when starting VMs.  It's possible that the application code is unhealthy.  (0/2 ready, 2 still deploying).

Any tips on how to debug the gcloud deploy? I'm running the latest gcloud SDK.

--

Here's a longer debug trace:

Updating service [default]...-DEBUG: Operation [apps/<MY-PROJECT>/operations/63e50c89-da5f-4697-aeea-447865a82cc4] not complete. Waiting 5s.
Updating service [default]...|DEBUG: Operation [apps/<MY-PROJECT>/operations/63e50c89-da5f-4697-aeea-447865a82cc4] complete. Result: {
    "metadata": {
        "target": "apps/<MY-PROJECT>/services/default/versions/20160804t151734", 
        "method": "google.appengine.v1beta5.Versions.CreateVersion", 
        "user": "<MY-EMAIL>@gmail.com", 
        "insertTime": "2016-08-04T12:16:31.905Z", 
        "endTime": "2016-08-04T12:24:03.526Z", 
        "@type": "type.googleapis.com/google.appengine.v1beta5.OperationMetadataV1Beta5"
    }, 
    "done": true, 
    "name": "apps/<MY-PROJECT>/operations/63e50c89-da5f-4697-aeea-447865a82cc4", 
    "error": {
        "message": "Timed out when starting VMs.  It's possible that the application code is unhealthy.  (0/2 ready, 2 still deploying).", 
        "code": 13
    }
}
Updating service [default]...failed.
DEBUG: (gcloud.app.deploy) Error Response: [13] Timed out when starting VMs.  It's possible that the application code is unhealthy.  (0/2 ready, 2 still deploying).
Traceback (most recent call last):
  File "/Users/jp/softaa/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 719, in Execute
    result = args.calliope_command.Run(cli=self, args=args)
  File "/Users/jp/softaa/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 1404, in Run
    resources = command_instance.Run(args)
  File "/Users/jp/softaa/google-cloud-sdk/lib/surface/app/deploy.py", line 57, in Run
    return deploy_util.RunDeploy(self, args)
  File "/Users/jp/softaa/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 215, in RunDeploy
    api_client.DeployService(name, version, service, manifest, image)
  File "/Users/jp/softaa/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/appengine_api_client.py", line 89, in DeployService
    return operations.WaitForOperation(self.client.apps_operations, operation)
  File "/Users/jp/softaa/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/api/operations.py", line 70, in WaitForOperation
    encoding.MessageToPyValue(completed_operation.error)))
OperationError: Error Response: [13] Timed out when starting VMs.  It's possible that the application code is unhealthy.  (0/2 ready, 2 still deploying).
ERROR: (gcloud.app.deploy) Error Response: [13] Timed out when starting VMs.  It's possible that the application code is unhealthy.  (0/2 ready, 2 still deploying).

If your question is just about finding the cause of this error, I would recommend using the Development Server on your localhost to find the error. Without taking a deeper look, I guess the Node part does not fulfil the requirements for GAE or you are trying to deploy to a region where Node Applications are not supported.

GAE does not come with Mongo. You have two options

  1. Use GAE flex and build your own mongo container and use it
  2. Use a Mongo cloud provider like https://mlab.com and they even have a free version to test.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM