[GH-ISSUE #447] can not run by docker #253

Closed
opened 2026-02-22 18:18:35 -05:00 by yindo · 14 comments
Owner

Originally created by @IxaKylin on GitHub (Dec 14, 2023).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/447

this is my docker logs , it can not start

[2023-12-14 06:32:18 +0000] [10] [INFO] Starting gunicorn 20.1.0
[2023-12-14 06:32:18 +0000] [10] [INFO] Listening at: http://0.0.0.0:8888 (10)
[2023-12-14 06:32:18 +0000] [10] [INFO] Using worker: sync
[2023-12-14 06:32:18 +0000] [17] [INFO] Booting worker with pid: 17
[2023-12-14 06:32:18 +0000] [18] [INFO] Booting worker with pid: 18
[2023-12-14 06:32:18 +0000] [23] [INFO] Booting worker with pid: 23
[2023-12-14 06:32:18 +0000] [24] [INFO] Booting worker with pid: 24
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma

✔ Generated Prisma Client (v5.3.0) to ./node_modules/@prisma/client in 225ms

Start using Prisma Client in Node.js (See: https://pris.ly/d/client)

import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()

or start using Prisma Client at the edge (See: https://pris.ly/d/accelerate)

import { PrismaClient } from '@prisma/client/edge'
const prisma = new PrismaClient()

See other ways of importing Prisma Client: http://pris.ly/d/importing-client

warn Versions of prisma@5.3.1 and @prisma/client@5.3.0 don't match.
This might lead to unexpected behavior.
Please make sure they have the same version.
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "anythingllm.db" at "file:../storage/anythingllm.db"

Error: Schema engine error:
SQLite database error
unable to open database file: ../storage/anythingllm.db

Originally created by @IxaKylin on GitHub (Dec 14, 2023). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/447 this is my docker logs , it can not start [2023-12-14 06:32:18 +0000] [10] [INFO] Starting gunicorn 20.1.0 [2023-12-14 06:32:18 +0000] [10] [INFO] Listening at: http://0.0.0.0:8888 (10) [2023-12-14 06:32:18 +0000] [10] [INFO] Using worker: sync [2023-12-14 06:32:18 +0000] [17] [INFO] Booting worker with pid: 17 [2023-12-14 06:32:18 +0000] [18] [INFO] Booting worker with pid: 18 [2023-12-14 06:32:18 +0000] [23] [INFO] Booting worker with pid: 23 [2023-12-14 06:32:18 +0000] [24] [INFO] Booting worker with pid: 24 Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma ✔ Generated Prisma Client (v5.3.0) to ./node_modules/@prisma/client in 225ms Start using Prisma Client in Node.js (See: https://pris.ly/d/client) ``` import { PrismaClient } from '@prisma/client' const prisma = new PrismaClient() ``` or start using Prisma Client at the edge (See: https://pris.ly/d/accelerate) ``` import { PrismaClient } from '@prisma/client/edge' const prisma = new PrismaClient() ``` See other ways of importing Prisma Client: http://pris.ly/d/importing-client warn Versions of prisma@5.3.1 and @prisma/client@5.3.0 don't match. This might lead to unexpected behavior. Please make sure they have the same version. Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma Datasource "db": SQLite database "anythingllm.db" at "file:../storage/anythingllm.db" Error: Schema engine error: SQLite database error unable to open database file: ../storage/anythingllm.db
yindo added the Dockerpossible bug labels 2026-02-22 18:18:35 -05:00
yindo closed this issue 2026-02-22 18:18:35 -05:00
Author
Owner

@AldrinL commented on GitHub (Dec 14, 2023):

same here

@AldrinL commented on GitHub (Dec 14, 2023): same here
Author
Owner

@smartvis commented on GitHub (Dec 14, 2023):

me too

docker logs 3f3a

[2023-12-14 07:23:46 +0000] [9] [INFO] Starting gunicorn 20.1.0
[2023-12-14 07:23:46 +0000] [9] [INFO] Listening at: http://0.0.0.0:8888 (9)
[2023-12-14 07:23:46 +0000] [9] [INFO] Using worker: sync
[2023-12-14 07:23:46 +0000] [21] [INFO] Booting worker with pid: 21
[2023-12-14 07:23:46 +0000] [22] [INFO] Booting worker with pid: 22
[2023-12-14 07:23:46 +0000] [23] [INFO] Booting worker with pid: 23
[2023-12-14 07:23:46 +0000] [24] [INFO] Booting worker with pid: 24
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma

✔ Generated Prisma Client (v5.3.0) to ./node_modules/@prisma/client in 157ms

Start using Prisma Client in Node.js (See: https://pris.ly/d/client)

import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()

or start using Prisma Client at the edge (See: https://pris.ly/d/accelerate)

import { PrismaClient } from '@prisma/client/edge'
const prisma = new PrismaClient()

See other ways of importing Prisma Client: http://pris.ly/d/importing-client

warn Versions of prisma@5.3.1 and @prisma/client@5.3.0 don't match.
This might lead to unexpected behavior.
Please make sure they have the same version.
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "anythingllm.db" at "file:../storage/anythingllm.db"

Error: Schema engine error:
SQLite database error
unable to open database file: ../storage/anythingllm.db

@smartvis commented on GitHub (Dec 14, 2023): me too # docker logs 3f3a [2023-12-14 07:23:46 +0000] [9] [INFO] Starting gunicorn 20.1.0 [2023-12-14 07:23:46 +0000] [9] [INFO] Listening at: http://0.0.0.0:8888 (9) [2023-12-14 07:23:46 +0000] [9] [INFO] Using worker: sync [2023-12-14 07:23:46 +0000] [21] [INFO] Booting worker with pid: 21 [2023-12-14 07:23:46 +0000] [22] [INFO] Booting worker with pid: 22 [2023-12-14 07:23:46 +0000] [23] [INFO] Booting worker with pid: 23 [2023-12-14 07:23:46 +0000] [24] [INFO] Booting worker with pid: 24 Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma ✔ Generated Prisma Client (v5.3.0) to ./node_modules/@prisma/client in 157ms Start using Prisma Client in Node.js (See: https://pris.ly/d/client) ``` import { PrismaClient } from '@prisma/client' const prisma = new PrismaClient() ``` or start using Prisma Client at the edge (See: https://pris.ly/d/accelerate) ``` import { PrismaClient } from '@prisma/client/edge' const prisma = new PrismaClient() ``` See other ways of importing Prisma Client: http://pris.ly/d/importing-client warn Versions of prisma@5.3.1 and @prisma/client@5.3.0 don't match. This might lead to unexpected behavior. Please make sure they have the same version. Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma Datasource "db": SQLite database "anythingllm.db" at "file:../storage/anythingllm.db" Error: Schema engine error: SQLite database error unable to open database file: ../storage/anythingllm.db
Author
Owner

@tiagogcunha commented on GitHub (Dec 14, 2023):

Same:
OS: Ubuntu 22.04.3 LTS
Error: Schema engine error:
SQLite database error
unable to open database file: ../storage/anythingllm.db

@tiagogcunha commented on GitHub (Dec 14, 2023): Same: OS: Ubuntu 22.04.3 LTS Error: Schema engine error: SQLite database error unable to open database file: ../storage/anythingllm.db
Author
Owner

@xkz0777 commented on GitHub (Dec 14, 2023):

Same, OS: macOS Sonoma 14.1.2

@xkz0777 commented on GitHub (Dec 14, 2023): Same, OS: macOS Sonoma 14.1.2
Author
Owner

@timothycarambat commented on GitHub (Dec 14, 2023):

Are you building from source or pulling from docker?

@timothycarambat commented on GitHub (Dec 14, 2023): Are you building from source or pulling from docker?
Author
Owner

@tiagogcunha commented on GitHub (Dec 14, 2023):

Building from source works but pulling from docker doesn’t

@tiagogcunha commented on GitHub (Dec 14, 2023): Building from source works but pulling from docker doesn’t
Author
Owner

@timothycarambat commented on GitHub (Dec 14, 2023):

I just pulled from docker on a fresh AWS instance and it works

See other ways of importing Prisma Client: http://pris.ly/d/importing-client


warn Versions of prisma@5.3.1 and @prisma/client@5.3.0 don't match.
This might lead to unexpected behavior.
Please make sure they have the same version.
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "anythingllm.db" at "file:../storage/anythingllm.db"

SQLite database anythingllm.db created at file:../storage/anythingllm.db

4 migrations found in prisma/migrations

Applying migration `20230921191814_init`
Applying migration `20231101001441_init`
Applying migration `20231101195421_init`
Applying migration `20231129012019_add`

The following migrations have been applied:

migrations/
  └─ 20230921191814_init/
    └─ migration.sql
  └─ 20231101001441_init/
    └─ migration.sql
  └─ 20231101195421_init/
    └─ migration.sql
  └─ 20231129012019_add/
    └─ migration.sql
      
All migrations have been successfully applied.
[TELEMETRY ENABLED] Anonymous Telemetry enabled. Telemetry helps Mintplex Labs Inc improve AnythingLLM.
prisma:info Starting a sqlite pool with 17 connections.
@timothycarambat commented on GitHub (Dec 14, 2023): I just pulled from docker on a fresh AWS instance and it works ``` See other ways of importing Prisma Client: http://pris.ly/d/importing-client warn Versions of prisma@5.3.1 and @prisma/client@5.3.0 don't match. This might lead to unexpected behavior. Please make sure they have the same version. Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma Datasource "db": SQLite database "anythingllm.db" at "file:../storage/anythingllm.db" SQLite database anythingllm.db created at file:../storage/anythingllm.db 4 migrations found in prisma/migrations Applying migration `20230921191814_init` Applying migration `20231101001441_init` Applying migration `20231101195421_init` Applying migration `20231129012019_add` The following migrations have been applied: migrations/ └─ 20230921191814_init/ └─ migration.sql └─ 20231101001441_init/ └─ migration.sql └─ 20231101195421_init/ └─ migration.sql └─ 20231129012019_add/ └─ migration.sql All migrations have been successfully applied. [TELEMETRY ENABLED] Anonymous Telemetry enabled. Telemetry helps Mintplex Labs Inc improve AnythingLLM. prisma:info Starting a sqlite pool with 17 connections. ```
Author
Owner

@timothycarambat commented on GitHub (Dec 14, 2023):

Note: in this example i am not using external storage so if I delete the container all my data is lost. I tested both ways but this way is easier to show. Refer to docs to see how to setup external storage so you dont delete data between image updates!

All I run to boot up docker (without even using the default setup!) is
docker pull mintplexlabs/anythingllm:master (Digest: sha256:b86d7d449f1fef0406fb5b128e88081627cbe464f43196f989f576c1c5197036)

docker run -d -p 3001:3001 mintplexlabs/anythingllm:master

Then I can use localhost:3001 to use the container

@timothycarambat commented on GitHub (Dec 14, 2023): **Note**: in this example i am not using external storage so if I delete the container all my data is lost. I tested both ways but this way is easier to show. [Refer to docs to see how to setup external storage so you dont delete data between image updates!](https://github.com/Mintplex-Labs/anything-llm?tab=readme-ov-file#recommended-usage-with-docker-easy) All I run to boot up docker (without even using the default setup!) is `docker pull mintplexlabs/anythingllm:master` (Digest: `sha256:b86d7d449f1fef0406fb5b128e88081627cbe464f43196f989f576c1c5197036`) `docker run -d -p 3001:3001 mintplexlabs/anythingllm:master` Then I can use localhost:3001 to use the container
Author
Owner

@xkz0777 commented on GitHub (Dec 14, 2023):

All I run to boot up docker (without even using the default setup!) is docker pull mintplexlabs/anythingllm:master (Digest: sha256:b86d7d449f1fef0406fb5b128e88081627cbe464f43196f989f576c1c5197036)

docker run -d -p 3001:3001 mintplexlabs/anythingllm:master

Then I can use localhost:3001 to use the container

Using this command works for me too

@xkz0777 commented on GitHub (Dec 14, 2023): > All I run to boot up docker (without even using the default setup!) is `docker pull mintplexlabs/anythingllm:master` (Digest: `sha256:b86d7d449f1fef0406fb5b128e88081627cbe464f43196f989f576c1c5197036`) > > `docker run -d -p 3001:3001 mintplexlabs/anythingllm:master` > > Then I can use localhost:3001 to use the container Using this command works for me too
Author
Owner

@AldrinL commented on GitHub (Dec 15, 2023):

@timothycarambat then I assume the issue is with the external storage, right?
using external storage is recommanded when running with docker, can you find the RCA and fix it?

@AldrinL commented on GitHub (Dec 15, 2023): @timothycarambat then I assume the issue is with the external storage, right? using external storage is recommanded when running with docker, can you find the RCA and fix it?
Author
Owner

@timothycarambat commented on GitHub (Dec 15, 2023):

@AldrinL I couldn't possibly find the root cause since it works for me and others across various environments. Being I cannot replicate it you would need to debug on your system as the current documentation is correct.

If I had to guess, this is permission related and the docker container does not have permission to write to the directory you are using for storage outside of docker.

@timothycarambat commented on GitHub (Dec 15, 2023): @AldrinL I couldn't possibly find the root cause since it works for me and others across various environments. Being I cannot replicate it you would need to debug on your system as the current documentation is correct. If I had to guess, this is permission related and the docker container does not have permission to write to the directory you are using for storage outside of docker.
Author
Owner

@AldrinL commented on GitHub (Dec 18, 2023):

@timothycarambat just FYI, it might be because I am using root directory, but this works for me
the only change seems to be -u 0:0 \
export STORAGE_LOCATION=~/anythingllm && \ mkdir -p $STORAGE_LOCATION && \ touch "$STORAGE_LOCATION/.env" && \ docker run -d -p 3001:3001 \ -u 0:0 \ --name anythingllm \ --cap-add SYS_ADMIN \ -v ${STORAGE_LOCATION}/.env:/app/server/.env \ -e STORAGE_DIR="/app/server/storage" \ mintplexlabs/anythingllm:master

@AldrinL commented on GitHub (Dec 18, 2023): @timothycarambat just FYI, it might be because I am using root directory, but this works for me the only change seems to be `-u 0:0 \` `export STORAGE_LOCATION=~/anythingllm && \ mkdir -p $STORAGE_LOCATION && \ touch "$STORAGE_LOCATION/.env" && \ docker run -d -p 3001:3001 \ -u 0:0 \ --name anythingllm \ --cap-add SYS_ADMIN \ -v ${STORAGE_LOCATION}/.env:/app/server/.env \ -e STORAGE_DIR="/app/server/storage" \ mintplexlabs/anythingllm:master`
Author
Owner

@Allenxuxu commented on GitHub (Dec 18, 2023):

Add -u {user name}

for example

docker run -u root ...
@Allenxuxu commented on GitHub (Dec 18, 2023): Add `-u {user name}` for example ``` docker run -u root ... ```
Author
Owner

@hoishing commented on GitHub (Apr 24, 2024):

the problem is caused by not having write permission on anythingllm folder while creating the database file, setting user to root could do the trick, or change anythingllm folder mod to 777 can work around too.

@hoishing commented on GitHub (Apr 24, 2024): the problem is caused by not having write permission on anythingllm folder while creating the database file, setting user to root could do the trick, or change anythingllm folder mod to 777 can work around too.
yindo changed title from can not run by docker to [GH-ISSUE #447] can not run by docker 2026-06-05 14:34:18 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#253