Repository navigation
Bug: UI fails with 503 just after a successful install #8218
Description
ISSUE TYPE
- Bug Report
COMPONENT NAME
Setup, UI
CLOUDSTACK VERSION
4.19.0.0-snapshot.20231106
CONFIGURATION
Initial setup of management and KVM server on a single host
Possibly related to #7358
OS / ENVIRONMENT
Ubuntu 22.04.3
Java: openjdk 11.0.20.1 2023-08-24
MySQL: 8.0.35-0ubuntu0.22.04.1
SUMMARY
2023-11-10 13:45:27,306 ERROR [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Failed to load module [redfish] due to: [Error creating bean with name 'org.spr
ingframework.beans.factory.config.PropertyPlaceholderConfigurer#0' defined in URL [jar:file:/usr/share/cloudstack-management/lib/cloudstack-4.19.0.0-snapshot.20231106.jar!/M
ETA-INF/cloudstack/bootstrap/spring-bootstrap-context-inheritable.xml]: Cannot resolve reference to bean 'DefaultConfigResources' while setting bean property 'locations'; ne
sted exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'DefaultConfigResources' available].
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.19.0.0-snapshot.20231106.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.NoSuchBeanDefinitionExcept
ion: No bean named 'DefaultConfigResources' available
STEPS TO REPRODUCE
1. Install management and agent servers on a local host
2. Validate systemctl services:
> systemctl status cloudstack-management.service
● cloudstack-management.service - CloudStack Management Server
Loaded: loaded (/lib/systemd/system/cloudstack-management.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2023-11-10 13:44:10 UTC; 19min ago
> systemctl status cloudstack-agent.service
● cloudstack-agent.service - CloudStack Agent
Loaded: loaded (/lib/systemd/system/cloudstack-agent.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2023-11-10 13:44:12 UTC; 19min ago
3. Check UI:
admin@acs:~$ curl -I localhost:8080/client/
HTTP/1.1 503 Service Unavailable
EXPECTED RESULTS
UI starts on the management server host
ACTUAL RESULTS
UI fails with 503 due to the bean error
Activity
tampler commentedon Nov 10, 2023
As a possible fix, SO says it's needed to create a new directory
resourcesweizhouapache commentedon Nov 10, 2023
tampler commentedon Nov 10, 2023
Hello Wei
admin@acs:~$ ls /usr/share/cloudstack-management/lib/ bcpkix-jdk15on-1.70.jar cloud-plugin-storage-volume-linstor-4.19.0.0-snapshot.20231106.jar mysql-connector-java-8.0.19.jar bcprov-jdk15on-1.70.jar cloud-plugin-storage-volume-storpool-4.19.0.0-snapshot.20231106.jar bctls-jdk15on-1.70.jar cloudstack-4.19.0.0-snapshot.20231106.jartampler commentedon Nov 10, 2023
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) [42/504] 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:193) at org.apache.cloudstack.ServerDaemon.main(ServerDaemon.java:108) 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) ... 57 more 2023-11-10 13:45:27,322 DEBUG [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Trying to obtain module [bootstrap] context. 2023-11-10 13:45:27,322 ERROR [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Failed to start module [bootstrap] due to: [No bean named 'moduleStartup' avail able]. org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'moduleStartup' 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.doGetBean(AbstractBeanFactory.java:283)[-]BUG: Management UI [/-][+]Bug: UI fails with 503 just after a successful install[/+]tampler commentedon Nov 13, 2023
The issue is bigger here since I don't see any post-installation activities, including a lower than usual memory footprint and not writing to a
managementoperation log file.weizhouapache commentedon Nov 13, 2023
@tampler
I am able to reproduce the same issue on ubuntu22
https://download.cloudstack.org/testing/nightly/latest/debian/4.19/
GutoVeronezi commentedon Nov 13, 2023
@tampler could you send us the full logs?
tampler commentedon Nov 13, 2023
Would this be enough? 🤔
Otherwise let me know. I'll restart the installation on my VM and provide larger logs
BTW, I experience the same issue with
4.18.2.0nightly.weizhouapache commentedon Nov 13, 2023
@tampler
I have closed the PR #8229 which might be unnessary.
I fixed the issue by
cloudstack-setup-databasesGutoVeronezi commentedon Nov 13, 2023
The full logs would be necessary for this troubleshooting, as the message
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'DefaultConfigResources' availableseems just an indication of a previous error.tampler commentedon Nov 13, 2023
You don't wanna have a local MySQL server for prod deployments
I use
cloudstack-setup-databases cloud:cloud@mysql --deploy-as=root -i 192.168.0.20following this working tutorial. It would be fair to reproduce following that articleweizhouapache commentedon Nov 14, 2023
@tampler
I guess the startup process might depend on some records in database, so we need to setup database correctly.
The database can be local or remote, both are supported.
can you please setup a local/remote database and retry ?
38 remaining items
WowYouCanReallyDance commentedon Feb 7, 2024
I am now deploying again, this is logs:
WowYouCanReallyDance commentedon Feb 7, 2024
I'v deployed many times. And the strange thing is : it's not runned broken all the time. Sometimes it worked well.
weizhouapache commentedon Feb 7, 2024
@WowYouCanReallyDance
the root cause could be the database (connection issue, or misconfiguration).
can you restart mgmt server and share the new logs ?
WowYouCanReallyDance commentedon Feb 7, 2024
I don't know why, but it's working nice now. The same DB type and version mysql:5.7, nothing changed since last time. If you need the logs, I will provide to timely.
weizhouapache commentedon Feb 8, 2024
@WowYouCanReallyDance
did you make some changes on the database ?
WowYouCanReallyDance commentedon Feb 9, 2024
No. I use the database on containers by podman. Everytime I drop it and run again to take a start with totally same steps. Then I would run
cloudstack-setup-database…andcloudstack-setup-management.adietrich-ussignal commentedon Mar 6, 2024
@tampler I am experiencing a similar issue, but re-running the database setup procedure does not appear to resolve the issue. When the management-server loads, it fails to load nearly every module, however, no notable SQL errors appear in the logs for the install.
adietrich-ussignal commentedon Mar 6, 2024
Not sure if this is related, but I found that in setting up the db.properties file, the
cluster.node.IPwas getting set to 127.0.1.1, which, is not configured on any of the virtual machine interfaces on my single-node. Changing this to the VM's proper loopback, (in this case 127.0.0.1), resolved my issue with the 503.rightkick commentedon Apr 22, 2024
I confirm that after setting the
cluster.node.IPat/etc/cloudstack/management/db.propertiesto be the VM IP where ACS is installed, and restartingcloudstack-management.serviceI got the login prompt.nizigama commentedon Jun 11, 2024
updating
127.0.1.1to127.0.0.1in/etc/cloudstack/management/db.propertiesfixed the issue for medataseeek commentedon Jul 17, 2024
I confirm changing cluster.node.IP=127.0.0.1 on /etc/cloudstack/management/db.properties worked for me as well.
gobiursus commentedon Oct 17, 2024
I have same issue, change to 127.0.0.1 doesn't fix it.
apraba05 commentedon Jun 3, 2025
Still having the same issue even after using 127.0.0.1
nischalnischal2020 commentedon Sep 29, 2025
I am a little late but I had to add this,
My hosts file or DNS entry was pointing to a different IP in the system and so I got this error, I took the easier way and fixed my DNS entry to a proper IP and then
cloudstack-setup-database…
and
cloudstack-setup-management
and the UI came up