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

make compose-test - error: CREATE DATABASE "backstage_plugin_app" - permission denied to create database #74

Open
mathieu-benoit opened this issue Dec 10, 2024 · 0 comments
Assignees

Comments

@mathieu-benoit
Copy link
Contributor

To continue with #73, we need to fix the issue below:

When running the Backstage container (make compose-test), permission denied to create the backstage_plugin_app:

...
[+] Running 5/5
 ✔ Container backstage-pg-HFeITA-1            Healthy                                                                                                                                                                                                                                             1.3s 
 ✔ Container backstage-routing-UghS7c-1       Running                                                                                                                                                                                                                                             0.0s 
 ✔ Container backstage-pg-HFeITA-init-1       Exited                                                                                                                                                                                                                                              1.3s 
 ✔ Container backstage-wait-for-resources-1   Exited                                                                                                                                                                                                                                              2.0s 
 ✔ Container backstage-backstage-backstage-1  Started

But the Backstage container will fail at runtime with this error as it needs to create a database:

Loading config from MergedConfigSource{FileConfigSource{path="/app/app-config.yaml"}, FileConfigSource{path="/app/app-config.production.yaml"}, EnvConfigSource{count=3}}
{"level":"info","message":"Found 1 new secrets in config that will be redacted","service":"backstage"}
{"level":"info","message":"Listening on :7007","service":"rootHttpRouter"}
{"level":"info","message":"Plugin initialization started: 'app', 'proxy', 'techdocs', 'auth', 'catalog', 'permission', 'search', 'scaffolder', 'humanitec'","service":"backstage","type":"initialization"}
{"level":"error","message":"Plugin 'app' thew an error during startup, waiting for 8 other plugins to finish before shutting down the process","service":"backstage","type":"initialization"}
/app/node_modules/@backstage/backend-defaults/dist/entrypoints/database/connectors/postgres.cjs.js:143
        throw new Error(
              ^

Error: Failed to connect to the database to make sure that 'backstage_plugin_app' exists, error: CREATE DATABASE "backstage_plugin_app" - permission denied to create database
    at PgConnector.getClient (/app/node_modules/@backstage/backend-defaults/dist/entrypoints/database/connectors/postgres.cjs.js:143:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.18.1

Need to implement this score-spec/score-compose#219.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant