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: Docker Compose can not work #6652

Open
2 of 4 tasks
wyl2003 opened this issue Oct 5, 2024 · 2 comments
Open
2 of 4 tasks

bug: Docker Compose can not work #6652

wyl2003 opened this issue Oct 5, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@wyl2003
Copy link

wyl2003 commented Oct 5, 2024

Describe the bug

The service cannot be started using docker-compose.yml, the logto container has an error and exits

Expected behavior

Successfully run logto locally

How to reproduce?

In the 1Panel server management panel, create an compose, copy the docker-compose.yml file on the web page, fill it in, and click Confirm to run. After two containers are successfully run, the logto container stops running and the following error appears in the log


> cli
> logto db seed --swe

info ✔ Created database logto
- Create tables
info ✔ Create tables
info ✔ [default] Generated config oidc.privateKeys
info ✔ [default] Generated config oidc.cookieKeys
info ✔ [default] Seed OIDC config
info ✔ [admin] Generated config oidc.privateKeys
info ✔ [admin] Generated config oidc.cookieKeys
info ✔ [admin] Seed OIDC config
info ✔ Cloud Service Application successfully created for: default
info ✔ Created machine-to-machine applications for Management API proxy
info ✔ Initialized tenant organization template
info ✔ Assigned the proxy roles to the applications
info ✔ Created tenant organizations
info ✔ Seed data
npm notice
npm notice New minor version of npm available! 10.8.2 -> 10.9.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.0
npm notice To update run: npm install -g [email protected]
npm notice

> start
> cd packages/core && NODE_ENV=production node .

(node:44) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
index    error Error while initializing app:
index    error Error: timeout expired
    at Timeout._onTimeout (/etc/logto/node_modules/.pnpm/[email protected]/node_modules/pg/lib/client.js:106:28)
    at listOnTimeout (node:internal/timers:581:17)
    at process.processTimers (node:internal/timers:519:7)

Context

  • Logto Cloud
  • Self-hosted, Logto version = 1.20
    • Container (Docker image)
    • Raw Node.js

Screenshots

image
@wyl2003 wyl2003 added the bug Something isn't working label Oct 5, 2024
@charIeszhao
Copy link
Member

charIeszhao commented Oct 15, 2024

It seems you have a DB connection timeout. And this PR (#6674) might potentially solve it by letting you override the default DB timeout (5s).

@isaced
Copy link

isaced commented Oct 23, 2024

I encountered the same problem and was curious why the connection to the local database would time out. I tried to execute ping postgres in the app container and it was normal.

$ ping postgres
PING postgres (10.0.1.59): 56 data bytes
64 bytes from 10.0.1.59: seq=0 ttl=64 time=0.315 ms
64 bytes from 10.0.1.59: seq=1 ttl=64 time=0.072 ms
64 bytes from 10.0.1.59: seq=2 ttl=64 time=0.086 ms
64 bytes from 10.0.1.59: seq=3 ttl=64 time=0.073 ms
64 bytes from 10.0.1.59: seq=4 ttl=64 time=0.066 ms
64 bytes from 10.0.1.59: seq=5 ttl=64 time=0.108 ms
64 bytes from 10.0.1.59: seq=6 ttl=64 time=0.094 ms
...

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

No branches or pull requests

3 participants