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

DB Server crashes during container startup #1361

Open
6 of 10 tasks
benhartwich opened this issue Nov 2, 2023 · 0 comments
Open
6 of 10 tasks

DB Server crashes during container startup #1361

benhartwich opened this issue Nov 2, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@benhartwich
Copy link

Please check that this issue hasn't been reported before.

  • I searched previous Bug Reports didn't find any similar reports.

Expected Behavior

AgentGPT docker startup with running db server

Current behaviour

Currently the db server seems to be killed / crashing during startup:

[+] Running 0/0
 ⠋ Network agentgpt_default  Creating                                                                                                                                                               0.1s
[+] Running 4/4d orphan containers ([agentgpt-chrome-1 selenium-hub]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans f ✔ Network agentgpt_default  Created                                                                                                                                                                0.1s
 ✔ Container frontend        Created                                                                                                                                                                7.5s
 ✔ Container agentgpt_db     Created                                                                                                                                                                0.0s
 ✔ Container platform        Created                                                                                                                                                                0.1s
Attaching to agentgpt_db, frontend, platform
frontend     | dos2unix: converting file wait-for-db.sh to Unix format...
frontend     | dos2unix: converting file .env.temp to Unix format...
frontend     | Database is unavailable - Sleeping...
agentgpt_db  | 2023-11-02 06:53:00+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.33-1.el8 started.
agentgpt_db  | 2023-11-02 06:53:01+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
agentgpt_db  | 2023-11-02 06:53:01+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.33-1.el8 started.
platform     | INFO:     Will watch for changes in these directories: ['/app/src']
platform     | INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
platform     | INFO:     Started reloader process [1] using WatchFiles
agentgpt_db  | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
agentgpt_db  | 2023-11-02T06:53:01.781500Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
agentgpt_db  | 2023-11-02T06:53:01.783023Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.33) starting as process 1
agentgpt_db  | 2023-11-02T06:53:01.789545Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
agentgpt_db  | 2023-11-02T06:53:01.966850Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
agentgpt_db  | 2023-11-02T06:53:02.267816Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
agentgpt_db  | 2023-11-02T06:53:02.267885Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
agentgpt_db  | 2023-11-02T06:53:02.271122Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
agentgpt_db  | 2023-11-02T06:53:02.310890Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
agentgpt_db  | 2023-11-02T06:53:02.311112Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.33'  socket: '/var/run/mysqld/mysqld.sock'  port: 3307  MySQL Community Server - GPL.
frontend     | Database is available! Continuing...
frontend     |
frontend     | ! unknown or unexpected option: --name
frontend     |
frontend     | Apply pending migrations to update the database schema in production/staging
frontend     |
frontend     | Usage
frontend     |
frontend     |   $ prisma migrate deploy [options]
frontend     |
frontend     | Options
frontend     |
frontend     |   -h, --help   Display this help message
frontend     |     --schema   Custom path to your Prisma schema
frontend     |
frontend     | Examples
frontend     |
frontend     |   Deploy your pending migrations to your production/staging database
frontend     |   $ prisma migrate deploy
frontend     |
frontend     |   Specify a schema
frontend     |   $ prisma migrate deploy --schema=./schema.prisma
frontend     |
frontend     | Environment variables loaded from .env
frontend     | Prisma schema loaded from prisma/schema.prisma
frontend     | Datasource "db": MySQL database "reworkd_platform" at "db:3307"
frontend     |
frontend     | Error: P1001: Can't reach database server at `db`:`3307`
frontend     |
frontend     | Please make sure your database server is running at `db`:`3307`.
platform     | 2023-11-02 06:53:06.192 | INFO     | logging:callHandlers:1706 - Started server process [8]
platform     | 2023-11-02 06:53:06.193 | INFO     | logging:callHandlers:1706 - Waiting for application startup.
frontend     | Environment variables loaded from .env
frontend     | Prisma schema loaded from prisma/schema.prisma
frontend     |
frontend     | ✔ Generated Prisma Client (4.13.0 | library) to ./node_modules/@prisma/client in 261ms
frontend     | You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
frontend     | ```
frontend     | import { PrismaClient } from '@prisma/client'
frontend     | const prisma = new PrismaClient()
frontend     | ```
platform     | 2023-11-02 06:53:08.739 | INFO     | logging:callHandlers:1706 - Application startup complete.
frontend     |
frontend     | > [email protected] dev
frontend     | > next dev
frontend     |
frontend     | Attention: Next.js now collects completely anonymous telemetry regarding usage.
frontend     | This information is used to shape Next.js' roadmap and prioritize features.
frontend     | You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
frontend     | https://nextjs.org/telemetry
frontend     |
frontend     |   ▲ Next.js 13.5.6
frontend     |   - Local:        http://localhost:3000
frontend     |   - Environments: .env
frontend     |
frontend     |  ✓ Ready in 3.4s
platform     | 2023-11-02 06:59:20.584 | INFO     | logging:callHandlers:1706 - 205.210.31.69:63664 - "GET / HTTP/1.1" 404
frontend     |  ○ Compiling / ...
frontend     |  ✓ Compiled / in 16.2s (1617 modules)
frontend     |  ✓ Compiled in 1253ms (1617 modules)
platform     | 2023-11-02 07:03:55.599 | INFO     | logging:callHandlers:1706 - 172.22.0.1:54758 - "OPTIONS /api/agent/tools HTTP/1.0" 200
platform     | 2023-11-02 07:03:55.622 | INFO     | logging:callHandlers:1706 - 172.22.0.1:54768 - "GET /api/agent/tools HTTP/1.0" 200
frontend     |  ✓ Compiled /api/auth/[...nextauth] in 455ms (357 modules)
platform     | 2023-11-02 07:03:58.337 | INFO     | logging:callHandlers:1706 - 172.22.0.1:56962 - "GET /api/agent/tools HTTP/1.0" 200
frontend     | API handler should not return a value, received object.
frontend     |  ○ Compiling /signin ...
frontend     |  ✓ Compiled /signin in 6.8s (1660 modules)
frontend     |  ✓ Compiled in 358ms (1296 modules)
frontend     |  ✓ Compiled in 200ms (1296 modules)
frontend     | prisma:error
frontend     | Invalid `p.user.findUnique()` invocation in
frontend     | /next/node_modules/@next-auth/prisma-adapter/dist/index.js:210:43
frontend     |
frontend     |   207 return {
frontend     |   208     createUser: (data) => p.user.create({ data }),
frontend     |   209     getUser: (id) => p.user.findUnique({ where: { id } }),
frontend     | → 210     getUserByEmail: (email) => p.user.findUnique(
frontend     | Can't reach database server at `db`:`3307`

Steps to reproduce

git pull
docker compose --build

Possible solution

No response

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Acknowledgements

  • My issue title is concise, descriptive, and in title casing.
  • I have searched the existing issues to make sure this bug has not been reported yet.
  • I am using the latest version of AgentGPT.
  • I have provided enough information for the maintainers to reproduce and diagnose the issue.
@benhartwich benhartwich added the bug Something isn't working label Nov 2, 2023
@benhartwich benhartwich changed the title DB Server crashes DB Server crashes during container startup Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant