I have an ExecuteScript processor for NIFI that runs the following script:
import requests
import json import logging
postMap = { 'a':'https://a/v/1', 'b':'https://b/v/2' }
flowFile = session.get() if (flowFile != None):
title = flowFile.getAttribute('title')
tag = flowFile.getAttribute('tag')
link = flowFile.getAttribute('link')
descp = flowFile.getAttribute('descp')
url = _postMap.get(tag)
headers = { 'content-type': "application/json", 'cache-control': "no-cache" }
payload = { "text": "You have a new Notification",
"attachments": [
{
"title": title,
"title_link": link,
"text": descp,
"color": "#764FA5"
}
]
}
logging.error(json.dumps(payload))
response = requests.post(url, headers=headers, verify=False, data=json.dumps(payload))
flowFile = session.putAttribute(flowFile, "status","posted")
session.transfer(flowFile, REL_SUCCESS)
session.commit()
Now even though verify=False I get this error:
ExecuteScript[id=9af4a34e-0158-1000-7cf5-2beca58c972e] ExecuteScript[id=9af4a34e-0158-1000-7cf5-2beca58c972e] failed to process due to org.apache.nifi.processor.exception.ProcessException: javax.script.ScriptException: requests.exceptions.SSLError: [Errno 1] General SSLEngine problem (javax.net.ssl.SSLHandshakeException: General SSLEngine problem) in <script> at line number 61; rolling back session: org.apache.nifi.processor.exception.ProcessException: javax.script.ScriptException: requests.exceptions.SSLError: [Errno 1] General SSLEngine problem (javax.net.ssl.SSLHandshakeException: General SSLEngine problem) in <script> at line number 61
What can possibly be causing this ?