[GH-ISSUE #3364] [BUG]: Ubuntu invalid instruction #2167

Closed
opened 2026-02-22 18:28:26 -05:00 by yindo · 6 comments
Owner

Originally created by @COREPanda777 on GitHub (Feb 27, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3364

How are you running AnythingLLM?

Docker (local)

What happened?

when trying to save the LLM it gives the error mentioned in the description


Ubuntu 24.04.2 LTS
Docker version 28.0.1
mintplexlabs/anythingllm latest


Docker LOG:

[backend] info: [EncryptionManager] Loaded existing key & salt for encrypting arbitrary data.
[backend] info: [TokenManager] Initialized new TokenManager instance for model: gpt-3.5-turbo
[backend] info: [TokenManager] Returning existing instance for model: gpt-3.5-turbo
[backend] info: [TELEMETRY ENABLED] Anonymous Telemetry enabled. Telemetry helps Mintplex Labs Inc improve AnythingLLM.
[backend] info: prisma:info Starting a sqlite pool with 21 connections.
[backend] info: [TELEMETRY SENT] {"event":"server_boot","distinctId":"94f03074-3240-4efa-99ec-b1862c788bf6","properties":{"commit":"--","runtime":"docker"}}
[backend] info: [CommunicationKey] RSA key pair generated for signed payloads within AnythingLLM services.
[backend] info: [EncryptionManager] Loaded existing key & salt for encrypting arbitrary data.
[backend] info: Primary server in HTTP mode listening on port 3001
[backend] info: [BackgroundWorkerService] Feature is not enabled and will not be started.
[backend] info: [MetaGenerator] fetching custom meta tag settings...
[backend] error: Error: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).
at new OpenAI (/app/server/node_modules/openai/index.js:53:19)
at openAiModels (/app/server/utils/helpers/customModels.js:84:18)
at getCustomModels (/app/server/utils/helpers/customModels.js:40:20)
at /app/server/endpoints/system.js:960:41
at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5)
at next (/app/server/node_modules/express/lib/router/route.js:149:13)
at /app/server/utils/middleware/multiUserProtected.js:60:7
at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5)
at next (/app/server/node_modules/express/lib/router/route.js:149:13)
at validatedRequest (/app/server/utils/middleware/validatedRequest.js:20:5)
[backend] error: TypeError: fetch failed
at node:internal/deps/undici/undici:12618:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ollamaAIModels (/app/server/utils/helpers/customModels.js:309:18)
at async getCustomModels (/app/server/utils/helpers/customModels.js:44:14)
at async /app/server/endpoints/system.js:960:35
[backend] info: EmbeddingEngine changed from undefined to native - resetting undefined namespaces
[backend] info: [Event Logged] - workspace_vectors_reset
[backend] info: Resetting anythingllm managed vector namespaces for
/usr/local/bin/docker-entrypoint.sh: line 7: 139 Illegal instruction (core dumped) node /app/server/index.j

Are there known steps to reproduce?

No response

