Support Questions

Find answers, ask questions, and share your expertise

Uncommenting python config in nifi.properties makes Nifi crash on startup.

avatar
Explorer
Hi.
I'm trying to use Python extensions with Nifi.
I've uncommented the line   nifi.python.command=python3   in nifi.properties but Nifi always crash when I try to run it.
 
When I re-comment the line, Nifi starts and works fine.
 
and tried to follow the instructions in the solutions.
It still crashes.
 
I'm posting here because the problem is on Windows instead of Linux.
 
Thanks for your help!
 
OSWindows 10 home edition
Nifi versionnifi-2.0.0-M2
Java installed version21.0.2
Python installed version3.11.8
 
 
 
nifi.properties
In   nifi.properties   I changed the line from   nifi.python.command=python3   to   nifi.python.command=python
 
Venv
I made sure the python venv package is installed by issuing this command   python -m venv
which gave this message
usage: venv [-h] [--system-site-packages] [--symlinks | --copies] [--clear] [--upgrade] [--without-pip] [--prompt PROMPT] [--upgrade-deps] ENV_DIR [ENV_DIR ...]
venv: error: the following arguments are required: ENV_DIR
showing that venv is installed
 
Java version
java --version
java 21.0.2 2024-01-16 LTS
Java(TM) SE Runtime Environment (build 21.0.2+13-LTS-58)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.2+13-LTS-58, mixed mode, sharing)
 
 
Python version
python --version
Python 3.11.8
 
 
The java_home env variable
echo %java_home%
C:\Program Files\Java\jdk-21
 
 
python3
python3 does not work. There is no python3 command in the python installation folder. Only a .dll :
dir C:\Users\ASUS\AppData\Local\Programs\Python\Python311
<DIR> DLLs
<DIR> Doc
<DIR> include
<DIR> Lib
<DIR> libs
      LICENSE.txt
      NEWS.txt
      python.exe
      python3.dll
      python311.dll
      pythonw.exe
<DIR> Scripts
<DIR> tcl
<DIR> Tools
      vcruntime140.dll
      vcruntime140_1.dll
 
