我正在尝试部署到 Google AppEngine。(更准确地说:托管虚拟机。)
我跑了 gcloud preview app deploy d:\dev\mytest\yaml-war\app.yaml --version=joshua20160316d --project=mytest-test1
。
大约30分钟后,它失败了。
错误消息指示我在 Cloud Developer Console 中记录行(见下文),这些行告诉我需要启用对 Cloud Storage JSON API 的访问。但是,开发者控制台显示 Cloud Storage JSON API 已启用。(见截图。)
另外,请注意,这适用于其他团队成员;并且针对不同项目的相同命令也成功了。所以,这是特定于项目和我的帐户的某种设置,但我不知道是什么。
我需要做什么才能完成这项工作?
Failure setting up GCS logging: failed to create GCS logging client: error creating logfile: googleapi: Error 403: Access Not Configured. The API (Cloud Storage JSON API) is not enabled for your project. Please use the Google Developers Console to update your configuration., accessNotConfigured
{
metadata: {
severity: "INFO"
projectId: "mytest-test1"
serviceName: "cloudbuild.googleapis.com"
labels: {
cloudbuild.googleapis.com/build_id:
"49697866-90f8-4771-82ef-7fe149f1d926"
}
timestamp: "2016-03-16T14:19:10.940059809Z"
projectNumber: "232473234717"
}
textPayload: "Failure setting up GCS logging: failed to create GCS logging client: error creating logfile: googleapi: Error 403: Access Not Configured. The API (Cloud Storage JSON API) is not enabled for your project. Please use the Google Developers Console to update your configuration., accessNotConfigured"
insertId: "41697866-90f8-4771-82ef-8fe149f1d926-0"
log: "41697866-90f8-4771-82ef-8fe149f1d926"
}
本地日志包括以下内容。
Operation [operations/build/mytest-test1/MmFmNjFhNGQtZDU2Yi00NzczLWI5NTItNWYyNGYyZGYyM2FkOlAT] complete. Result: {
"metadata": {
"@type": "type.googleapis.com/google.devtools.cloudbuild.v1.BuildOperationMetadata",
"build": {
"finishTime": "2016-03-16T13:35:28.453575Z",
"status": "FAILURE",
"timeout": "600.000s",
"startTime": "2016-03-16T13:35:28.199428Z",
"workerId": "worker-74ace662-26dc-47c5-b23b-0886f61a5fbe",
"logsBucket": "staging.mytest-test1.appspot.com",
"userId": "846527075559",
"results": {},
"id": "2af61a4d-d57b-4773-b952-5e24f2df23ad",
"buildReceipt": {
"clientId": "32555940559"
},
"source": {
"storageSource": {
"object": "mytest-test1.default.joshua20160316d",
"bucket": "staging.mytest-test1.appspot.com"
}
},
"steps": [
{
"args": [
"appengine.gcr.io/gcloud/mytest-test1.default.joshua20160316d"
],
"name": "gcr.io/cloud-builders/dockerizer"
}
],
"sourceProvenance": {
"resolvedStorageSource": {
"generation": "1458135324271000",
"object": "mytest-test1.default.joshua20160316d",
"bucket": "staging.mytest-test1.appspot.com"
}
},
"projectId": "mytest-test1",
"images": [
"appengine.gcr.io/gcloud/mytest-test1.default.joshua20160316d"
],
"projectNum": "232473234717",
"foremanId": "cloud-build/foreman.server/ir/0",
"createTime": "2016-03-16T13:35:26.145234Z"
}
},
"done": true,
"name": "operations/build/mytest-test1/MmFmNjFhNGQtZDU2Yi00NzczLWI5NTItNWYyNGYyZGYyM2FkOlAT",
"error": {
"message": "Build failed; check build logs for details",
"code": 2
}
}