[ 
https://issues.apache.org/jira/browse/NIFI-11579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17798390#comment-17798390
 ] 

Grant Cotton commented on NIFI-11579:
-------------------------------------

I get the same outcome (sometimes) when disabling then enabling the 
StandardOAuth2AccessTokenProvider (1.23.2, Auth Strategy: Basic Authentication, 
Grant Type: Client Credentials). Later in the logs I get
OAuth2 access token request failed [HTTP 400], response: 
{"error":"invalid_client"}
but I've verified the credentials directly and they are correct.
There are also times when the issue just resolves and the Controller starts 
working. I haven't been able to isolate why. This issue is also described here: 
[https://community.cloudera.com/t5/Support-Questions/NiFi-StandardOauth2AccessTokenProvider-1-23-2-Grant-Type/td-p/378951]
 but no response to that post either so far.

> InvokeHttp is not working when setting Username and password as grant type
> --------------------------------------------------------------------------
>
>                 Key: NIFI-11579
>                 URL: https://issues.apache.org/jira/browse/NIFI-11579
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.20.0, 1.21.0
>            Reporter: Vrinda Palod
>            Priority: Major
>         Attachments: image-2023-05-22-15-49-35-231.png, 
> image-2023-05-22-15-51-44-000.png
>
>
> Hi Team,
> I am trying to run Invokrhttp using StandardOauth2AccessTokenProvider 
> controller service. When I set basic authentication and username and password 
> in my controller service, it throws below error.
> !image-2023-05-22-15-49-35-231.png!
>  
> InvokeHTTP[id=32a98900-0188-1000-ffff-ffff88fdac58] Failed to properly 
> initialize Processor. If still scheduled to run, NiFi will attempt to 
> initialize and run the Processor again after the 'Administrative Yield 
> Duration' has elapsed. Failure is due to java.io.UncheckedIOException: OAuth2 
> access token request failed: java.io.UncheckedIOException: OAuth2 access 
> token request failed
>  - Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized 
> token 
> 'eyJraWQiOiJlN2RmMGRmNS01ODcwLTQ0MjEtOTA2Mi1iZDkyZmVlYWI0MTMiLCJhbGciOiJQUzUxMiJ9':
>  was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 
> 'false')
> at [Source: 
> (String)"eyJraWQiOiJlN2RmMGRmNS01ODcwLTQ0MjEtOTA2Mi1iZDkyZmVlYWI0MTMiLCJhbGciOiJQUzUxMiJ9.eyJzdWIiOiJhNzA1NjQ5IiwiYXVkIjoiTGRhcFByb3ZpZGVyIiwibmJmIjoxNjg0NzUwNTM5LCJpc3MiOiJMZGFwUHJvdmlkZXIiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJhNzA1NjQ5IiwiZXhwIjoxNjg0NzkzNzM5LCJpYXQiOjE2ODQ3NTA1MzksImp0aSI6ImEwNjc3MjNjLWY5ZTgtNDg2Yi1iNjk5LWM3MThlM2JkYjI0ZSJ9.hnUxMPxCKNluxdLkPrlIy6JWkZAjEvbjWfDRxQjBSVXRyXNrcqgHyBb6Ruvca59xeWmEg1p4wuE5AENuzUEcwnuGX5vX-G0gx-4zY1WYpN7pp6JbXnKUxIXLqr4KMDyHAT0_0aVuNbgqJZ1MLOrfssh4jw_Trxol92N4kb0I4z"[truncated
>  513 chars]; line: 1, column: 81]
>  
> Below is how I am setting up my controller service. There is no issue with 
> endpoint url we are using.
> !image-2023-05-22-15-51-44-000.png!
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to