I am trying to get through the cloud DataFlow tutorial. I can run it locally and previously I was able to execute it remotely, but today I started getting the following error.
我正在尝试通过云DataFlow教程。我可以在本地运行它以前我能够远程执行它,但今天我开始收到以下错误。
I am running
我在跑步
mvn compile exec:java \
-Dexec.mainClass=com.example.WordCount \
-Dexec.args="--project=list-cleaner\
--stagingLocation=gs://disismybucket/staging/ \
--output=gs://disismybucket/output \
--runner=DataflowRunner"
And getting the following --
得到以下 -
Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "usageLimits",
"message" : "Dataflow API has not been used in project 563584335869 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/dataflow.googleapis.com/overview?project=563584335869 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"reason" : "accessNotConfigured",
"extendedHelp" : "https://console.developers.google.com"
} ],
"message" : "Dataflow API has not been used in project 563584335869 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/dataflow.googleapis.com/overview?project=563584335869 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"
}
It's obviously an auth issue but I have properly set my environment variables for GOOGLE_APPLICATION_CREDENTIALS and I have made sure that my project name is correct. I have disabled and re-enabled the api for this project to no avail. Oddly the project id referenced is not one of my projects but is a project number that seems to show up in other support issues. I have also tried it with the python SDK as well, but no luck with that either. Any help is appreciated.
这显然是一个身份验证问题,但我已正确设置GOOGLE_APPLICATION_CREDENTIALS的环境变量,并确保我的项目名称正确无误。我已禁用并重新启用此项目的api无济于事。奇怪的是,引用的项目ID不是我的项目之一,而是一个似乎出现在其他支持问题中的项目编号。我也尝试过使用python SDK,但也没有运气。任何帮助表示赞赏。
1 个解决方案
#1
1
So as I feared it was something really simple and I am an idiot. Your comments made me look harder at what I was doing around setting the GOOGLE_APPLICATION_CREDENTIALS. I was setting it GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/service-account-file.json"
, but I was not exporting it into the global scope ie export GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/service-account-file.json"
I will say that it is odd behavior that instead of throwing an error about the missing credentials it defaults to some random account
所以我担心这很简单,而且我是个白痴。您的评论让我对设置GOOGLE_APPLICATION_CREDENTIALS时所做的工作更加敏感。我设置了GOOGLE_APPLICATION_CREDENTIALS =“/ home / user / Downloads / service-account-file.json”,但我没有将其导出到全局范围,即导出GOOGLE_APPLICATION_CREDENTIALS =“/ home / user / Downloads / service-account-file .json“我会说这是奇怪的行为,而不是抛出关于丢失的凭据的错误,它默认为一些随机帐户
#1
1
So as I feared it was something really simple and I am an idiot. Your comments made me look harder at what I was doing around setting the GOOGLE_APPLICATION_CREDENTIALS. I was setting it GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/service-account-file.json"
, but I was not exporting it into the global scope ie export GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/service-account-file.json"
I will say that it is odd behavior that instead of throwing an error about the missing credentials it defaults to some random account
所以我担心这很简单,而且我是个白痴。您的评论让我对设置GOOGLE_APPLICATION_CREDENTIALS时所做的工作更加敏感。我设置了GOOGLE_APPLICATION_CREDENTIALS =“/ home / user / Downloads / service-account-file.json”,但我没有将其导出到全局范围,即导出GOOGLE_APPLICATION_CREDENTIALS =“/ home / user / Downloads / service-account-file .json“我会说这是奇怪的行为,而不是抛出关于丢失的凭据的错误,它默认为一些随机帐户