无法使用 OpenApi 部署 Cloud Endpoint
Failed to deploy Cloud Endpoint with OpenApi
我有 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.
根据 Cloud Endpoints Google Group Google 知道这个问题并正在积极努力解决它。
问题已解决 Google。
https://issuetracker.google.com/issues/134361013
https://groups.google.com/forum/#!topic/google-cloud-endpoints/c2jzhf-8kd4
我有 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.
根据 Cloud Endpoints Google Group Google 知道这个问题并正在积极努力解决它。
问题已解决 Google。
https://issuetracker.google.com/issues/134361013
https://groups.google.com/forum/#!topic/google-cloud-endpoints/c2jzhf-8kd4