DependencyTrack / DependencyTrack/dependency-track
ERROR: relation "SCHEMAVERSION" does not exist at character 23
- Dominant language
- Java
- Stars
- 4.2k
- Forks
- 811
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 237
Description
### Current Behavior
Each fresh new start of DependencyTrack on postgresql database starts with error in database log:
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
Success. You can now start the database server using:
pg_ctl -D /var/lib/postgresql/data -l logfile start
initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
waiting for server to start....2025-09-11 13:40:50.479 UTC [49] LOG: starting PostgreSQL 15.4 (Debian 15.4-2.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2025-09-11 13:40:50.484 UTC [49] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-09-11 13:40:50.496 UTC [52] LOG: database system was shut down at 2025-09-11 13:40:50 UTC
2025-09-11 13:40:50.503 UTC [49] LOG: database system is ready to accept connections
done
server started
CREATE DATABASE
/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
waiting for server to shut down...2025-09-11 13:40:50.707 UTC [49] LOG: received fast shutdown request
.2025-09-11 13:40:50.710 UTC [49] LOG: aborting any active transactions
2025-09-11 13:40:50.712 UTC [49] LOG: background worker "logical replication launcher" (PID 55) exited with exit code 1
2025-09-11 13:40:50.713 UTC [50] LOG: shutting down
2025-09-11 13:40:50.715 UTC [50] LOG: checkpoint starting: shutdown immediate
2025-09-11 13:40:50.758 UTC [50] LOG: checkpoint complete: wrote 918 buffers (5.6%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.029 s, sync=0.006 s, total=0.046 s; sync files=301, longest=0.003 s, average=0.001 s; distance=4223 kB, estimate=4223 kB
2025-09-11 13:40:50.765 UTC [49] LOG: database system is shut down
done
server stopped
PostgreSQL init process complete; ready for start up.
2025-09-11 13:40:50.834 UTC [1] LOG: starting PostgreSQL 15.4 (Debian 15.4-2.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2025-09-11 13:40:50.834 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2025-09-11 13:40:50.834 UTC [1] LOG: listening on IPv6 address "::", port 5432
2025-09-11 13:40:50.840 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-09-11 13:40:50.847 UTC [65] LOG: database system was shut down at 2025-09-11 13:40:50 UTC
2025-09-11 13:40:50.853 UTC [1] LOG: database system is ready to accept connections
2025-09-11 13:41:03.304 UTC [77] ERROR: relation "SCHEMAVERSION" does not exist at character 23
2025-09-11 13:41:03.304 UTC [77] STATEMENT: SELECT "VERSION" FROM "SCHEMAVERSION"
2025-09-11 13:41:03.311 UTC [77] ERROR: relation "SCHEMAVERSION" does not exist at character 23
2025-09-11 13:41:03.311 UTC [77] STATEMENT: SELECT "VERSION" FROM "SCHEMAVERSION"
2025-09-11 13:41:03.312 UTC [77] ERROR: relation "SCHEMAVERSION" does not exist at character 23
2025-09-11 13:41:03.312 UTC [77] STATEMENT: SELECT "VERSION" FROM "SCHEMAVERSION"
2025-09-11 13:45:50.944 UTC [63] LOG: checkpoint starting: time
2025-09-11 13:47:46.177 UTC [63] LOG: checkpoint complete: wrote 1156 buffers (7.1%); 0 WAL file(s) added, 0 removed, 1 recycled; write=115.212 s, sync=0.009 s, total=115.233 s; sync files=470, longest=0.003 s, average=0.001 s; distance=8576 kB, estimate=8576 kB
### Steps to Reproduce
First start of a fresh new instance of dependency track with external postgresql database using docker
### Expected Behavior
No error in log.
### Dependency-Track Version
4.13.4
### Dependency-Track Distribution
Container Image
### Database Server
PostgreSQL
### Database Server Version
15.4
### Browser
N/A
### 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.