Originally created by @COREPanda777 on GitHub (Feb 27, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3364 ### How are you running AnythingLLM? Docker (local) ### What happened? when trying to save the LLM it gives the error mentioned in the description --- Ubuntu 24.04.2 LTS Docker version 28.0.1 mintplexlabs/anythingllm latest --- Docker LOG: [backend] info: [EncryptionManager] Loaded existing key & salt for encrypting arbitrary data. [backend] info: [TokenManager] Initialized new TokenManager instance for model: gpt-3.5-turbo [backend] info: [TokenManager] Returning existing instance for model: gpt-3.5-turbo [backend] info: [TELEMETRY ENABLED] Anonymous Telemetry enabled. Telemetry helps Mintplex Labs Inc improve AnythingLLM. [backend] info: prisma:info Starting a sqlite pool with 21 connections. [backend] info: [TELEMETRY SENT] {"event":"server_boot","distinctId":"94f03074-3240-4efa-99ec-b1862c788bf6","properties":{"commit":"--","runtime":"docker"}} [backend] info: [CommunicationKey] RSA key pair generated for signed payloads within AnythingLLM services. [backend] info: [EncryptionManager] Loaded existing key & salt for encrypting arbitrary data. [backend] info: Primary server in HTTP mode listening on port 3001 [backend] info: [BackgroundWorkerService] Feature is not enabled and will not be started. [backend] info: [MetaGenerator] fetching custom meta tag settings... [backend] error: Error: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }). at new OpenAI (/app/server/node_modules/openai/index.js:53:19) at openAiModels (/app/server/utils/helpers/customModels.js:84:18) at getCustomModels (/app/server/utils/helpers/customModels.js:40:20) at /app/server/endpoints/system.js:960:41 at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5) at next (/app/server/node_modules/express/lib/router/route.js:149:13) at /app/server/utils/middleware/multiUserProtected.js:60:7 at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5) at next (/app/server/node_modules/express/lib/router/route.js:149:13) at validatedRequest (/app/server/utils/middleware/validatedRequest.js:20:5) [backend] error: TypeError: fetch failed at node:internal/deps/undici/undici:12618:11 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ollamaAIModels (/app/server/utils/helpers/customModels.js:309:18) at async getCustomModels (/app/server/utils/helpers/customModels.js:44:14) at async /app/server/endpoints/system.js:960:35 [backend] info: EmbeddingEngine changed from undefined to native - resetting undefined namespaces [backend] info: [Event Logged] - workspace_vectors_reset [backend] info: Resetting anythingllm managed vector namespaces for /usr/local/bin/docker-entrypoint.sh: line 7: 139 Illegal instruction (core dumped) node /app/server/index.j ### Are there known steps to reproduce? _No response_
yindo added the possible bugneeds info / can't replicate labels 2026-02-22 18:28:26 -05:00
yindo closed this issue 2026-02-22 18:28:26 -05:00
Author
Owner

@timothycarambat commented on GitHub (Feb 27, 2025):

What docker command are you using to start the container?

Also related https://github.com/Mintplex-Labs/anything-llm/issues/3332#issuecomment-2686539152
What CPU are you running on this machine? Most times this is due to incompatibility with the runtimes available for the Prisma ORM or the default vector DB.

@timothycarambat commented on GitHub (Feb 27, 2025): What docker command are you using to start the container? Also related https://github.com/Mintplex-Labs/anything-llm/issues/3332#issuecomment-2686539152 What CPU are you running on this machine? Most times this is due to incompatibility with the runtimes available for the Prisma ORM _or_ the default vector DB.
Author
Owner

@COREPanda777 commented on GitHub (Feb 27, 2025):

docker run -d -p 3001:3001 \
--name anythingllm \
--add-host=host.docker.internal:host-gateway \
--cap-add SYS_ADMIN \
--restart=always \
--health-cmd "/bin/bash /usr/local/bin/docker-healthcheck.sh || exit 1" \
--health-interval 60s \
--health-start-period 60s \
--health-timeout 10s \
-v ${STORAGE_LOCATION}:/app/server/storage \
-v ${STORAGE_LOCATION}/.env:/app/server/.env \
-e STORAGE_DIR="/app/server/storage" \
-w /app \
mintplexlabs/anythingllm

CPU : Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz

@COREPanda777 commented on GitHub (Feb 27, 2025): ``` docker run -d -p 3001:3001 \ --name anythingllm \ --add-host=host.docker.internal:host-gateway \ --cap-add SYS_ADMIN \ --restart=always \ --health-cmd "/bin/bash /usr/local/bin/docker-healthcheck.sh || exit 1" \ --health-interval 60s \ --health-start-period 60s \ --health-timeout 10s \ -v ${STORAGE_LOCATION}:/app/server/storage \ -v ${STORAGE_LOCATION}/.env:/app/server/.env \ -e STORAGE_DIR="/app/server/storage" \ -w /app \ mintplexlabs/anythingllm ``` > CPU : Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
Author
Owner

@timothycarambat commented on GitHub (Feb 27, 2025):

For that CPU i am seeing

Instruction Set Extensions -- Intel® AVX

AVX2 is required for lancedb, so that is why this fails. The CPU is lacking the proper instruction set - which is what the pinned issue is about.

Options:

  • Use another vector DB
  • use the lancedb_revert docker tag (not constantly updated!)
@timothycarambat commented on GitHub (Feb 27, 2025): For that CPU i am seeing > Instruction Set Extensions -- Intel® AVX AVX2 is required for lancedb, so that is why this fails. The CPU is lacking the proper instruction set - which is what the pinned issue is about. Options: - Use another vector DB - use the `lancedb_revert` docker tag (not constantly updated!)
Author
Owner

@christopherpaquin commented on GitHub (Mar 2, 2025):

"Use another vector DB"

How does one go about doing so? @timothycarambat

I am attempting to run anythingllm as a docker container using the instantiation command below.

As

export STORAGE_LOCATION=$HOME/anythingllm && \
mkdir -p $STORAGE_LOCATION && \
touch "$STORAGE_LOCATION/.env" && \
docker run -d -p 3001:3001 \
--cap-add SYS_ADMIN \
-v ${STORAGE_LOCATION}:/app/server/storage \
-v ${STORAGE_LOCATION}/.env:/app/server/.env \
-e STORAGE_DIR="/app/server/storage" \
mintplexlabs/anythingllm

I get this error when trying to save locally running ollama service as LLM provider. I have not chosen an specific vector db as I am still in the process of setting up AnythingLLM.

My cpu is older - 2x Intel(R) Xeon(R) CPU E5-2697 v2 @ 2.70GHz (Dell T620 - 2x Nvidia Tesla T4)

I am going to assume that my issue is with Prisma, as I see it starting in the docker logs. Can I assume that this cannot be worked around since its included in the docker image?

I can try to run anythingllm locally on my ubuntu desktop, however all containers/services I will want to run on the T620 due to its GPUs. Am I out of luck

@christopherpaquin commented on GitHub (Mar 2, 2025): "Use another vector DB" How does one go about doing so? @timothycarambat I am attempting to run anythingllm as a docker container using the instantiation command below. As ``` export STORAGE_LOCATION=$HOME/anythingllm && \ mkdir -p $STORAGE_LOCATION && \ touch "$STORAGE_LOCATION/.env" && \ docker run -d -p 3001:3001 \ --cap-add SYS_ADMIN \ -v ${STORAGE_LOCATION}:/app/server/storage \ -v ${STORAGE_LOCATION}/.env:/app/server/.env \ -e STORAGE_DIR="/app/server/storage" \ mintplexlabs/anythingllm ``` I get this error when trying to save locally running ollama service as LLM provider. I have not chosen an specific vector db as I am still in the process of setting up AnythingLLM. My cpu is older - 2x Intel(R) Xeon(R) CPU E5-2697 v2 @ 2.70GHz (Dell T620 - 2x Nvidia Tesla T4) I am going to assume that my issue is with Prisma, as I see it starting in the docker logs. Can I assume that this cannot be worked around since its included in the docker image? I can try to run anythingllm locally on my ubuntu desktop, however all containers/services I will want to run on the T620 due to its GPUs. Am I out of luck
Author
Owner

@timothycarambat commented on GitHub (Mar 3, 2025):

@christopherpaquin
That CPU is indeed old and only supports AVX - we need AVX2 at a minimum. While LanceDB would be an issue with this CPU, I can tell you that since you cannot save anything that the issue is Prisma compatibility on that arch since LanceDB incompatibility only shows an error during embedding.

So your issue here is certainly that the Prisma background process for the DB is crashing or failing to boot. You can fix this in a fork by changing this line:

https://github.com/Mintplex-Labs/anything-llm/blob/fab74037fae86e5c11b3ad0caecdb66a0dff691e/server/prisma/schema.prisma#L1-L4

to this

generator client {
  provider = "prisma-client-js"
  engineType = "binary"
}
@timothycarambat commented on GitHub (Mar 3, 2025): @christopherpaquin That CPU is indeed old and only supports AVX - we need AVX2 at a minimum. While LanceDB _would_ be an issue with this CPU, I can tell you that since you cannot save anything that the issue is Prisma compatibility on that arch since LanceDB incompatibility only shows an error during embedding. So your issue here is certainly that the Prisma background process for the DB is crashing or failing to boot. You can fix this in a fork by changing this line: https://github.com/Mintplex-Labs/anything-llm/blob/fab74037fae86e5c11b3ad0caecdb66a0dff691e/server/prisma/schema.prisma#L1-L4 to this ``` generator client { provider = "prisma-client-js" engineType = "binary" } ```
Author
Owner

@christopherpaquin commented on GitHub (Mar 3, 2025):

Thanks for the quick response.

Is it possible to run anything-llm on a workstation that supports AVX2 and target all installs to a remote system? Or is anything-llm meant to be run locally along side all services.

Are there any additional components that anything-llm can deploy with will have issues with no AVX2 instruction support, or am I misunderstanding how anywhere-llm works?

@christopherpaquin commented on GitHub (Mar 3, 2025): Thanks for the quick response. Is it possible to run anything-llm on a workstation that supports AVX2 and target all installs to a remote system? Or is anything-llm meant to be run locally along side all services. Are there any additional components that anything-llm can deploy with will have issues with no AVX2 instruction support, or am I misunderstanding how anywhere-llm works?
yindo changed title from [BUG]: Ubuntu invalid instruction to [GH-ISSUE #3364] [BUG]: Ubuntu invalid instruction 2026-06-05 14:44:57 -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#2167