That's why I changed the line to   nifi.python.command=python   in nifi.properties
 
 
The work/python folder
Nothing was copied to the ./work/python/controller/bin folder. The folder is not even existing.
 
 
nifi-bootstrap.log
2024-03-04 14:06:43,388 INFO [main] org.apache.nifi.bootstrap.RunNiFi {javaVersion=21.0.2, availableProcessors=12, minimumHeapSize=1g, maximumHeapSize=1g}
2024-03-04 14:06:43,426 INFO [main] org.apache.nifi.bootstrap.Command Starting Apache NiFi...
2024-03-04 14:06:43,426 INFO [main] org.apache.nifi.bootstrap.Command Working Directory: C:\Users\ASUS\Desktop\m
2024-03-04 14:06:43,427 INFO [main] org.apache.nifi.bootstrap.Command Command: C:\Program Files\Java\jdk-21\bin\java.exe -classpath C:\Users\ASUS\Desktop\m\.\conf;C:\Users\ASUS\Desktop\m\.\lib\jcl-over-slf4j-2.0.11.jar;C:\Users\ASUS\Desktop\m\.\lib\jul-to-slf4j-2.0.11.jar;C:\Users\ASUS\Desktop\m\.\lib\log4j-over-slf4j-2.0.11.jar;C:\Users\ASUS\Desktop\m\.\lib\logback-classic-1.4.14.jar;C:\Users\ASUS\Desktop\m\.\lib\logback-core-1.4.14.jar;C:\Users\ASUS\Desktop\m\.\lib\nifi-api-2.0.0-M2.jar;C:\Users\ASUS\Desktop\m\.\lib\nifi-framework-api-2.0.0-M2.jar;C:\Users\ASUS\Desktop\m\.\lib\nifi-nar-utils-2.0.0-M2.jar;C:\Users\ASUS\Desktop\m\.\lib\nifi-per-process-group-logging-2.0.0-M2.jar;C:\Users\ASUS\Desktop\m\.\lib\nifi-properties-2.0.0-M2.jar;C:\Users\ASUS\Desktop\m\.\lib\nifi-property-utils-2.0.0-M2.jar;C:\Users\ASUS\Desktop\m\.\lib\nifi-python-framework-api-2.0.0-M2.jar;C:\Users\ASUS\Desktop\m\.\lib\nifi-runtime-2.0.0-M2.jar;C:\Users\ASUS\Desktop\m\.\lib\nifi-server-api-2.0.0-M2.jar;C:\Users\ASUS\Desktop\m\.\lib\nifi-stateless-api-2.0.0-M2.jar;C:\Users\ASUS\Desktop\m\.\lib\nifi-stateless-bootstrap-2.0.0-M2.jar;C:\Users\ASUS\Desktop\m\.\lib\slf4j-api-2.0.11.jar -Xmx1g -Djava.awt.headless=true -Xms1g -Djavax.security.auth.useSubjectCredsOnly=true -Dsun.net.http.allowRestrictedHeaders=true -Djava.protocol.handler.pkgs=sun.net.www.protocol -Dcurator-log-only-first-connection-issue-as-error-level=true -Dnifi.properties.file.path=C:\Users\ASUS\Desktop\m\.\conf\nifi.properties -Dnifi.bootstrap.listen.port=52900 -Dapp=NiFi -Dorg.apache.nifi.bootstrap.config.log.dir=C:\Users\ASUS\Desktop\m\bin\..\\logs org.apache.nifi.NiFi 
2024-03-04 14:06:43,433 WARN [main] org.apache.nifi.bootstrap.Command Failed to set permissions so that only the owner can read pid file C:\Users\ASUS\Desktop\m\bin\..\run\nifi.pid; this may allows others to have access to the key needed to communicate with NiFi. Permissions should be changed so that only the owner can read this file
2024-03-04 14:06:43,437 WARN [main] org.apache.nifi.bootstrap.Command Failed to set permissions so that only the owner can read status file C:\Users\ASUS\Desktop\m\bin\..\run\nifi.status; this may allows others to have access to the key needed to communicate with NiFi. Permissions should be changed so that only the owner can read this file
2024-03-04 14:06:43,446 INFO [main] org.apache.nifi.bootstrap.Command Application Process [12884] launched
2024-03-04 14:06:43,914 WARN [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Failed to set permissions so that only the owner can read pid file C:\Users\ASUS\Desktop\m\bin\..\run\nifi.pid; this may allows others to have access to the key needed to communicate with NiFi. Permissions should be changed so that only the owner can read this file
2024-03-04 14:06:43,918 WARN [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Failed to set permissions so that only the owner can read status file C:\Users\ASUS\Desktop\m\bin\..\run\nifi.status; this may allows others to have access to the key needed to communicate with NiFi. Permissions should be changed so that only the owner can read this file
2024-03-04 14:06:43,921 INFO [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Apache NiFi now running and listening for Bootstrap requests on port 52901
2024-03-04 14:07:01,881 ERROR [NiFi logging handler] org.apache.nifi.StdErr Failed to start web server: Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration': Unsatisfied dependency expressed through method 'setFilterChains' parameter 0: Error creating bean with name 'securityFilterChain' defined in org.apache.nifi.web.security.configuration.WebSecurityConfiguration: Unsatisfied dependency expressed through method 'securityFilterChain' parameter 2: Error creating bean with name 'org.apache.nifi.web.security.configuration.JwtAuthenticationSecurityConfiguration': Unsatisfied dependency expressed through constructor parameter 2: Error creating bean with name 'flowController': FactoryBean threw exception on object creation
2024-03-04 14:07:01,881 ERROR [NiFi logging handler] org.apache.nifi.StdErr Shutting down...
2024-03-04 14:07:03,552 INFO [main] org.apache.nifi.bootstrap.RunNiFi NiFi never started. Will not restart NiFi
 
 
nifi-app.log
.
.
.
2024-03-04 14:07:00,427 INFO [main] org.apache.nifi.py4j.PythonProcess Creating Python Virtual Environment .\work\python\controller
2024-03-04 14:07:00,561 INFO [main] o.apache.nifi.py4j.StandardPythonBridge Shutting down Python Server
2024-03-04 14:07:00,562 INFO [main] org.apache.nifi.py4j.PythonProcess Shutting down Python Process null
2024-03-04 14:07:00,563 INFO [main] o.apache.nifi.py4j.StandardPythonBridge Successfully shutdown Python Server
2024-03-04 14:07:00,577 INFO [main] o.a.n.a.service.EntityStoreAuditService Environment closed
2024-03-04 14:07:00,580 ERROR [main] o.s.web.context.ContextLoader Context initialization failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration': Unsatisfied dependency expressed through method 'setFilterChains' parameter 0: Error creating bean with name 'securityFilterChain' defined in org.apache.nifi.web.security.configuration.WebSecurityConfiguration: Unsatisfied dependency expressed through method 'securityFilterChain' parameter 2: Error creating bean with name 'org.apache.nifi.web.security.configuration.JwtAuthenticationSecurityConfiguration': Unsatisfied dependency expressed through constructor parameter 2: Error creating bean with name 'flowController': FactoryBean threw exception on object creation
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:884)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:837)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:497)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1414)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:518)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:949)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:615)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:394)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:274)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:102)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:1582)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.contextInitialized(ServletContextHandler.java:490)
at org.eclipse.jetty.ee10.servlet.ServletHandler.initialize(ServletHandler.java:670)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.startContext(ServletContextHandler.java:1316)
at org.eclipse.jetty.ee10.webapp.WebAppContext.startContext(WebAppContext.java:1223)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.lambda$doStart$0(ServletContextHandler.java:1042)
at org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.call(ContextHandler.java:1147)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.doStart(ServletContextHandler.java:1039)
at org.eclipse.jetty.ee10.webapp.WebAppContext.doStart(WebAppContext.java:496)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
at org.eclipse.jetty.server.Handler$Abstract.doStart(Handler.java:468)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
at org.eclipse.jetty.server.Handler$Abstract.doStart(Handler.java:468)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
at org.eclipse.jetty.server.Server.start(Server.java:622)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
at org.eclipse.jetty.server.Handler$Abstract.doStart(Handler.java:468)
at org.eclipse.jetty.server.Server.doStart(Server.java:563)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:773)
at org.apache.nifi.NiFi.<init>(NiFi.java:172)
at org.apache.nifi.NiFi.<init>(NiFi.java:83)
at org.apache.nifi.NiFi.main(NiFi.java:332)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityFilterChain' defined in org.apache.nifi.web.security.configuration.WebSecurityConfiguration: Unsatisfied dependency expressed through method 'securityFilterChain' parameter 2: Error creating bean with name 'org.apache.nifi.web.security.configuration.JwtAuthenticationSecurityConfiguration': Unsatisfied dependency expressed through constructor parameter 2: Error creating bean with name 'flowController': FactoryBean threw exception on object creation
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1330)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:558)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:518)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1633)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1597)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1488)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1375)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:876)
... 44 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.apache.nifi.web.security.configuration.JwtAuthenticationSecurityConfiguration': Unsatisfied dependency expressed through constructor parameter 2: Error creating bean with name 'flowController': FactoryBean threw exception on object creation
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:236)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1350)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1187)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:558)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:518)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:408)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1330)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:558)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:518)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1417)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:906)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:784)
... 60 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowController': FactoryBean threw exception on object creation
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:184)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:120)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1812)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:1271)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1417)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:906)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:784)
... 83 common frames omitted
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 9009
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-03-04 14:07:00,582 WARN [main] o.e.jetty.ee10.webapp.WebAppContext Failed startup of context oeje10w.WebAppContext@4ec427{nifi-api,/nifi-api,b=file:///C:/Users/ASUS/Desktop/m/work/jetty/nifi-web-api-2.0.0-M2.war/webapp/,a=AVAILABLE,h=oeje10s.SessionHandler@714c74eb{STARTED}}{.\work\nar\extensions\nifi-server-nar-2.0.0-M2.nar-unpacked\NAR-INF\bundled-dependencies\nifi-web-api-2.0.0-M2.war}
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration': Unsatisfied dependency expressed through method 'setFilterChains' parameter 0: Error creating bean with name 'securityFilterChain' defined in org.apache.nifi.web.security.configuration.WebSecurityConfiguration: Unsatisfied dependency expressed through method 'securityFilterChain' parameter 2: Error creating bean with name 'org.apache.nifi.web.security.configuration.JwtAuthenticationSecurityConfiguration': Unsatisfied dependency expressed through constructor parameter 2: Error creating bean with name 'flowController': FactoryBean threw exception on object creation
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:884)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:837)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:497)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1414)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:518)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:949)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:615)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:394)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:274)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:102)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:1582)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.contextInitialized(ServletContextHandler.java:490)
at org.eclipse.jetty.ee10.servlet.ServletHandler.initialize(ServletHandler.java:670)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.startContext(ServletContextHandler.java:1316)
at org.eclipse.jetty.ee10.webapp.WebAppContext.startContext(WebAppContext.java:1223)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.lambda$doStart$0(ServletContextHandler.java:1042)
at org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.call(ContextHandler.java:1147)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.doStart(ServletContextHandler.java:1039)
at org.eclipse.jetty.ee10.webapp.WebAppContext.doStart(WebAppContext.java:496)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
at org.eclipse.jetty.server.Handler$Abstract.doStart(Handler.java:468)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
at org.eclipse.jetty.server.Handler$Abstract.doStart(Handler.java:468)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
at org.eclipse.jetty.server.Server.start(Server.java:622)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
at org.eclipse.jetty.server.Handler$Abstract.doStart(Handler.java:468)
at org.eclipse.jetty.server.Server.doStart(Server.java:563)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:773)
at org.apache.nifi.NiFi.<init>(NiFi.java:172)
at org.apache.nifi.NiFi.<init>(NiFi.java:83)
at org.apache.nifi.NiFi.main(NiFi.java:332)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityFilterChain' defined in org.apache.nifi.web.security.configuration.WebSecurityConfiguration: Unsatisfied dependency expressed through method 'securityFilterChain' parameter 2: Error creating bean with name 'org.apache.nifi.web.security.configuration.JwtAuthenticationSecurityConfiguration': Unsatisfied dependency expressed through constructor parameter 2: Error creating bean with name 'flowController': FactoryBean threw exception on object creation
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1330)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:558)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:518)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1633)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1597)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1488)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1375)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:876)
... 44 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.apache.nifi.web.security.configuration.JwtAuthenticationSecurityConfiguration': Unsatisfied dependency expressed through constructor parameter 2: Error creating bean with name 'flowController': FactoryBean threw exception on object creation
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:236)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1350)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1187)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:558)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:518)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:408)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1330)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:558)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:518)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1417)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:906)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:784)
... 60 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowController': FactoryBean threw exception on object creation
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:184)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:120)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1812)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:1271)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1417)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:906)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:784)
... 83 common frames omitted
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 9009
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-03-04 14:07:01,010 INFO [main] o.e.j.s.h.C._nifi_content_viewer No Spring WebApplicationInitializer types detected on classpath
2024-03-04 14:07:01,042 INFO [main] o.e.jetty.server.handler.ContextHandler Started oeje10w.WebAppContext@1465914{nifi-content-viewer,/nifi-content-viewer,b=file:///C:/Users/ASUS/Desktop/m/work/jetty/nifi-web-content-viewer-2.0.0-M2.war/webapp/,a=AVAILABLE,h=oeje10s.SessionHandler@2cf29dce{STARTED}}{.\work\nar\extensions\nifi-server-nar-2.0.0-M2.nar-unpacked\NAR-INF\bundled-dependencies\nifi-web-content-viewer-2.0.0-M2.war}
2024-03-04 14:07:01,045 INFO [main] o.e.j.ee10.servlet.ServletContextHandler Started oeje10w.WebAppContext@1465914{nifi-content-viewer,/nifi-content-viewer,b=file:///C:/Users/ASUS/Desktop/m/work/jetty/nifi-web-content-viewer-2.0.0-M2.war/webapp/,a=AVAILABLE,h=oeje10s.SessionHandler@2cf29dce{STARTED}}{.\work\nar\extensions\nifi-server-nar-2.0.0-M2.nar-unpacked\NAR-INF\bundled-dependencies\nifi-web-content-viewer-2.0.0-M2.war}
2024-03-04 14:07:01,280 INFO [main] o.e.j.s.h.ContextHandler._nifi_docs No Spring WebApplicationInitializer types detected on classpath
2024-03-04 14:07:01,301 INFO [main] o.e.jetty.server.handler.ContextHandler Started oeje10w.WebAppContext@7c5eb88c{nifi-docs,/nifi-docs,b=file:///C:/Users/ASUS/Desktop/m/work/jetty/nifi-web-docs-2.0.0-M2.war/webapp/,a=AVAILABLE,h=oeje10s.SessionHandler@2e3c5ecc{STARTED}}{.\work\nar\extensions\nifi-server-nar-2.0.0-M2.nar-unpacked\NAR-INF\bundled-dependencies\nifi-web-docs-2.0.0-M2.war}
2024-03-04 14:07:01,304 INFO [main] o.e.j.ee10.servlet.ServletContextHandler Started oeje10w.WebAppContext@7c5eb88c{nifi-docs,/nifi-docs,b=file:///C:/Users/ASUS/Desktop/m/work/jetty/nifi-web-docs-2.0.0-M2.war/webapp/,a=AVAILABLE,h=oeje10s.SessionHandler@2e3c5ecc{STARTED}}{.\work\nar\extensions\nifi-server-nar-2.0.0-M2.nar-unpacked\NAR-INF\bundled-dependencies\nifi-web-docs-2.0.0-M2.war}
2024-03-04 14:07:01,631 INFO [main] o.e.j.server.handler.ContextHandler._nf No Spring WebApplicationInitializer types detected on classpath
2024-03-04 14:07:01,631 INFO [main] o.e.jetty.server.handler.ContextHandler Started oeje10w.WebAppContext@46199519{nifi-web-frontend,/nf,b=file:///C:/Users/ASUS/Desktop/m/work/jetty/nifi-web-frontend-2.0.0-M2.war/webapp/,a=AVAILABLE,h=oeje10s.SessionHandler@389f4282{STARTED}}{.\work\nar\extensions\nifi-server-nar-2.0.0-M2.nar-unpacked\NAR-INF\bundled-dependencies\nifi-web-frontend-2.0.0-M2.war}
2024-03-04 14:07:01,635 INFO [main] o.e.j.ee10.servlet.ServletContextHandler Started oeje10w.WebAppContext@46199519{nifi-web-frontend,/nf,b=file:///C:/Users/ASUS/Desktop/m/work/jetty/nifi-web-frontend-2.0.0-M2.war/webapp/,a=AVAILABLE,h=oeje10s.SessionHandler@389f4282{STARTED}}{.\work\nar\extensions\nifi-server-nar-2.0.0-M2.nar-unpacked\NAR-INF\bundled-dependencies\nifi-web-frontend-2.0.0-M2.war}
2024-03-04 14:07:01,855 INFO [main] o.e.j.server.handler.ContextHandler._ No Spring WebApplicationInitializer types detected on classpath
2024-03-04 14:07:01,856 INFO [main] o.e.jetty.server.handler.ContextHandler Started oeje10w.WebAppContext@67f5066e{nifi-error,/,b=file:///C:/Users/ASUS/Desktop/m/work/jetty/nifi-web-error-2.0.0-M2.war/webapp/,a=AVAILABLE,h=oeje10s.SessionHandler@14b3976{STARTED}}{.\work\nar\extensions\nifi-server-nar-2.0.0-M2.nar-unpacked\NAR-INF\bundled-dependencies\nifi-web-error-2.0.0-M2.war}
2024-03-04 14:07:01,860 INFO [main] o.e.j.ee10.servlet.ServletContextHandler Started oeje10w.WebAppContext@67f5066e{nifi-error,/,b=file:///C:/Users/ASUS/Desktop/m/work/jetty/nifi-web-error-2.0.0-M2.war/webapp/,a=AVAILABLE,h=oeje10s.SessionHandler@14b3976{STARTED}}{.\work\nar\extensions\nifi-server-nar-2.0.0-M2.nar-unpacked\NAR-INF\bundled-dependencies\nifi-web-error-2.0.0-M2.war}
2024-03-04 14:07:01,879 INFO [main] o.eclipse.jetty.server.AbstractConnector Started ServerConnector@5632bed3{SSL, (ssl, alpn, h2, http/1.1)}{127.0.0.1:8443}
2024-03-04 14:07:01,881 INFO [main] org.eclipse.jetty.server.Server Started oejs.Server@30a9e3db{STARTING}[12.0.5,sto=0] @18427ms
2024-03-04 14:07:01,881 WARN [main] org.apache.nifi.web.server.JettyServer Failed to start web server... shutting down.
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration': Unsatisfied dependency expressed through method 'setFilterChains' parameter 0: Error creating bean with name 'securityFilterChain' defined in org.apache.nifi.web.security.configuration.WebSecurityConfiguration: Unsatisfied dependency expressed through method 'securityFilterChain' parameter 2: Error creating bean with name 'org.apache.nifi.web.security.configuration.JwtAuthenticationSecurityConfiguration': Unsatisfied dependency expressed through constructor parameter 2: Error creating bean with name 'flowController': FactoryBean threw exception on object creation
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:884)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:837)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:497)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1414)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:518)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:949)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:615)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:394)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:274)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:102)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:1582)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.contextInitialized(ServletContextHandler.java:490)
at org.eclipse.jetty.ee10.servlet.ServletHandler.initialize(ServletHandler.java:670)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.startContext(ServletContextHandler.java:1316)
at org.eclipse.jetty.ee10.webapp.WebAppContext.startContext(WebAppContext.java:1223)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.lambda$doStart$0(ServletContextHandler.java:1042)
at org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.call(ContextHandler.java:1147)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.doStart(ServletContextHandler.java:1039)
at org.eclipse.jetty.ee10.webapp.WebAppContext.doStart(WebAppContext.java:496)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
at org.eclipse.jetty.server.Handler$Abstract.doStart(Handler.java:468)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
at org.eclipse.jetty.server.Handler$Abstract.doStart(Handler.java:468)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
at org.eclipse.jetty.server.Server.start(Server.java:622)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
at org.eclipse.jetty.server.Handler$Abstract.doStart(Handler.java:468)
at org.eclipse.jetty.server.Server.doStart(Server.java:563)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:773)
at org.apache.nifi.NiFi.<init>(NiFi.java:172)
at org.apache.nifi.NiFi.<init>(NiFi.java:83)
at org.apache.nifi.NiFi.main(NiFi.java:332)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityFilterChain' defined in org.apache.nifi.web.security.configuration.WebSecurityConfiguration: Unsatisfied dependency expressed through method 'securityFilterChain' parameter 2: Error creating bean with name 'org.apache.nifi.web.security.configuration.JwtAuthenticationSecurityConfiguration': Unsatisfied dependency expressed through constructor parameter 2: Error creating bean with name 'flowController': FactoryBean threw exception on object creation
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1330)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:558)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:518)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1633)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1597)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1488)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1375)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:876)
... 44 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.apache.nifi.web.security.configuration.JwtAuthenticationSecurityConfiguration': Unsatisfied dependency expressed through constructor parameter 2: Error creating bean with name 'flowController': FactoryBean threw exception on object creation
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:236)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1350)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1187)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:558)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:518)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:408)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1330)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:558)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:518)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1417)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:906)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:784)
... 60 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowController': FactoryBean threw exception on object creation
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:184)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:120)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1812)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:1271)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1417)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:906)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:784)
... 83 common frames omitted
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 9009
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-03-04 14:07:01,882 INFO [Thread-0] org.apache.nifi.NiFi Application Server shutdown started
2024-03-04 14:07:01,882 INFO [Thread-0] org.eclipse.jetty.server.Server Stopped oejs.Server@30a9e3db{STOPPING}[12.0.5,sto=0]
 
