marcelbirkner / docker-ci-tool-stack

Docker Infrastructure via docker-compose (Jenkins, SonarQube, Nexus, GitLab, Selenium Grid)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SonarQube comes up in maintenance mode, database upgrade impossible

raner opened this issue · comments

I just installed docker-ci-tool-stack on an AWS instance (Amazon Linux AMI) and I'm having trouble getting SonarQube to run properly. Jenkins and Nexus seem to work fine and I removed GitLab and SeleniumHub because I don't need those particular tools.

Initially, when I navigated to port 19000 I was immediately redirected to /maintenance which said:

SonarQube is under maintenance. Please check back later.
Whilst waiting, you might want to check new plugins to extend the current functionality.
If you are an administrator and have no idea why this message is showing, you should read the upgrade guide.

After googling a bit, I determined that a database upgrade might be necessary and navigated to /setup which provided me with a button to perform a database upgrade, which I clicked. Within a few seconds I received the following error message:

Impossible to upgrade database
Migration failed: An error has occurred, all later migrations canceled: No message available .
Please check logs.

The same error message is shown ever since when I navigate to /setup.
The docker logs for the sonar container can be found here; the logs for Sonar's database container are here. Both logs contain various error messages, but at this point it it difficult for me to determine which ones are relevant and which ones are not.

I had some difficulties with the more recent versions of docker-ci-tool-stack, so my work is based on version ef8017d.

Any ideas how to further diagnose this?

I use this repository for workshops. This is not production ready.
For production I use a configuration management tool like Ansible to provision the docker container.

See https://www.slideshare.net/MarcelBirkner/continuous-delivery-in-enterprise-environments-using-docker-ansible-and-jenkins

When using newer Versions of SonarQube you need to run the /setup step to migrate the database schema. This has worked for me in the last couple of years in various projects when running SonarQube in a Docker Container.

But I am not using docker-compose for production. Only for demo's. I use Ansible to provision/start/restart/update docker container in customer projects.

Greetings,
Marcel