Created on 07-28-2022 06:06 AM - edited 07-28-2022 08:20 AM
Hi Everyone,
Need suggestion, to make connection for Publish GCP Pub/Sub lite processor , am getting getting "UNAUTHENTICATE, request has failed invalid authentication credentials" where am providing the correct key/json file. below my config looks like :
Please suggest, How we can make connection in Pub/Sub Lite. #ApacheNiFi
Created 07-31-2022 06:23 PM
Are the permissions of your credentials file correct? Ensure the file is owned by the nifi user and that user has permissions to read it.
Cheers,
André
Created on 08-02-2022 06:01 AM - edited 08-02-2022 06:02 AM
Hi @araujo, Yes the permissions and ownership are both correct, not sure why am getting error to connect on Pub/Sub lite. I'm attaching the screenshot of error. Please suggest.
Created 08-02-2022 09:56 PM
It seems that you set two properties in your controller service: "Service Account JSON File" and also "Service Account JSON".
You should specify only one. If you are using the file one, click on the the other property and delete its contents. Make sure it shows "No value set".
Then try again.
Cheers,
André
Created 08-02-2022 10:27 PM
Hi @araujo , Hmm...that is picking only one, either json file or json content. that screenshot creates confusion, "GCPCredentailsControllerService" properties look like below and still getting the same error response.
Created 08-02-2022 10:45 PM
Could you please run this command below and report the results?
namei -l /home/apache/nifi/gcp.json
Cheers,
André
Created 08-02-2022 11:09 PM
Created 08-02-2022 11:55 PM
Could you run these commands and try again:
chown nifi:nifi /home/apache/nifi/gcp.json
chmod 400 /home/apache/nifi/gcp.json
Also, would you be able to take a screenshot of the content of your gcp.json, mask out the sensitive values and post it here? I'd like to check the format of your credentials file.
Cheers,
Andr'e
Created on 08-03-2022 12:39 AM - edited 08-03-2022 12:39 AM
Hi @araujo , I have made above changes but still getting the same error response. PFA my json file. I have gone through some references and it referred like we have to add OAuth2 authentication, that i have added but no sure was it configure right.
Created 08-03-2022 03:51 PM
Could you please install the gcloud CLI, if you haven't done it yet, and run the following command to test your credential file?
./google-cloud-sdk/bin/gcloud auth login --cred-file /home/apache/nifi/gcp.json
Please let me know the results.
Cheers,
André