1 ACCEPTED SOLUTION

avatar
Super Guru

Hi @coelacanth ,

Its me again from the first post you read that helped you resolve the first issue 🙂 All I can say is welcome to the club. the good news for you is i already went through this process and got it working - on windows as well- so hopefully I can get you going as well and save you some headache and time. Basically Enabling the Python Extension out of the box on windows is not going to work and Im not sure if there was any testing done on windows before releasing this feature.  First, you are right about python3 vs python as there is no such file under python windows and it should be changed to python. The second problem is the bin folder as it doesnt get created when the python venv  gets deployed to the controller folder first when you enable this feature, or when you add any new python extension processor. It seems under windows it creates a folder called Script where it stores all the python commands (.exe), so all you have to do is basically create the bin folder uder

.\work\python\controller

then copy whatever is under the "Script" folder to it and restart nifi and hopefully it will work. You only have to do that once for the controller folder but when you add new python processor and the vevn gets created for it under

\work\python\extensions\[Custom Processor]\2.0.0-SNAPSHOT\

You have to do the same thing of creating the bin folder and copying whatever in the Script folder to get it working. Actually the steps I do are the following:

1- Create the Custom processor

2- Copy the custom processor to the python extension folder .\python\extensions

3- Run Nifi the first time to create the Venv for the new processor under

