Skip to main content
krusaderjake
Gold ⭐️
February 1, 2024
Solved

Installing NIFI 2.0.0 M2 on Ubuntu Linux java.io.IOException: Failed to create Python Environment

Hi - I've got everything working with NIFI 2.0.0 M2 when the the python command line is commented out but I'd like to get it up and running with the python command line uncommented.

nifi.properties file line

nifi.python.command=/usr/bin/python3.11

 nifi-app.log info:

Caused by: java.lang.IllegalStateException: Failed to communicate with Python Controller
at org.apache.nifi.controller.FlowController.<init>(FlowController.java:581)
at org.apache.nifi.controller.FlowController.createStandaloneInstance(FlowController.java:411)
at org.apache.nifi.spring.FlowControllerFactoryBean.getObject(FlowControllerFactoryBean.java:83)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:178)
... 95 common frames omitted
Caused by: java.io.IOException: Failed to create Python Environment ./work/python/controller: process existed with code 1
at org.apache.nifi.py4j.PythonProcess.setupEnvironment(PythonProcess.java:223)
at org.apache.nifi.py4j.PythonProcess.start(PythonProcess.java:102)
at org.apache.nifi.py4j.StandardPythonBridge.start(StandardPythonBridge.java:78)
at org.apache.nifi.components.ClassLoaderAwarePythonBridge.start(ClassLoaderAwarePythonBridge.java:52)
at org.apache.nifi.controller.FlowController.<init>(FlowController.java:579)
... 98 common frames omitted
2024-01-31 23:02:46,788 INFO [Thread-0] org.apache.nifi.NiFi Application Server shutdown started
2024-01-31 23:02:46,788 INFO [Thread-0] org.eclipse.jetty.server.Server Stopped oejs.Server@44aa2e13{STOPPING}[12.0.5,sto=0]

 What am I doing wrong?

krusaderjake
Gold ⭐️
February 2, 2024

yea I saw that post and finally got it to work by making sure I ran this command on Ubuntu to install venv:

sudo apt install python3.11-venv

After I ran that command, everything started up and stayed up normally for NIFI 2.0.0 M2.

3 replies

VidyaSargur
Community Manager
Community Manager
February 1, 2024

@krusaderjake, Welcome to our community! To help you get the best possible answer, I have tagged our NiFi experts @MattWho @SAMSAL @steven-matison   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.

Translate
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.
joseomjr
Gold ⭐️⭐️
February 2, 2024
krusaderjake
krusaderjakeAuthorAnswer
Gold ⭐️
February 2, 2024

yea I saw that post and finally got it to work by making sure I ran this command on Ubuntu to install venv:

sudo apt install python3.11-venv

After I ran that command, everything started up and stayed up normally for NIFI 2.0.0 M2.

Translate