Support Questions

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

Nifi-putSlack isssue

avatar
Explorer

Hi,

I am trying to integrate Nifi with slack by using putSlack processor.While doing so i have configured webhook url and webhook text. But while running i got PKIX certificate validation.

So i have added slack cert in keyStore and added SSL context service property like below in putSlack.

Screen Shot 2024-04-29 at 9.17.11 PM.png

This time i didn't get certificate exception. But process failed with below error:

  • Faile to parse JSON.
  • Javax.json.stream.jsonparsingexception: Unexpected char 83.

Unable to find any details regarding this issue. Could anyone please help.

1 ACCEPTED SOLUTION

avatar
Super Mentor

@Vikas-Nifi 

Looks like you added SSL Context Service as a custom dynamic property in this processor.  
SSL Context Service was added to the PutSlack processor in Apache NiFi 1.24:
https://issues.apache.org/jira/browse/NIFI-12277

You can't use Dynamic properties to add controller service references in any NiFi processor.  Processor code is required for this. This processor treats dynamic properties in a specific way:

MattWho_0-1714481754365.png

The processing of that dynamic property is what is causing your json parsing exception.

This processor was deprecated newer versions of Apache NiFi in favor of the new PublishSlack processor.  Looks like you will need to upgrade to Apache NiFi 1.24 or newer to use the SSL Context service in PutSlack or use the PublishSlack processor.

Please help our community thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

View solution in original post

4 REPLIES 4

avatar
Community Manager

@Vikas-Nifi Welcome to our community! To help you get the best possible answer, I have tagged in our NiFi experts @SAMSAL @cotopaul @MattWho  who may be able to assist you further.

Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Super Mentor

@Vikas-Nifi 

Looks like you added SSL Context Service as a custom dynamic property in this processor.  
SSL Context Service was added to the PutSlack processor in Apache NiFi 1.24:
https://issues.apache.org/jira/browse/NIFI-12277

You can't use Dynamic properties to add controller service references in any NiFi processor.  Processor code is required for this. This processor treats dynamic properties in a specific way:

MattWho_0-1714481754365.png

The processing of that dynamic property is what is causing your json parsing exception.

This processor was deprecated newer versions of Apache NiFi in favor of the new PublishSlack processor.  Looks like you will need to upgrade to Apache NiFi 1.24 or newer to use the SSL Context service in PutSlack or use the PublishSlack processor.

Please help our community thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

avatar
Explorer

@MattWho : Updated the NiFi version to 1.26.0.

I am trying to test it in local (haven't deployed in to environment server). Added the channel name and webhookURL  (which generated under "companyName.slack.com") 

VikasNifi_1-1718915399598.png

But still getting below error:

o.apache.nifi.processors.slack.PutSlack : Failed to open connection
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I have added slack cert in to my truststore.

VikasNifi_2-1718915669292.png

I am wondering, is there any specific certificate needs to be added in Truststore to get putSlack to  work?.

 

 

 

 

avatar
Explorer

@SAMSAL @cotopaul @MattWho : please help on above