Skip to content

Unable to load module context from URL after restart of cloudstack-management service #10079

Closed

Description

@alfadhir
ISSUE TYPE
  • Bug Report
COMPONENT NAME
cloudstack-management service
CLOUDSTACK VERSION
4.19.1.3
CONFIGURATION

Two management nodes, and database replication.

OS / ENVIRONMENT

Oracle Linux 9.5

SUMMARY

When restarting the management service it will not go up again. There are errors saying that "Application context not found for module definition [system, core, allocator, host-allocator-random, planner, api-planner]... "

The list goes on with a lot of modules that are unable to find application context.

It seems like there is a reference to a bean called 'DefaultConfigResources' that are missing.

STEPS TO REPRODUCE
Restart of management server did trigger this error.
EXPECTED RESULTS
Expected that the management server service would start properly
ACTUAL RESULTS
"Error creating bean with name 'org.springframework.beans.facory.PropertyPlaceholderConfigurer#0' defined in URL [jar:file:/usr/share/cloudstack-management/lib/cloudstack-4.19.1.3.jar!/META-INF/cloudstack/bootstrap/spring-bootstrap-context-inheritable.xml] Cannot resolve reference to bean 'DefaultConfigResources' while setting bean property 'locations' No bean named 'DefaultConfigResources' available"

