我有使用Python 2.7
框架的API
Google Cloud Endpoints
服务器。我按照GitHub上的示例进行操作,并按照文档中的说明对服务和配置进行编码。
当我尝试使用
部署端点时gcloud endpoints services deploy echov1openapi.json
使用我的api json文件,出现错误:
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.
我确认已启用所有必需的API。
我尝试使用debug
选项运行部署命令:
gcloud --verbosity=debug endpoints services deploy echov1openapi.json
在终端中没有任何其他错误或其他错误
我还检查了官方的疑难解答页面,但未描述此问题。
即使我尝试从GitHub部署官方示例,也遇到了同样的问题
这是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.