cloudstack: wrong file rights on key file doesn't generate proper error message
ISSUE TYPE
- Bug Report
COMPONENT NAME
UI
CLOUDSTACK VERSION
cloudstack-management 4.16.1.0-1.el8
mysql 8.0.26
mysql-connector-java 8.0.28
mysql-connector-python 8.0.23
Java OpenJDK 11: OpenJDK Runtime Environment 18.9 (build 11.0.14.1+1-LTS)
CONFIGURATION
I haven’t configured the networking yet, because I wanted to see the GUI and then I’d shut it all down and get to the nitty gritty of the networking. The database is on the management machine as this is a test.
OS / ENVIRONMENT
RHEL 8 using CentOS 8 repo: https://download.cloudstack.org/centos/8/4.16/
SUMMARY
Unable to access the cloudstack UI. Getting 503 error.
STEPS TO REPRODUCE
dnf install cloudstack-management mysql-connector-java
# Configure the database.
cloudstack-setup-databases cloud:<cloud_user_db_password>@localhost --deploy-as=root:<root_user_db_password>
# >>> CloudStack has successfully initialized database, you can check your database configuration in /etc/cloudstack/management/db.properties
firewall-cmd --add-port={8080,8250,8443,9090}/tcp --permanent
cloudstack-setup-management
# >>> CloudStack Management Server setup is Done!
# Open browser to localhost:8080
Note: I originally didn’t have mysql-connector-java installed. I retraced my steps, dropped cloud and cloud_usage databases, and completely installed (dnf reinstall). It hasn’t helped. That was also the solution of #3843 and #4027, minus the aspects that are supposed to be fixed.
EXPECTED RESULTS
To see the UI.
ACTUAL RESULTS
HTTP ERROR 503 Service Unavailable in browser at localhost:8080/client/
This is the full contents of the log starting from boot when restarting the service to opening the page. I’d love to have a more verbose log or be pointed in any direction to get better logs. It’s not saying anything unlike #3843 and #4027.
After systemctl restart cloudstack-management
:
/var/log/cloudstack/management/management-server.log
2022-04-07 17:15:26,893 INFO [o.a.c.ServerDaemon] (main:null) (logid:) Server configuration file found: /etc/cloudstack/management/server.properties
2022-04-07 17:15:26,911 DEBUG [c.c.u.c.EncryptionSecretKeyChecker] (main:null) (logid:) Encryption Type: null
2022-04-07 17:15:26,915 INFO [o.a.c.ServerDaemon] (main:null) (logid:) Initializing server daemon on null, with http.enable=true, http.port=8080, https.enable=false, https.port=8443, context.path=/client
2022-04-07 17:15:31,705 INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Loading module context [bootstrap] from URL [jar:file:/usr/share/cloudstack-management/lib/cloudstack-4.16.1.0.jar!/META-INF/cloudstack/bootstrap/spring-bootstrap-context.xml]
2022-04-07 17:15:31,706 INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Loading module context [bootstrap] from URL [jar:file:/usr/share/cloudstack-management/lib/cloudstack-4.16.1.0.jar!/META-INF/cloudstack/bootstrap/spring-bootstrap-context-inheritable.xml]
2022-04-07 17:15:31,850 DEBUG [c.c.u.c.EncryptionSecretKeyChecker] (main:null) (logid:) Encryption Type: file
/var/log/cloudstack/management/access.log
127.0.0.1 - - [07/Apr/2022:21:26:11 +0000] "GET /client/ HTTP/1.1" 503 394 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.60 Safari/537.36" 28
127.0.0.1 - - [07/Apr/2022:21:26:12 +0000] "GET /client/ HTTP/1.1" 503 394 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.60 Safari/537.36" 1
127.0.0.1 - - [07/Apr/2022:21:26:12 +0000] "GET /client/favicon.ico HTTP/1.1" 503 405 "http://localhost:8080/client/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.60 Safari/537.36" 1
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 31 (12 by maintainers)
Fixed in https://github.com/apache/cloudstack/pull/6542
good find @rwdj, so we should rename this to something like “wrong file rights on key file doesn’t generate proper error message”?
@rwdj I am able to run successfully on CentOS 8.5.2111. Have followed the docs on: http://docs.cloudstack.apache.org/en/latest/installguide/management-server/index.html.
The differences I see from your steps is that I used iptables instead of firewall-cmd and used the
-i <IP>
option on thecloudstack-setup-databases
script. Can you please retry considering both changes?Thanks @rwdj - I don’t see what could be wrong. Right after the last line on the logs then CloudStack should start loading the modules. Attempting to replicate and will update soon