Search code examples
pythongoogle-cloud-platformgoogle-cloud-endpointsopenapigoogle-cloud-endpoints-v2

Failed to deploy Cloud Endpoint with OpenApi


I have Python 2.7 API server using Google Cloud Endpoints framework. I follow the example from GitHub and code my service and configurations as explained in the documentation.

When I'm trying to deploy the endpoint using

gcloud endpoints services deploy echov1openapi.json

with my api json file, I get an error:

OperationErrorException: The operation with ID rollouts.MY_PROJECT_ID.appspot.com:5939cc3b-0b4a-4047-87d5-856ebdd44c0e resulted in a failure.

ERROR: (gcloud.endpoints.services.deploy) The operation with ID rollouts.MY_PROJECT_ID.appspot.com:5939cc3b-0b4a-4047-87d5-856ebdd44c0e resulted in a failure.

I validate that all required APIs are enabled.

I tried to run the deployment command with debug option:

gcloud --verbosity=debug endpoints services deploy echov1openapi.json

without any other or additional error in the terminal

I've also checked the official troubleshooting page but this issue isn't described.

Even when I tried to deploy the official example from GitHub I got the same issue

This is the log from the debug:

DEBUG: Running [gcloud.endpoints.services.deploy] with arguments: [--verbosity: "debug", SERVICE_CONFIG_FILE:1: "[u'paymentsv1openapi.json']"]
Waiting for async operation operations/serviceConfigs.MY_PROJECT_ID.appspot.com:48e87eda-7009-47a1-9625-2ca1da025500 to complete...
Operation finished successfully. The following command can describe the Operation details:
 gcloud endpoints operations describe operations/serviceConfigs.MY_PROJECT_ID.appspot.com:48e87eda-7009-47a1-9625-2ca1da025500

Waiting for async operation operations/rollouts.MY_PROJECT_ID.appspot.com:5939cc3b-0b4a-4047-87d5-856ebdd44c0e to complete...
DEBUG: (gcloud.endpoints.services.deploy) The operation with ID rollouts.MY_PROJECT_ID.appspot.com:5939cc3b-0b4a-4047-87d5-856ebdd44c0e resulted in a failure.
Traceback (most recent call last):
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 985, in Execute
    resources = calliope_command.Run(cli=self, args=args)
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 795, in Run
    resources = command_instance.Run(args)
  File "/usr/lib/google-cloud-sdk/lib/surface/endpoints/services/deploy.py", line 393, in Run
    services_util.ProcessOperationResult(rollout_operation, args.async)
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/api_lib/endpoints/services_util.py", line 481, in ProcessOperationResult
    op = GetProcessedOperationResult(result, is_async)
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/api_lib/endpoints/services_util.py", line 526, in GetProcessedOperationResult
    op_ref, GetClientInstance()))
  File "/usr/lib/google-cloud-sdk/lib/googlecloudsdk/api_lib/endpoints/services_util.py", line 583, in WaitForOperation
    'The operation with ID {0} resulted in a failure.'.format(operation_id))
OperationErrorException: The operation with ID rollouts.MY_PROJECT_ID.appspot.com:5939cc3b-0b4a-4047-87d5-856ebdd44c0e resulted in a failure.
ERROR: (gcloud.endpoints.services.deploy) The operation with ID rollouts.MY_PROJECT_ID.appspot.com:5939cc3b-0b4a-4047-87d5-856ebdd44c0e resulted in a failure.

Solution

  • The issue has been resolved due to Google.

    https://issuetracker.google.com/issues/134361013

    https://groups.google.com/forum/#!topic/google-cloud-endpoints/c2jzhf-8kd4