Activity

  1. boring-cyborg commented on Dec 10, 2024

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template!

  2. weizhouapache commented on Dec 10, 2024

    @weizhouapache
    Member

    Any error log before it ?
    For example SQLException ?

  3. added this to the unplanned milestone on Dec 11, 2024
  4. rajujith commented on Dec 12, 2024

    @rajujith
    Contributor

    @alfadhir please run grep ERROR management-server.log to see if there is an issue starting the application.

  5. kumaraguru1735 commented on Jan 19, 2025

    @kumaraguru1735

    I am using cloudstack 4.20, I am getting this error while startup

    2023-11-22 07:50:32,495 WARN  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:[]) (logid:) Failed to start module [server-storage] due to: [Error creating bean with name 'org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0' defined in URL [jar:file:/usr/share/cloudstack-management/lib/cloudstack-4.20.0.0.jar!/META-INF/cloudstack/bootstrap/spring-bootstrap-context-inheritable.xml]: Cannot resolve reference to bean 'DefaultConfigResources' while setting bean property 'locations'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'DefaultConfigResources' available].
    2023-11-22 07:50:32,495 DEBUG [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:[]) (logid:) module start failure of module [server-storage] was due to: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0' defined in URL [jar:file:/usr/share/cloudstack-management/lib/cloudstack-4.20.0.0.jar!/META-INF/cloudstack/bootstrap/spring-bootstrap-context-inheritable.xml]: Cannot resolve reference to bean 'DefaultConfigResources' while setting bean property 'locations'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'DefaultConfigResources' available
            at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342)
            at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:113)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1707)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1452)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
            at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213)
            at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:171)
            at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:748)
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.loadContext(DefaultModuleDefinitionSet.java:174)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet$2.with(DefaultModuleDefinitionSet.java:143)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:274)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:279)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:279)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:279)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:279)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:279)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:262)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.loadContexts(DefaultModuleDefinitionSet.java:131)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.load(DefaultModuleDefinitionSet.java:79)
            at org.apache.cloudstack.spring.module.factory.ModuleBasedContextFactory.loadModules(ModuleBasedContextFactory.java:37)
            at org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.init(CloudStackSpringContext.java:71)
            at org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.<init>(CloudStackSpringContext.java:58)
            at org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.<init>(CloudStackSpringContext.java:62)
            at org.apache.cloudstack.spring.module.web.CloudStackContextLoaderListener.contextInitialized(CloudStackContextLoaderListener.java:53)
            at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1073)
            at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:572)
            at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:1002)
            at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:765)
            at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:379)
            at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1449)
            at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1414)
            at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:916)
            at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:288)
            at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
            at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
            at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
            at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
            at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:426)
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
            at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
            at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
            at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
            at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
            at org.eclipse.jetty.server.Server.start(Server.java:423)
            at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
            at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
            at org.eclipse.jetty.server.Server.doStart(Server.java:387)
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
            at org.apache.cloudstack.ServerDaemon.start(ServerDaemon.java:199)
            at org.apache.cloudstack.ServerDaemon.main(ServerDaemon.java:112)
    Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'DefaultConfigResources' available
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:874)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1358)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:309)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
            at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:330)
            ... 56 more
    
    
  6. kumaraguru1735 commented on Jan 19, 2025

    @kumaraguru1735
    2023-11-22 07:50:32,449 WARN  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:[]) (logid:) Failed to start module [server-alert-adapter-storage] due to: [Error creating bean with name 'org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0' defined in URL [jar:file:/usr/share/cloudstack-management/lib/cloudstack-4.20.0.0.jar!/META-INF/cloudstack/bootstrap/spring-bootstrap-context-inheritable.xml]: Cannot resolve reference to bean 'DefaultConfigResources' while setting bean property 'locations'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'DefaultConfigResources' available].
    2023-11-22 07:50:32,449 DEBUG [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:[]) (logid:) module start failure of module [server-alert-adapter-storage] was due to: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0' defined in URL [jar:file:/usr/share/cloudstack-management/lib/cloudstack-4.20.0.0.jar!/META-INF/cloudstack/bootstrap/spring-bootstrap-context-inheritable.xml]: Cannot resolve reference to bean 'DefaultConfigResources' while setting bean property 'locations'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'DefaultConfigResources' available
            at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342)
            at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:113)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1707)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1452)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
            at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213)
            at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:171)
            at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:748)
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.loadContext(DefaultModuleDefinitionSet.java:174)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet$2.with(DefaultModuleDefinitionSet.java:143)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:274)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:279)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:279)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:279)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:279)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:279)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:262)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.loadContexts(DefaultModuleDefinitionSet.java:131)
            at org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.load(DefaultModuleDefinitionSet.java:79)
            at org.apache.cloudstack.spring.module.factory.ModuleBasedContextFactory.loadModules(ModuleBasedContextFactory.java:37)
            at org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.init(CloudStackSpringContext.java:71)
            at org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.<init>(CloudStackSpringContext.java:58)
            at org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.<init>(CloudStackSpringContext.java:62)
            at org.apache.cloudstack.spring.module.web.CloudStackContextLoaderListener.contextInitialized(CloudStackContextLoaderListener.java:53)
            at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1073)
            at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:572)
            at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:1002)
            at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:765)
            at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:379)
            at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1449)
            at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1414)
            at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:916)
            at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:288)
            at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
            at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
            at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
            at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
            at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:426)
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
            at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
            at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
            at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
            at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
            at org.eclipse.jetty.server.Server.start(Server.java:423)
            at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
            at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
            at org.eclipse.jetty.server.Server.doStart(Server.java:387)
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
            at org.apache.cloudstack.ServerDaemon.start(ServerDaemon.java:199)
            at org.apache.cloudstack.ServerDaemon.main(ServerDaemon.java:112)
    Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'DefaultConfigResources' available
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:874)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1358)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:309)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
            at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:330)
            ... 56 more
    
    
  7. kumaraguru1735 commented on Jan 19, 2025

    @kumaraguru1735
    
    2023-11-22 07:50:33,848 DEBUG [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:[]) (logid:) Trying to obtain module [webhook] context.
    2023-11-22 07:50:33,848 WARN  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:[]) (logid:) Application context not found for module definition [webhook]
    2023-11-22 07:50:33,848 DEBUG [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:[]) (logid:) Trying to obtain module [outofbandmanagement] context.
    2023-11-22 07:50:33,848 WARN  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:[]) (logid:) Application context not found for module definition [outofbandmanagement]
    2023-11-22 07:50:33,848 DEBUG [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:[]) (logid:) Trying to obtain module [ipmitool] context.
    2023-11-22 07:50:33,848 WARN  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:[]) (logid:) Application context not found for module definition [ipmitool]
    2023-11-22 07:50:33,848 DEBUG [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:[]) (logid:) Trying to obtain module [nested-cloudstack] context.
    2023-11-22 07:50:33,848 WARN  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:[]) (logid:) Application context not found for module definition [nested-cloudstack]
    2023-11-22 07:50:33,848 DEBUG [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:[]) (logid:) Trying to obtain module [redfish] context.
    2023-11-22 07:50:33,848 WARN  [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:[]) (logid:) Application context not found for module definition [redfish]
    
    
  8. kumaraguru1735 commented on Jan 23, 2025

    @kumaraguru1735

    CloudStack works properly after correcting the date and time and restarting the management service using:
    systemctl restart cloudstack-management.

    You're all set—great job! 🚀

  9. locked and limited conversation to collaborators on Jan 23, 2025
  10. converted this issue into a discussion #10256 on Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions