You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Kondakov Artem (Jira)" <ji...@apache.org> on 2022/11/22 16:58:00 UTC

[jira] [Created] (MINIFICPP-1993) Minifi crashing while getting flow-file content in python processor

Kondakov Artem created MINIFICPP-1993:
-----------------------------------------

             Summary: Minifi crashing while getting flow-file content in python processor
                 Key: MINIFICPP-1993
                 URL: https://issues.apache.org/jira/browse/MINIFICPP-1993
             Project: Apache NiFi MiNiFi C++
          Issue Type: Bug
    Affects Versions: 0.12.0
            Reporter: Kondakov Artem
         Attachments: conf.zip, image-2022-11-22-19-46-11-969.png, image-2022-11-22-19-48-08-443.png, minifi-python.zip

Hello.

We built version 0.12.0 with the ability to execute python scripts as processors

Made a simple process (see attachment) - calling and getting data using invokehttp get. After that, a custom python processor is executed (see attachment).

Inside this python script, there is an attempt to get the contents of flow-file. At this point, an error occurs that stops the entire minifi application. At this code line
!image-2022-11-22-19-46-11-969.png!

There is a log file where you can see that the error occurs on this line of python code.

!image-2022-11-22-19-48-08-443.png!

At the same time, wrapping the python code in try / except does not give anything, apparently the fall occurs somewhere outside the python runtime

After some time debugging, it turned out that this behavior only occurs when a flow-file is passed from the InvokeHttp processor through the relationship type success
In this case, the transmitted content is empty (you can connect PutFile and make sure that an empty file will be saved)

If the relationship type is set to response, then everything works as expected without minifi crashing.

The expected behavior is that minifi will not suddenly stop if an attempt is made to get the contents of an empty flow-file

 



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