.\work\python\extensions\[Custom Processor]\2.0.0-SNAPSHOT\

4- once the venv folder is created, turn nifi OFF because the custom processor is not going to load correctly and its going to keep saying "installing third party components...".

5- Create the bin folder and copy whatever in the script folder to it

\work\python\extensions\[Custom Processor]\2.0.0-SNAPSHOT\bin

6- Run nifi again. If everything is setup correctly with the processor and there is no compiler error , it will take few mins to download the dependencies ( depends ho many you have) and then it should work.

The Nifi development community needs to fix this bug either internally looking for the script folder aside from the bin folder, or make that configurable in the nifi.properties.

Note about out of the box python extensions: You might have problem getting the dependencies downloaded correctly for the ParseDocument extension. You might need to download those dependencies manually to get it to  work and here is another trick for you: if you happen to download those dependencies manually you need to create a file "dependency-download.complete"  with "True" value inside under the processor path 

\work\python\extensions\[Custom Processor]\2.0.0-SNAPSHOT\

to let nifi know that its finished downloading the dependencies and remove the error from the processor.

@pvillard, this is another issue that needs your attention. I mean to write an article about this but did not have the time.

Any way hopefully that is enough info to get you going. let me know if you have any other questions.

If you find this is helpful, please accept solution.

Thanks

 

 

 

 

 

