samer1977 commented on PR #8510:
URL: https://github.com/apache/nifi/pull/8510#issuecomment-2163860870

   It seems like the issue is not completely fixed. It works the first time 
when the extensions are deployed for the first time. However upon subsequent 
restarts the python processors go into invalid state. When I check the log it 
seems like its looking for the bin folder again: 
   
   
   ```
   2024-06-12 15:58:22,105 ERROR [Initialize ExcelTableToJson] 
org.apache.nifi.NiFi An Unknown Error Occurred in Thread 
VirtualThread[#118,Initialize 
ExcelTableToJson]/runnable@ForkJoinPool-1-worker-2: java.lang.RuntimeException: 
Failed to launch Process for Python Processor [ExcelTableToJson] Version 
[2.0.0-SNAPSHOT]
   java.lang.RuntimeException: Failed to launch Process for Python Processor 
[ExcelTableToJson] Version [2.0.0-SNAPSHOT]
        at 
org.apache.nifi.py4j.StandardPythonBridge.getProcessForNextComponent(StandardPythonBridge.java:262)
        at 
org.apache.nifi.py4j.StandardPythonBridge.createProcessorBridge(StandardPythonBridge.java:123)
        at 
org.apache.nifi.py4j.StandardPythonBridge.lambda$createProcessor$7(StandardPythonBridge.java:140)
        at 
org.apache.nifi.python.processor.PythonProcessorProxy.lambda$new$0(PythonProcessorProxy.java:78)
        at java.base/java.lang.VirtualThread.run(VirtualThread.java:309)
   Caused by: java.io.IOException: Cannot run program 
"F:\nifi-2.0.0-M3-test\.\work\python\extensions\ExcelTableToJson\2.0.0-SNAPSHOT\bin\python":
 CreateProcess error=2, The system cannot find the file specified
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1170)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089)
        at 
org.apache.nifi.py4j.PythonProcess.launchPythonProcess(PythonProcess.java:283)
        at org.apache.nifi.py4j.PythonProcess.start(PythonProcess.java:129)
        at 
org.apache.nifi.py4j.StandardPythonBridge.getProcessForNextComponent(StandardPythonBridge.java:243)
        ... 4 common frames omitted
   Caused by: java.io.IOException: CreateProcess error=2, The system cannot 
find the file specified
        at java.base/java.lang.ProcessImpl.create(Native Method)
        at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:500)
        at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:159)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1126)
        ... 8 common frames omitted
   2024-06-12 15:58:22,109 ERROR [Initialize ExcelTableToJson] 
org.apache.nifi.NiFi An Unknown Error Occurred in Thread 
VirtualThread[#116,Initialize 
ExcelTableToJson]/runnable@ForkJoinPool-1-worker-7: java.lang.RuntimeException: 
Failed to launch Process for Python Processor [ExcelTableToJson] Version 
[2.0.0-SNAPSHOT]
   java.lang.RuntimeException: Failed to launch Process for Python Processor 
[ExcelTableToJson] Version [2.0.0-SNAPSHOT]
        at 
org.apache.nifi.py4j.StandardPythonBridge.getProcessForNextComponent(StandardPythonBridge.java:262)
        at 
org.apache.nifi.py4j.StandardPythonBridge.createProcessorBridge(StandardPythonBridge.java:123)
        at 
org.apache.nifi.py4j.StandardPythonBridge.lambda$createProcessor$7(StandardPythonBridge.java:140)
        at 
org.apache.nifi.python.processor.PythonProcessorProxy.lambda$new$0(PythonProcessorProxy.java:78)
        at java.base/java.lang.VirtualThread.run(VirtualThread.java:309)
   Caused by: java.io.IOException: Cannot run program 
"F:\nifi-2.0.0-M3-test\.\work\python\extensions\ExcelTableToJson\2.0.0-SNAPSHOT\bin\python":
 CreateProcess error=2, The system cannot find the file specified
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1170)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089)
        at 
org.apache.nifi.py4j.PythonProcess.launchPythonProcess(PythonProcess.java:283)
        at org.apache.nifi.py4j.PythonProcess.start(PythonProcess.java:129)
        at 
org.apache.nifi.py4j.StandardPythonBridge.getProcessForNextComponent(StandardPythonBridge.java:243)
        ... 4 common frames omitted
   Caused by: java.io.IOException: CreateProcess error=2, The system cannot 
find the file specified
        at java.base/java.lang.ProcessImpl.create(Native Method)
        at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:500)
        at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:159)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1126)
        ... 8 common frames omitted
   ```
   If I change the Scripts folder name to bin and restart again its works and 
invalid state goes away!!! Come on guys you cant stop the testing the first 
time it runs :)
   
   Also Im not sure why the phython.log file is gone and now all the error are 
being logged in to the main  nifi-app.log. I think having them separated was 
better and easier to find python errors instead of getting buried in the 
nifi-app.log.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to