简介:
本文档介绍如何排除Google Cloud与CloudCenter Manager(CCM)版本4.8.0/4.7.x的集成故障。
先决条件
要求
Cisco 建议您了解以下主题:
使用的组件
本文档中的信息基于以下软件版本:
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
背景信息
成功将GCE协调器(CCO)添加到CCM并尝试通过部署应用(包括实例类型和区域的选择)来测试环境后,在尝试选择项目时会显示错误消息,如图所示:
问题
在CCM渗透日志中,您会发现以下错误:
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:45,991 INFO impl.CloudPropertiesServiceImpl [asyncOperationExecutor-6] - cloud property task is invoked
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,006 INFO impl.CloudManagementServiceImpl [asyncOperationExecutor-6] - cloud data is not null
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,006 INFO impl.CloudManagementServiceImpl [asyncOperationExecutor-6] - got the region end point as null
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,011 INFO impl.CloudPropertiesServiceImpl [asyncOperationExecutor-7] - cloud property task is invoked
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,014 INFO impl.CloudPropertiesServiceImpl [asyncOperationExecutor-8] - cloud property task is invoked
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,024 INFO impl.CloudManagementServiceImpl [asyncOperationExecutor-7] - cloud data is not null
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,024 INFO impl.CloudManagementServiceImpl [asyncOperationExecutor-7] - got the region end point as null
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,032 INFO impl.CloudManagementServiceImpl [asyncOperationExecutor-8] - cloud data is not null
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,032 INFO impl.CloudManagementServiceImpl [asyncOperationExecutor-8] - got the region end point as null
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,765 ERROR impl.CloudPropertiesServiceImpl [asyncOperationExecutor-6] - Failed to getCloudPropertiesFromGateway from gateway for propertyType : Project
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,765 ERROR impl.CloudPropertiesServiceImpl [asyncOperationExecutor-6] - 500 Internal Server Error
org.springframework.web.client.HttpServerErrorException: 500 Internal Server Error
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:94)
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:641)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:597)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:557)
at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:357)
at com.osmosix.commons.util.AjaxUtil.postJson(AjaxUtil.java:117)
at com.osmosix.mgmt.cloud.impl.CloudPropertiesServiceImpl.getCloudPropertiesFromGateway(CloudPropertiesServiceImpl.java:365)
at com.osmosix.mgmt.cloud.impl.CloudPropertiesServiceImpl$CloudPropertyTask.run(CloudPropertiesServiceImpl.java:461)
at com.osmosix.commons.operation.impl.AsyncOperationServiceImpl$2.run(AsyncOperationServiceImpl.java:134)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
但是,如果你去CCO渗透6个日志,你会得到清晰的图景。
2017-05-29 04:28:00,425 INFO job.JobServiceController [http-apr-8443-exec-3] - processing validateCloudAccount request...
2017-05-29 04:28:00,632 ERROR properties.CloudPropertiesController [http-apr-8443-exec-6] - com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "Google Cloud Resource Manager API has not been used in project credible-spark-166514 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com/overview?project=credible-spark-166514 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"reason" : "forbidden"
} ],
"message" : "Google Cloud Resource Manager API has not been used in project credible-spark-166514 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com/overview?project=credible-spark-166514 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status" : "PERMISSION_DENIED"
分辨率
应启用以下API,以便云中心与GCE正常工作:
-
Google计算引擎API
-
Google云资源管理器API
要启用它:
- 在GCE控制台中,导航至API控制面板,如图所示:
- 在页面末尾,列出了所有已启用的API,您很可能会发现Google计算引擎API已启用(如果未启用),如图所示:
- 但是,GCE不直接将资源管理器API放在页面上,因此您必须搜索它。对于此,从页面顶部选择“启用API”选项,并将您重定向到API库。
- 如图所示,搜索Google云资源管理器API,选择并启用它。
- 要反映这些更改,请重新启动CCO计算机,然后尝试再次部署应用。