[GH-ISSUE #2258] Import Model with Error: Internal Server Error #1476

Closed
opened 2026-02-22 18:25:00 -05:00 by yindo · 5 comments
Owner

Originally created by @WalterLab22 on GitHub (Sep 10, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2258

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

Hi,

I've tried to load an official model or import a custom model several times in different dates and different times, there was alwasys an error "Internal Server Error".

AnythingLLM is installed in 2 PCs: Windows 11 and Windows 10, and got the same error.

Can you guide me to solve this issue?

Are there known steps to reproduce?

Settings -> AI Providers -> LLM, select AnythingLLM from LLM Provider drop-down:

  1. Click the official model "Llama3.1 8B" and press the button "Save changes".
  2. Same error when clicking "Import custom model".
Originally created by @WalterLab22 on GitHub (Sep 10, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2258 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? Hi, I've tried to load an official model or import a custom model several times in different dates and different times, there was alwasys an error "Internal Server Error". AnythingLLM is installed in 2 PCs: Windows 11 and Windows 10, and got the same error. Can you guide me to solve this issue? ### Are there known steps to reproduce? Settings -> AI Providers -> LLM, select AnythingLLM from LLM Provider drop-down: 1. Click the official model "Llama3.1 8B" and press the button "Save changes". 2. Same error when clicking "Import custom model".
yindo added the needs info / can't replicateDesktopinvestigating labels 2026-02-22 18:25:00 -05:00
yindo closed this issue 2026-02-22 18:25:00 -05:00
Author
Owner

@shatfield4 commented on GitHub (Sep 10, 2024):

Are you able to chat if you use other providers like OpenAI or Anthropic? The "Internal server error" is usually thrown by the backend so we want to narrow this down and see if it is only when the AnythingLLM provider is selected or if this happens on other providers as well.

@shatfield4 commented on GitHub (Sep 10, 2024): Are you able to chat if you use other providers like OpenAI or Anthropic? The "Internal server error" is usually thrown by the backend so we want to narrow this down and see if it is only when the AnythingLLM provider is selected or if this happens on other providers as well.
Author
Owner

@WalterLab22 commented on GitHub (Sep 10, 2024):

Yes, it works well by using Open API. Thank you for creating this great product.

By the way, the version is 1.6.4.

@WalterLab22 commented on GitHub (Sep 10, 2024): Yes, it works well by using Open API. Thank you for creating this great product. By the way, the version is 1.6.4.
Author
Owner

@timothycarambat commented on GitHub (Sep 10, 2024):

Any chance you can start the app in debug mode and replicate the error and see what the logs show? I think the error will be buried in there and will help us figure out what is going on there.

Possibly related Ollama registry had some downtime recently and model pulls were broken but would report as OK.

@timothycarambat commented on GitHub (Sep 10, 2024): Any chance you can start the app in [debug mode](https://docs.anythingllm.com/debug) and replicate the error and see what the logs show? I think the error will be buried in there and will help us figure out what is going on there. **Possibly related** Ollama registry had some downtime recently and model pulls were broken but would _report_ as OK.
Author
Owner

@WalterLab22 commented on GitHub (Sep 12, 2024):

Hi,

Attached please find the logs running in debug mode. One file contains log, which opened Power Shell as an Admin. The other one as default user.

By the way, I've upgraded to version 1.6.5.

PowerShell as Admin.txt
PowerShell Default User.txt

@WalterLab22 commented on GitHub (Sep 12, 2024): Hi, Attached please find the logs running in debug mode. One file contains log, which opened Power Shell as an Admin. The other one as default user. By the way, I've upgraded to version 1.6.5. [PowerShell as Admin.txt](https://github.com/user-attachments/files/16982302/PowerShell.as.Admin.txt) [PowerShell Default User.txt](https://github.com/user-attachments/files/16982303/PowerShell.Default.User.txt)
Author
Owner

@timothycarambat commented on GitHub (Sep 12, 2024):

You have some kind of permissions error with how you installed the application

....
[backend] error: TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11457:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Lr.availableModels (C:\Program Files\AnythingLLM\resources\backend\server.js:32:1038)
    at async JE (C:\Program Files\AnythingLLM\resources\backend\server.js:155:14376)
    at async $E (C:\Program Files\AnythingLLM\resources\backend\server.js:155:10052)
    at async C:\Program Files\AnythingLLM\resources\backend\server.js:163:21253
[backend] info: OllamaAPI offline - retrying. 6/3
[backend] info: OllamaAPI offline - retrying. 8/3
[backend] info: OllamaAPI offline - retrying. 8/3
[backend] info: OllamaAPI offline - retrying. 7/3
....

The internal ollama process is unable to start successfully at all and it is likely highly correlated with this error message at the top


EPERM: operation not permitted, unlink 'C:\Program Files\AnythingLLM\resources\b
ackend\node_modules\.prisma\client\index.js'


Prisma schema loaded from prisma\schema.prisma
Error:
EPERM: operation not permitted, unlink 'C:\Program Files\AnythingLLM\resources\backend\node_modules\.prisma\client\index.js'

The fact you are getting EPERM on the prisma client, which is in the same context as ollama for the app means that however you installed the app lead to the executing running user not being able to have permissions on the app it just installed.

If you go to C:\Program Files\AnythingLLM and make sure the folder is basically read/write all - any user can then run the app in this specific instance. There is something blocking what would normally work but since this is a desktop app there are number of things specific to your installation that could be impacting this otherwise normal installation.

Since the internal ollama also loads the custom GGUF, this is why you get this error. If you fix the EPERM, this issue will be fixed as well on your specific client machine.

@timothycarambat commented on GitHub (Sep 12, 2024): You have some kind of permissions error with how you installed the application ``` .... [backend] error: TypeError: fetch failed at Object.fetch (node:internal/deps/undici/undici:11457:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Lr.availableModels (C:\Program Files\AnythingLLM\resources\backend\server.js:32:1038) at async JE (C:\Program Files\AnythingLLM\resources\backend\server.js:155:14376) at async $E (C:\Program Files\AnythingLLM\resources\backend\server.js:155:10052) at async C:\Program Files\AnythingLLM\resources\backend\server.js:163:21253 [backend] info: OllamaAPI offline - retrying. 6/3 [backend] info: OllamaAPI offline - retrying. 8/3 [backend] info: OllamaAPI offline - retrying. 8/3 [backend] info: OllamaAPI offline - retrying. 7/3 .... ``` The internal ollama process is unable to start successfully at all and it is likely _highly correlated_ with this error message at the top ``` EPERM: operation not permitted, unlink 'C:\Program Files\AnythingLLM\resources\b ackend\node_modules\.prisma\client\index.js' Prisma schema loaded from prisma\schema.prisma Error: EPERM: operation not permitted, unlink 'C:\Program Files\AnythingLLM\resources\backend\node_modules\.prisma\client\index.js' ``` The fact you are getting EPERM on the prisma client, which is in the same context as `ollama` for the app means that however you installed the app lead to the executing running user not being able to have permissions on the app it just installed. If you go to `C:\Program Files\AnythingLLM` and make sure the folder is basically read/write all - any user can then run the app in this specific instance. There is something blocking what would normally work but since this is a desktop app there are number of things specific to your installation that could be impacting this otherwise normal installation. Since the internal ollama also loads the custom GGUF, this is why you get this error. If you fix the EPERM, this issue will be fixed as well on your specific client machine.
yindo changed title from Import Model with Error: `Internal Server Error` to [GH-ISSUE #2258] Import Model with Error: `Internal Server Error` 2026-06-05 14:40:58 -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#1476