Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apiserver container won't start anymore #4100

Open
2 tasks done
samuvb opened this issue Aug 27, 2024 · 3 comments
Open
2 tasks done

Apiserver container won't start anymore #4100

samuvb opened this issue Aug 27, 2024 · 3 comments
Labels
defect Something isn't working in triage

Comments

@samuvb
Copy link

samuvb commented Aug 27, 2024

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 #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

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

@samuvb samuvb added defect Something isn't working in triage labels Aug 27, 2024
@samuvb
Copy link
Author

samuvb commented Aug 28, 2024

I've pulled out all content from the data/.dependency-track folder onto the local machine and created a bind volume to see if my projects would reappear but its all gone so also this didn't help.

@userdehghani
Copy link

same problem:

2024-09-01 12:44:55,871 INFO [RequirementsVerifier] Initializing requirements verifier
2024-09-01 12:44:55,872 INFO [UpgradeInitializer] Initializing upgrade framework

and

2024-09-01 12:30:26,702 ERROR [HikariPool] transactional - Error thrown while acquiring connection from data source
org.h2.jdbc.JdbcSQLNonTransientConnectionException: The database has been closed [90098-224]

@userdehghani
Copy link

userdehghani commented Sep 7, 2024

#3160 (comment)

@nscuro - how can we determine the h2 database version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Something isn't working in triage
Projects
None yet
Development

No branches or pull requests

3 participants
@userdehghani @samuvb and others