Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

PublishGCPubSubLite processor in Apache NiFi

avatar
Rising Star

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

 

image (1).png

12 REPLIES 12

avatar
Super Guru

@samrathal ,

 

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é

 

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Rising Star

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. 

samrathal_0-1659445305316.png

 

avatar
Super Guru

@samrathal 

 

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.

 

araujo_0-1659502578739.png

 

Cheers,

André

 

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Rising Star

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. 

 

samrathal_0-1659504441976.png

 

 

avatar
Super Guru

@samrathal ,

 

Could you please run this command below and report the results?

namei -l /home/apache/nifi/gcp.json

 

Cheers,

André

 

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Rising Star

Hi @araujo, PFB the command output. 

 

samrathal_0-1659506964426.png

 

avatar
Super Guru

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

 

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Rising Star

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.

samrathal_0-1659512239965.png

 

avatar
Super Guru

@samrathal ,

 

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é

 

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.