DependencyTrack / DependencyTrack/dependency-track
Apiserver container won't start anymore
- Dominant language
- Java
- Stars
- 4.2k
- Forks
- 811
- Avg merge
- 8h
- Merged PRs (30d)
- 233
Description
### Current Behavior
[Config] Application: Dependency-Track
[Config] Version: 4.11.3
[Config] Built-on: 2024-06-03T09:33:35Z
We currently run dependency track without a dedicated db and all projects and data is stored in the container itself. I had to restart the container (not down it) just a restart and now it won't boot anymore and be stuck on the following:
2024-08-27 14:20:28,094 INFO [PersistenceInitializer] Shutting down database service
2024-08-27 14:20:29,248 INFO [EmbeddedJettyServer] alpine-executable-war v2.2.5 (c3a1a709-acdc-4ca7-96dd-5eaab858ee32) built on: 2024-02-29T20:30:01Z
2024-08-27 14:20:31,117 INFO [Config] --------------------------------------------------------------------------------
2024-08-27 14:20:31,119 INFO [Config] OS Name: Linux
2024-08-27 14:20:31,119 INFO [Config] OS Version: 5.15.0-1057-azure
2024-08-27 14:20:31,120 INFO [Config] OS Arch: amd64
2024-08-27 14:20:31,120 INFO [Config] CPU Cores: 2
2024-08-27 14:20:31,121 INFO [Config] Max Memory: 6.2 GB (6,660,554,752.0 bytes)
2024-08-27 14:20:31,122 INFO [Config] Java Vendor: Eclipse Adoptium
2024-08-27 14:20:31,123 INFO [Config] Java Version: 21.0.3+9-LTS
2024-08-27 14:20:31,123 INFO [Config] Java Home: /opt/java/openjdk
2024-08-27 14:20:31,124 INFO [Config] Java Temp: /tmp
2024-08-27 14:20:31,124 INFO [Config] User: dtrack
2024-08-27 14:20:31,124 INFO [Config] User Home: /data/
2024-08-27 14:20:31,124 INFO [Config] --------------------------------------------------------------------------------
2024-08-27 14:20:31,125 INFO [Config] Initializing Configuration
2024-08-27 14:20:31,125 INFO [Config] System property alpine.application.properties not specified
2024-08-27 14:20:31,125 INFO [Config] Loading application.properties from classpath
2024-08-27 14:20:31,129 INFO [Config] --------------------------------------------------------------------------------
2024-08-27 14:20:31,129 INFO [Config] Application: Dependency-Track
2024-08-27 14:20:31,130 INFO [Config] Version: 4.11.3
2024-08-27 14:20:31,130 INFO [Config] Built-on: 2024-06-03T09:33:35Z
2024-08-27 14:20:31,130 INFO [Config] --------------------------------------------------------------------------------
2024-08-27 14:20:31,130 INFO [Config] Framework: Alpine
2024-08-27 14:20:31,131 INFO [Config] Version : 2.2.5
2024-08-27 14:20:31,131 INFO [Config] Built-on: 2024-02-29T20:30:01Z
2024-08-27 14:20:31,131 INFO [Config] --------------------------------------------------------------------------------
2024-08-27 14:20:31,192 INFO [RequirementsVerifier] Initializing requirements verifier
2024-08-27 14:20:31,192 INFO [UpgradeInitializer] Initializing upgrade framework
or
2024-08-27 14:18:51,716 ERROR [Schema] An exception was thrown while adding/validating class(es) : The database has been closed [90098-224]
The database has been closed [90098-224]
org.datanucleus.exceptions.NucleusDataStoreException: The database has been closed [90098-224]
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.getConnection(ConnectionFactoryImpl.java:477)
at org.datanucleus.store.rdbms.AbstractSchemaTransaction.getCurrentConnection(AbstractSchemaTransaction.java:86)
at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.performTablesValidation(RDBMSStoreManager.java:3553)
at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.run(RDBMSStoreManager.java:3080)
at org.datanucleus.store.rdbms.AbstractSchemaTransaction.execute(AbstractSchemaTransaction.java:118)
at org.datanucleus.store.rdbms.RDBMSStoreManager.createSchemaForClasses(RDBMSStoreManager.java:3922)
at org.datanucleus.store.schema.SchemaTool.createSchemaForClasses(SchemaTool.java:507)
at org.datanucleus.PersistenceNucleusContextImpl.initialiseSchema(PersistenceNucleusContextImpl.java:825)
When restarting.
We are in the process of setting up a DB but at the moment we can't lose this data neither, I found post https://github.com/DependencyTrack/dependency-track/discussions/3665 which talks about deleting the volume for the DB but I don't wish to do this, is there any solution to this ?
### Steps to Reproduce
1. How no DB but store it in the container.
2. restart container docker restart apiserver
3.
### Expected Behavior
starting without an issue.
### Dependency-Track Version
4.11.3
### Dependency-Track Distribution
Container Image
### Database Server
N/A
### Database Server Version
_No response_
### Browser
Microsoft Edge
### 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.