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

bug: Unable to seed database on neon #5821

Closed
2 of 4 tasks
lewmilburn opened this issue May 4, 2024 · 4 comments
Closed
2 of 4 tasks

bug: Unable to seed database on neon #5821

lewmilburn opened this issue May 4, 2024 · 4 comments
Labels
pending-verification Something is still under investigation

Comments

@lewmilburn
Copy link

Describe the bug

2024-05-04 19:38:26 
2024-05-04 19:38:26 > cli
2024-05-04 19:38:26 > logto db seed --swe
2024-05-04 19:38:26 
2024-05-04 19:38:29 - Create tables
2024-05-04 19:38:31 info ✔ Create tables
2024-05-04 19:38:31 info ✔ [default] Generated config oidc.privateKeys
2024-05-04 19:38:32 info ✔ [default] Generated config oidc.cookieKeys
2024-05-04 19:38:32 info ✔ [default] Seed OIDC config
2024-05-04 19:38:32 info ✔ [admin] Generated config oidc.privateKeys
2024-05-04 19:38:32 info ✔ [admin] Generated config oidc.cookieKeys
2024-05-04 19:38:32 info ✔ [admin] Seed OIDC config
2024-05-04 19:38:33 info ✔ Cloud Service Application successfully created for: default
2024-05-04 19:38:34 info ✔ Created machine-to-machine applications for Management API proxy
2024-05-04 19:38:34 info ✔ Initialized tenant organization template
2024-05-04 19:38:34 info ✔ Assigned the proxy roles to the applications
2024-05-04 19:38:34 info ✔ Created tenant organizations
2024-05-04 19:38:34 info ✔ Seed data
2024-05-04 19:38:34 error error: Failed to get encrypted password: User "logto_tenant_portaldb" has no password assigned.
2024-05-04 19:38:34     at /etc/logto/node_modules/.pnpm/pg@8.11.3/node_modules/pg/lib/client.js:526:17
2024-05-04 19:38:34     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-05-04 19:38:34     at async execTransaction (file:///etc/logto/node_modules/.pnpm/@silverhand+slonik@31.0.0-beta.2/node_modules/@silverhand/slonik/dist/src/connectionMethods/transaction.js:21:13)
2024-05-04 19:38:34     at async transaction (file:///etc/logto/node_modules/.pnpm/@silverhand+slonik@31.0.0-beta.2/node_modules/@silverhand/slonik/dist/src/connectionMethods/transaction.js:74:16)
2024-05-04 19:38:34     at async createConnection (file:///etc/logto/node_modules/.pnpm/@silverhand+slonik@31.0.0-beta.2/node_modules/@silverhand/slonik/dist/src/factories/createConnection.js:108:18)
2024-05-04 19:38:34     at async Object.transaction (file:///etc/logto/node_modules/.pnpm/@silverhand+slonik@31.0.0-beta.2/node_modules/@silverhand/slonik/dist/src/binders/bindPool.js:108:20)
2024-05-04 19:38:34     at async seedByPool (file:///etc/logto/packages/cli/lib/commands/database/seed/index.js:8:5)
2024-05-04 19:38:34     at async Object.handler (file:///etc/logto/packages/cli/lib/commands/database/seed/index.js:77:13) {
2024-05-04 19:38:34   length: 171,
2024-05-04 19:38:34   severity: 'ERROR',
2024-05-04 19:38:34   code: 'XX000',
2024-05-04 19:38:34   detail: undefined,
2024-05-04 19:38:34   hint: undefined,
2024-05-04 19:38:34   position: undefined,
2024-05-04 19:38:34   internalPosition: undefined,
2024-05-04 19:38:34   internalQuery: undefined,
2024-05-04 19:38:34   where: undefined,
2024-05-04 19:38:34   schema: undefined,
2024-05-04 19:38:34   table: undefined,
2024-05-04 19:38:34   column: undefined,
2024-05-04 19:38:34   dataType: undefined,
2024-05-04 19:38:34   constraint: undefined,
2024-05-04 19:38:34   file: 'control_plane_connector.c',
2024-05-04 19:38:34   line: '181',
2024-05-04 19:38:34   routine: 'ConstructDeltaMessage'
2024-05-04 19:38:34 }
2024-05-04 19:38:34 error Error ocurred during seeding your database.
2024-05-04 19:38:34 
2024-05-04 19:38:34   Nothing has changed since the seeding process was in a transaction.
2024-05-04 19:38:34   Try to fix the error and seed again.
2024-05-04 19:38:34 error: Failed to get encrypted password: User "logto_tenant_portaldb" has no password assigned.
2024-05-04 19:38:34     at /etc/logto/node_modules/.pnpm/pg@8.11.3/node_modules/pg/lib/client.js:526:17
2024-05-04 19:38:34     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-05-04 19:38:34     at async execTransaction (file:///etc/logto/node_modules/.pnpm/@silverhand+slonik@31.0.0-beta.2/node_modules/@silverhand/slonik/dist/src/connectionMethods/transaction.js:21:13)
2024-05-04 19:38:34     at async transaction (file:///etc/logto/node_modules/.pnpm/@silverhand+slonik@31.0.0-beta.2/node_modules/@silverhand/slonik/dist/src/connectionMethods/transaction.js:74:16)
2024-05-04 19:38:34     at async createConnection (file:///etc/logto/node_modules/.pnpm/@silverhand+slonik@31.0.0-beta.2/node_modules/@silverhand/slonik/dist/src/factories/createConnection.js:108:18)
2024-05-04 19:38:34     at async Object.transaction (file:///etc/logto/node_modules/.pnpm/@silverhand+slonik@31.0.0-beta.2/node_modules/@silverhand/slonik/dist/src/binders/bindPool.js:108:20)
2024-05-04 19:38:34     at async seedByPool (file:///etc/logto/packages/cli/lib/commands/database/seed/index.js:8:5)
2024-05-04 19:38:34     at async Object.handler (file:///etc/logto/packages/cli/lib/commands/database/seed/index.js:77:13) {
2024-05-04 19:38:34   length: 171,
2024-05-04 19:38:34   severity: 'ERROR',
2024-05-04 19:38:34   code: 'XX000',
2024-05-04 19:38:34   detail: undefined,
2024-05-04 19:38:34   hint: undefined,
2024-05-04 19:38:34   position: undefined,
2024-05-04 19:38:34   internalPosition: undefined,
2024-05-04 19:38:34   internalQuery: undefined,
2024-05-04 19:38:34   where: undefined,
2024-05-04 19:38:34   schema: undefined,
2024-05-04 19:38:34   table: undefined,
2024-05-04 19:38:34   column: undefined,
2024-05-04 19:38:34   dataType: undefined,
2024-05-04 19:38:34   constraint: undefined,
2024-05-04 19:38:34   file: 'control_plane_connector.c',
2024-05-04 19:38:34   line: '181',
2024-05-04 19:38:34   routine: 'ConstructDeltaMessage'
2024-05-04 19:38:34 }
2024-05-04 19:38:34 
2024-05-04 19:38:34 Specify --help for available options

Expected behavior

How to reproduce?

  1. logto db seed

Context

  • Logto Cloud
  • Self-hosted, Logto version = @logto/cli v1.15.0
    • Container (Docker image)
    • Raw Node.js

Screenshots

@lewmilburn lewmilburn added the bug Something isn't working label May 4, 2024
@simeng-li
Copy link
Contributor

image

Looks like your db user does not have a password set.

@simeng-li simeng-li added pending-verification Something is still under investigation and removed bug Something isn't working labels May 6, 2024
@Vmrbee03
Copy link

Never

@Vmrbee03
Copy link

Never

Again if u ant serious

@darcyYe
Copy link
Contributor

darcyYe commented May 22, 2024

Have you tried seeding the DB with logto db seed --encrypt-base-role option? @lewmilburn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-verification Something is still under investigation
Development

No branches or pull requests

4 participants