I’m trying to install an OpenMRS standalone instance for a small pediatric center (with fewer than 30 patients).
However, I’m currently encountering problems when starting the application.
Here the commands I did:
git clone https://github.com/openmrs/openmrs-distro-referenceapplication.git
cd openmrs-distro-referenceapplication
git checkout 2.13.0
docker compose build
docker compose up
Here the error I’m currently receiving:
db-1 | 2023-12-12 9:35:30 0 [ERROR] InnoDB: Invalid flags 0x15 in ./ibdata1
db-1 | 2023-12-12 9:35:30 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
Found orphan containers ([openmrs-distro-referenceapplication-gateway-1 openmrs-distro-referenceapplication-frontend-1 openmrs-distro-referenceapplication-backend-1]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Which seems to have been the result of trying to start the containers from the main branch before switching to the 2.13.0 tag, but the containers, volumes, etc. weren’t removed. By default, then, when you run docker compose up it will reuse those same containers and volumes. Both the main branch and the 2.13.0 tag use a volume called db-data to persist the database contents. However, they use different and incompatible versions of MariaDB (specifically, the main branch uses 10.8 and the 2.13.0 tag uses 10.3), which is why you’re getting that error.
The fix is simple: run docker compose down -v --remove-orphans and then try running the docker compose up command again.