azekirel555
azekirel555

Reputation: 587

Failed job in Cloud Dataflow: enable Dataflow API

I'm currently trying to use Dataflow with Pub/Sub but I'm getting this error:

Workflow failed. Causes: (6e74e8516c0638ca): There was a problem refreshing your credentials. Please check: 1. Dataflow API is enabled for your project. 2. There is a robot service account for your project: service-[project number]@dataflow-service-producer-prod.iam.gserviceaccount.com should have access to your project. If this account does not appear in the permissions tab for yourproject, contact Dataflow support.

I tried to look in the API manager to enable Dataflow API but I can't find Dataflow at all. I'm also not seeing the robot service account.

Upvotes: 5

Views: 8182

Answers (3)

Abhishek
Abhishek

Reputation: 3417

Adding the dataflow Worker role to the default project compute service account solved the problem for me

enter image description here

Upvotes: 1

Rajesh Hegde
Rajesh Hegde

Reputation: 2822

You can enable it from the console or just use the gcloud command.

Enable Dataflow API: gcloud services enable dataflow.googleapis.com

Disable Dataflow API: gcloud services disable dataflow.googleapis.com

Upvotes: 1

Lukasz Cwik
Lukasz Cwik

Reputation: 1731

You can see whether the API is enabled by searching for dataflow within the API Manager (should enumerate whether its enabled or not):

API Manager search for "dataflow"

To find the appropriate robot account, search for dataflow-service-producer-prod.iam.gserviceaccount.com within the IAM page:

IAM search for "dataflow-service-producer-prod.iam.gserviceaccount.com"

Finally, the quick start guide may be of use.

Upvotes: 8

Related Questions