[ 
https://issues.apache.org/jira/browse/NIFI-12913?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bob Paulin updated NIFI-12913:
------------------------------
    Affects Version/s: 2.0.0-M2

> Python venv process failure on Ubuntu does not throw proper exception
> ---------------------------------------------------------------------
>
>                 Key: NIFI-12913
>                 URL: https://issues.apache.org/jira/browse/NIFI-12913
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 2.0.0-M2
>         Environment: Ubuntu
>            Reporter: Bob Paulin
>            Priority: Minor
>
> Staring nifi with python extensions on is throwing a NPE in the shutdown 
> process that swallows the root issue
> Relevant stack trace:
>  
>  
> {code:java}
> Caused by: java.lang.NullPointerException: Identifier required
>         at java.base/java.util.Objects.requireNonNull(Objects.java:259)
>         at 
> org.apache.nifi.py4j.logging.StandardLogLevelChangeHandler.removeListener(StandardLogLevelChangeHandler.java:78)
>         at 
> org.apache.nifi.py4j.PythonProcess.killProcess(PythonProcess.java:364)
>         at org.apache.nifi.py4j.PythonProcess.shutdown(PythonProcess.java:360)
>         at 
> org.apache.nifi.py4j.StandardPythonBridge.shutdown(StandardPythonBridge.java:297)
>         at 
> org.apache.nifi.py4j.StandardPythonBridge.start(StandardPythonBridge.java:85)
>         at 
> org.apache.nifi.components.ClassLoaderAwarePythonBridge.start(ClassLoaderAwarePythonBridge.java:52)
>         at 
> org.apache.nifi.controller.FlowController.<init>(FlowController.java:579)
>         at 
> org.apache.nifi.controller.FlowController.createStandaloneInstance(FlowController.java:411)
>         at 
> org.apache.nifi.spring.FlowControllerFactoryBean.getObject(FlowControllerFactoryBean.java:83){code}
>  
>  
> Suggest at a minimum we need a null check here to let the real exception 
> related to the venv install failure come through.
>  
> ROOT ISSUE
> The venv install command fails on Ubuntu without first running an install 
> command on ubuntu
> EX
>  
>  
> {code:java}
> apt install python3.10-venv {code}
>  
>  
> If you run venv without it on some Ubuntu/Deb systems you get:
> {code:java}
> python3 -m venv /home/bpaulin/nifi-2.0.0-SNAPSHOT/work/python/
> The virtual environment was not created successfully because ensurepip is not 
> available. On Debian/Ubuntu systems, you need to install the python3-venv 
> package using the following command. apt install python3.10-venv You may need 
> to use sudo with that command. After installing the python3-venv package, 
> recreate your virtual environment. Failing command: 
> /home/bpaulin/nifi-2.0.0-SNAPSHOT/work/python/bin/python3 {code}
>  
> Suggest either reading this process output text as a part of the exception 
> handling, sending the process output to the logger for easier debugging. 
> The process is exited with a 1 status but the NPE at the top of the issue is 
> preventing it from getting logged leaving the user guessing what happened.



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

Reply via email to