View solution in original post

4 REPLIES 4

avatar
Super Guru

Hi @coelacanth ,

Its me again from the first post you read that helped you resolve the first issue 🙂 All I can say is welcome to the club. the good news for you is i already went through this process and got it working - on windows as well- so hopefully I can get you going as well and save you some headache and time. Basically Enabling the Python Extension out of the box on windows is not going to work and Im not sure if there was any testing done on windows before releasing this feature.  First, you are right about python3 vs python as there is no such file under python windows and it should be changed to python. The second problem is the bin folder as it doesnt get created when the python venv  gets deployed to the controller folder first when you enable this feature, or when you add any new python extension processor. It seems under windows it creates a folder called Script where it stores all the python commands (.exe), so all you have to do is basically create the bin folder uder

.\work\python\controller

then copy whatever is under the "Script" folder to it and restart nifi and hopefully it will work. You only have to do that once for the controller folder but when you add new python processor and the vevn gets created for it under

\work\python\extensions\[Custom Processor]\2.0.0-SNAPSHOT\

You have to do the same thing of creating the bin folder and copying whatever in the Script folder to get it working. Actually the steps I do are the following:

1- Create the Custom processor

2- Copy the custom processor to the python extension folder .\python\extensions

3- Run Nifi the first time to create the Venv for the new processor under

