DependencyTrack / DependencyTrack/dependency-track
Dependency Track API Server - error with H2 "AFFECTEDVERSIONATTRIBUTION" after mirroring
- Dominant language
- Java
- Stars
- 4.2k
- Forks
- 811
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 237
Description
### Current Behavior
After setting up dependency track with a new volume, and the API server logs show it has completed the `NistApiMirrorTask` and `EpssMirrorTask` a h2 error is thrown which does not clear on restart:
```
2025-01-21 16:46:19,959 INFO [RequirementsVerifier] Initializing requirements verifier
2025-01-21 16:46:19,960 INFO [UpgradeInitializer] Initializing upgrade framework
2025-01-21 16:47:22,284 WARN [Schema] Exception thrown while querying indices for table=AFFECTEDVERSIONATTRIBUTION
org.h2.jdbc.JdbcSQLNonTransientException: General error: "org.h2.mvstore.MVStoreException: Chunk 19247 not found [2.3.232/9]" [50000-232]
```
### Steps to Reproduce
1. Start dependency track with new docker volume via docker compose.
2. Configure the following:
1. Admin user password change.
2. NVD API mirroring with an NVD API Key.
3. OSV with vuln ID matching.
3. Upload a BOM.
4. Await completion of `[NistApiMirrorTask]`, `[EpssMirrorTask]`, and `[EpssParser]`.
5. Await `[EmbeddedJettyServer]` doing a config dump, followed by the error.
### Expected Behavior
API server not to throw an error, indices from `AFFECTEDVERSIONATTRIBUTION` to match intended state.
### Dependency-Track Version
4.12.2
### Dependency-Track Distribution
Container Image
### Database Server
H2
### Database Server Version
_No response_
### Browser
Google Chrome
### Checklist
- [x] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/master/CONTRIBUTING.md#filing-issues)
- [x] I have checked the [existing issues](https://github.com/DependencyTrack/dependency-track/issues) for whether this defect was already reported
Contributor guide
Assessment
This issue has not been assessed yet.