Open mdsb opened 4 years ago
It looks like the user on your GCE instance does not have permissions to read Pub/Sub messages? Check by running a gcloud command like gcloud pubsub topics list
from the instance.
Check the permissions of your service account and that you have the "Allow full access to all Cloud APIs" scope set.
Receive the following error:
2020-07-09 07:22:04,790 - cron_executor - DEBUG - getting subscription 2020-07-09 07:22:04,916 - cron_executor - DEBUG - creating subscription
2020-07-09 07:22:05,085 - cron_executor - CRITICAL - unable to create subscription Traceback (most recent call last): File "sfdc_billing_pipeline_executor_agent.py", line 55, in
test_executor = Executor(topic=TOPIC, project=PROJECT, task_cmd=sample_task, subname='sample_task_task')
File "/home/sureshd/project/executor/cron_executor.py", line 84, in init
self.sub = self.get_subscription(deadline=deadline)
File "/home/sureshd/project/executor/cron_executor.py", line 123, in get_subscription
sub = self.create_subscription(deadline=deadline)
File "/home/sureshd/project/executor/cron_executor.py", line 102, in create_subscription
body=body).execute()
File "/usr/local/lib/python2.7/dist-packages/googleapiclient/_helpers.py", line 134, in positional_wrapper
return wrapped(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/googleapiclient/http.py", line 907, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://pubsub.googleapis.com/v1beta2/projects/some-project-90956/subscriptions/some-project-topic_sample_task_task?alt=json returned "User not authorized to perform this action.">