You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Alex Ethier (Jira)" <ji...@apache.org> on 2024/02/14 21:00:00 UTC

[jira] [Created] (NIFI-12794) Multiple Python processors of same type duplicate pip installs and some get stuck

Alex Ethier created NIFI-12794:
----------------------------------

             Summary: Multiple Python processors of same type duplicate pip installs and some get stuck
                 Key: NIFI-12794
                 URL: https://issues.apache.org/jira/browse/NIFI-12794
             Project: Apache NiFi
          Issue Type: Bug
          Components: Extensions
    Affects Versions: 2.0.0-M2
            Reporter: Alex Ethier
            Assignee: Alex Ethier
         Attachments: image-2024-02-14-15-50-09-193.png, many_python_processors.json

If multiple of the same Python custom processor are added at the same time (by importing a process group via json or starting a new NiFi instance with a flow.xml pre-loaded) then a new pip install command will be launched for every processor.

The attached file many_python_processors.json includes many copies of PromptChatGPT. If loaded on a NiFi instance which has not yet installed PromptChatGPT, then it will launch many pip installs.

 
{code:java}
$ ps aux | grep pip
aethier          29028  58.6  0.4 410770336 223936 s002  R     3:32PM   0:08.58 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python -m pip install --no-cache-dir --target /opt/nifi-2.0.0-SNAPSHOT/./work/python/extensions/PromptChatGPT/2.0.0-SNAPSHOT langchain==0.1.2 openai==1.9.0 jsonpath-ng
aethier          29020  56.8  0.5 410778528 234832 s002  R     3:32PM   0:09.35 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python -m pip install --no-cache-dir --target /opt/nifi-2.0.0-SNAPSHOT/./work/python/extensions/PromptChatGPT/2.0.0-SNAPSHOT langchain==0.1.2 openai==1.9.0 jsonpath-ng
aethier          29030  53.4  0.5 410787232 241664 s002  R     3:32PM   0:09.37 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python -m pip install --no-cache-dir --target /opt/nifi-2.0.0-SNAPSHOT/./work/python/extensions/PromptChatGPT/2.0.0-SNAPSHOT langchain==0.1.2 openai==1.9.0 jsonpath-ng{code}
This can slow down the installs due to competing for bandwidth.

 

The logs note conficting files on installation:
{code:java}
2024-02-14 15:33:24,194 INFO [NiFi logging handler] org.apache.nifi.StdOut Successfully installed PyYAML-6.0.1 SQLAlchemy-2.0.27 aiohttp-3.9.3 aiosignal-1.3.1 annotated-types-0.6.0 anyio-4.2.0 async-timeout-4.0.3 attrs-23.2.0 certifi-2024.2.2 charset-normalizer-3.3.2 dataclasses-json-0.6.4 distro-1.9.0 exceptiongroup-1.2.0 frozenlist-1.4.1 h11-0.14.0 httpcore-1.0.3 httpx-0.26.0 idna-3.6 jsonpatch-1.33 jsonpath-ng-1.6.1 jsonpointer-2.4 langchain-0.1.2 langchain-community-0.0.18 langchain-core-0.1.19 langsmith-0.0.83 marshmallow-3.20.2 multidict-6.0.5 mypy-extensions-1.0.0 numpy-1.26.4 openai-1.9.0 packaging-23.2 ply-3.11 pydantic-2.6.1 pydantic-core-2.16.2 requests-2.31.0 sniffio-1.3.0 tenacity-8.2.3 tqdm-4.66.2 typing-extensions-4.9.0 typing-inspect-0.9.0 urllib3-2.2.0 yarl-1.9.4
2024-02-14 15:33:24,198 ERROR [NiFi logging handler] org.apache.nifi.StdErr WARNING: Target directory /opt/nifi-2.0.0-SNAPSHOT/work/python/extensions/PromptChatGPT/2.0.0-SNAPSHOT/ply-3.11.dist-info already exists. Specify --upgrade to force replacement.
2024-02-14 15:33:24,198 ERROR [NiFi logging handler] org.apache.nifi.StdErr WARNING: Target directory /opt/nifi-2.0.0-SNAPSHOT/work/python/extensions/PromptChatGPT/2.0.0-SNAPSHOT/async_timeout already exists. Specify --upgrade to force replacement. {code}
I haven't been able to consistently reproduce the issue, but I've also seen cases where one Python processor is usable and another of the same type is stuck initializing:

!image-2024-02-14-15-50-09-193.png|width=581,height=166!



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