Support Questions

Find answers, ask questions, and share your expertise

Getting UnsatisfiedLinkError in Nifi Windows with Python Execute Script

I'm attempting to run a python script in Apache Nifi on Windows. The line itself is just "import subprocess". Does anyone else know what's going on here? This is from a template backup that ran fine on a previous nifi server that had to be rebuilt.

I'm getting the following error:

ERROR [Timer-Driven Process Thread-10] o.a.nifi.processors.script.ExecuteScript ExecuteScript[id=bfd322e2-8a4f-3521-9080-3dfcdf7f5c99] Failed to process session due to org.apache.nifi.processor.exception.ProcessException: javax.script.ScriptException: java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError in <script> at line number 5: {}

org.apache.nifi.processor.exception.ProcessException: javax.script.ScriptException: java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError in <script> at line number 5

at org.apache.nifi.processors.script.ExecuteScript.onTrigger(ExecuteScript.java:230)

at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1120)

at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147)

at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)

at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask.runAndReset(Unknown Source)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

4 REPLIES 4

Super Guru

Not sure why this used to work and doesn't now, unless there needed to be additional DLLs installed to get the subprocess module to work on Windows. I found this related page which says the problem is likely in the bowels of ctypes and the JFFI.

What version of NiFi are you using? If you'd like to try building the latest master branch from source, the version of Jython was updated from 2.7.0 to 2.7.1 (under NIFI-4301), not sure if that will help or not but it might.

Thanks Matt, I'm using a stock 1.3.0 from the downloads page. Interestingly enough if I try similar code (Removed the windows bits) in 1.3.0 Linux it works just fine.

Similar result with 1.4.0

New Contributor

Same problem / result on Windows & 1.6.0

,

Same problem : 1.6 on Windows.