[
https://issues.apache.org/jira/browse/NIFI-14975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Handermann resolved NIFI-14975.
-------------------------------------
Fix Version/s: 2.6.0
Assignee: Michael W Moser
Resolution: Fixed
> Registry starts and doesn't work even if exception happens during startup
> -------------------------------------------------------------------------
>
> Key: NIFI-14975
> URL: https://issues.apache.org/jira/browse/NIFI-14975
> Project: Apache NiFi
> Issue Type: Bug
> Components: NiFi Registry
> Reporter: Michael W Moser
> Assignee: Michael W Moser
> Priority: Major
> Fix For: 2.6.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> If NiFi Registry cannot connect to a remote Ldap or Database server using a
> configured UserGroupProvider, then Spring throws a
> org.springframework.beans.factory.UnsatisfiedDependencyException. However,
> Registry starts successfully but calls to the nifi-registry-api return HTTP
> ERROR 503 Service Unavailable.
> Recommend that Registry shutdown if its configuration is incorrect or remote
> services are unavailable on startup.
> {noformat}
> 2025-09-12 20:00:16,286 ERROR [main] o.springframework.boot.SpringApplication
> Application run failed
> org.springframework.beans.factory.UnsatisfiedDependencyException: Error
> creating bean with name 'accessPolicyResource' defined in file
> [/home/mwmoser/nifi-regis
> try-2.6.0-SNAPSHOT/work/jetty/nifi-registry-web-api-2.6.0-SNAPSHOT.war/webapp/WEB-INF/classes/org/apache/nifi/registry/web/api/AccessPolicyResource.class]:
> Unsa
> tisfied dependency expressed through constructor parameter 0: Error creating
> bean with name 'standardServiceFacade' defined in file
> [/home/mwmoser/nifi-registry
> -2.6.0-SNAPSHOT/work/jetty/nifi-registry-web-api-2.6.0-SNAPSHOT.war/webapp/WEB-INF/classes/org/apache/nifi/registry/web/service/StandardServiceFacade.class]:
> Un
> satisfied dependency expressed through constructor parameter 2: Error
> creating bean with name 'authorizationService' defined in URL
> [jar:file:/home/mwmoser/nifi
> -registry-2.6.0-SNAPSHOT/work/jetty/nifi-registry-web-api-2.6.0-SNAPSHOT.war/webapp/WEB-INF/lib/nifi-registry-framework-2.6.0-SNAPSHOT.jar!/org/apache/nifi/regi
> stry/service/AuthorizationService.class]: Unsatisfied dependency expressed
> through constructor parameter 1: Error creating bean with name
> 'getAuthorizer' define
> d in class path resource
> [org/apache/nifi/registry/security/authorization/AuthorizerFactory.class]:
> Failed to instantiate [org.apache.nifi.registry.security.aut
> horization.Authorizer]: Factory method 'getAuthorizer' threw exception with
> message: Failed to construct Authorizer.
> at
> org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:804)
> at
> org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:240)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1395)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1232)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:569)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339)
> at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:373)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1222)
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1188)
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1123)
> at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:987)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627)
> at
> org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
> at
> org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752)
> at
> org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439)
> at
> org.springframework.boot.SpringApplication.run(SpringApplication.java:318)
> at
> org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:194)
> at
> org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:174)
> at
> org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:102)
> at
> org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:171)
> at
> org.eclipse.jetty.ee10.servlet.ServletContainerInitializerHolder.doStart(ServletContainerInitializerHolder.java:155)
> at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
> at
> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
> at
> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
> at
> org.eclipse.jetty.ee10.servlet.ServletContextHandler$ServletContainerInitializerStarter.doStart(ServletContextHandler.java:3114)
> at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
> at
> org.eclipse.jetty.ee10.servlet.ServletContextHandler.startContext(ServletContextHandler.java:1298)
> at
> org.eclipse.jetty.ee10.webapp.WebAppContext.startWebapp(WebAppContext.java:1359)
> at
> org.eclipse.jetty.ee10.webapp.WebAppContext.startContext(WebAppContext.java:1317)
> at
> org.eclipse.jetty.ee10.servlet.ServletContextHandler.lambda$doStart$0(ServletContextHandler.java:1051)
> at
> org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.call(ContextHandler.java:1463)
> at
> org.eclipse.jetty.ee10.servlet.ServletContextHandler.doStart(ServletContextHandler.java:1048)
> at
> org.eclipse.jetty.ee10.webapp.WebAppContext.doStart(WebAppContext.java:510)
> at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
> at
> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
> at
> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:120)
> at org.eclipse.jetty.server.Handler$Abstract.doStart(Handler.java:491)
> at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
> at
> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
> at org.eclipse.jetty.server.Server.start(Server.java:643)
> at
> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:120)
> at org.eclipse.jetty.server.Handler$Abstract.doStart(Handler.java:491)
> at org.eclipse.jetty.server.Server.doStart(Server.java:584)
> at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
> at
> org.apache.nifi.registry.jetty.JettyServer.start(JettyServer.java:115)
> at org.apache.nifi.registry.NiFiRegistry.<init>(NiFiRegistry.java:98)
> at org.apache.nifi.registry.NiFiRegistry.main(NiFiRegistry.java:136)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)