.\work\python\extensions\[Custom Processor]\2.0.0-SNAPSHOT\

4- once the venv folder is created, turn nifi OFF because the custom processor is not going to load correctly and its going to keep saying "installing third party components...".

5- Create the bin folder and copy whatever in the script folder to it

\work\python\extensions\[Custom Processor]\2.0.0-SNAPSHOT\bin

6- Run nifi again. If everything is setup correctly with the processor and there is no compiler error , it will take few mins to download the dependencies ( depends ho many you have) and then it should work.

The Nifi development community needs to fix this bug either internally looking for the script folder aside from the bin folder, or make that configurable in the nifi.properties.

Note about out of the box python extensions: You might have problem getting the dependencies downloaded correctly for the ParseDocument extension. You might need to download those dependencies manually to get it to  work and here is another trick for you: if you happen to download those dependencies manually you need to create a file "dependency-download.complete"  with "True" value inside under the processor path 

\work\python\extensions\[Custom Processor]\2.0.0-SNAPSHOT\

to let nifi know that its finished downloading the dependencies and remove the error from the processor.

@pvillard, this is another issue that needs your attention. I mean to write an article about this but did not have the time.

Any way hopefully that is enough info to get you going. let me know if you have any other questions.

If you find this is helpful, please accept solution.

Thanks

 

 

 

 

 

avatar
Explorer

@SAMSAL a huge thanks!
I only tried the bin solution on the work\python\controller and nifi no longer crashes.
First thing tomorrow I'll try it with a new processor.

Also thanks for the tips about dependencies 🙂

avatar
Explorer

@SAMSAL 

I've created a new python processor following your instructions and it worked.

The in box processors work too.

So I confirm the "Windows bin" solution worked on my side too.

Again thank you for your help!

avatar
Super Guru

@coelacanth,

My pleasure! Im glad it worked . If you find a better way than having to manually create the bin folder then copy the files from the script folder to it and restarting nifi every time you add new python processor or create the bin folder, please let us know and share. Right now for every python processor I create I have to restart my nifi instance 2 times:

1- Deploy the processor to the canvas so that the venv is created.

2- After the venv is created to copy the files to the bin folder.

I know  its possible to create vevn manually under the work folder and get it setup without relying much on Nifi to do it but Im afraid that might interfere with the process and cause other problems.

@pvillard, @MattWho , @cotopaul  please if you know better workaround for this let us know.