Environment:
- Current version: SonarQube Community Build 25.12.0.117093
- Target version: SonarQube Community Build 26.6.0.123539
- Database: PostgreSQL 14.23
- Java: OpenJDK 21.0.11
- OS: Ubuntu 22.04
Issue:
Attempting to upgrade from SonarQube Community Build 25.12.0.117093 to 26.6.0.123539 results in startup failure:
"The version of SonarQube you are trying to upgrade from is too old. Please upgrade to the 25.12 version first."
Observations:
- Current 25.12 instance is healthy and operational.
- API confirms version:
curl http://localhost:9000/api/server/version
returns 25.12.0.117093
Database checks:
- internal_properties.installation.version = 25.12.0.117093
- migration_logs only contain successful migrations for target_version=25.12.0.117093
- schema_migrations maximum version is 202506026
- No failed migration_logs exist.
Upgrade attempts:
- Fresh extraction of 26.6 distribution.
- Copied only sonar.properties.
- Deleted temp/, logs/, and data/es8/.
- Verified Java 21.
- Correct ownership assigned to sonar user.
Despite this, startup fails during DatabaseServerCompatibility validation.
Has anyone successfully upgraded Community Build 25.12 → 26.6?
Is there an additional migration baseline requirement not documented?
SonarQube Community Build 26.6 upgrade from 25.12 fails with "Please upgrade to the 25.12 version fi
Hello @abbasnida and welcome to the Community! There is a known bug (even mentioned in our docs!) which affects some users in this precise way you’re describing. The solution typically is to upgrade to 26.1 first, and then to 26.6. Normally this wouldn’t be required, it’s an exception because of this bug. Could you give it a go?
Confirming that the 26.1 intermediate step works.
We hit the same wall: Community Build 25.7.0 → 26.5.0 was rejected, and after stepping to 25.12.0 and completing its migration (status UP, migration_logs showing all steps successful), 26.5.0 still failed with the identical message:
Caused by: The version of SonarQube you are trying to upgrade from is too old.
Please upgrade to the 25.12 version first.
Following Stevan’s advice, we went 25.12.0 → 26.1.0 → 26.5.0 instead. Both hops worked:
| Step | Result |
|---|---|
| 25.12.0.117093 → 26.5.0.122743 | rejected, “too old” |
| 25.12.0.117093 → 26.1.0.118079 | passed the check, DB_MIGRATION_NEEDED, migration ran, status: UP |
| 26.1.0.118079 → 26.5.0.122743 | same, status: UP |
Each hop needed POST /api/system/migrate_db and a few minutes before /api/system/status reported UP.
Two things that cost us time and may help others:
Rolling back is not free. Any 26.x start upgrades the embedded Elasticsearch index to 8.19, and an older SonarQube then refuses to open it:
java.lang.IllegalStateException: cannot downgrade a node from version [8.19.13] to version [8.16.6]
Recovery is to stop SonarQube, move data/es8 aside, and start again; the index is rebuilt from the database. Worth knowing before you try a failed upgrade twice, as we did.
Watch persisted extensions/. We run the community branch plugin image with a volume mounted over /opt/sonarqube/extensions, which hides the plugin the image ships there, and the jar name is not stable across releases (25.x ships sonarqube-community-branch-plugin-<version>.jar, 26.x ships it without the version). That produced a separate Error opening zip file or JAR manifest missing crash loop that masked the version issue until it was fixed.
Environment: Community Build, PostgreSQL, Kubernetes.