簡介:
本文檔介紹如何對Google Cloud與CloudCenter Manager(CCM)版本4.8.0/4.7.x的整合進行故障排除。
必要條件
需求
思科建議您瞭解以下主題:
採用元件
本檔案中的資訊是根據以下軟體版本:
- CloudCenter 4.6.x版到4.8.x版
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路正在作用,請確保您已瞭解任何指令可能造成的影響。
背景資訊
成功將GCE orchestrator(CCO)新增到CCM並嘗試通過部署包含選擇例項型別和區域的應用程式來測試環境後,在嘗試選擇專案時會顯示錯誤消息,如下圖所示:
問題
在CCM osmosix日誌中,您可以找到以下錯誤:
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滲透壓六號木材,你會得到一個清晰的畫面。
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 Compute Engine API,則很可能您會發現Google Compute Engine API,如下圖所示:
- 但是,GCE不會直接將資源管理器API放在頁面上,因此您必須對其進行搜尋。為此,從頁面頂部選擇enable API選項,該選項會將您重定向到API庫。
- 如圖所示,搜尋Google Cloud Resource Manager API,選擇並啟用它。
- 為了反映這些更改,請重新啟動CCO電腦,然後再次嘗試部署應用。