[GH-ISSUE #2498] [Question] Cannot upload a pdf document when installed on Linux locally, how to fix it? #1618

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

Originally created by @fengnex on GitHub (Oct 18, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2498

  1. Started server & collector and confirmed "Document Processor" is available
  2. Clicked to upload a pdf document
  3. The locally installed anythingllm keeps displaying "Uploading file ...":
    uploading
    At the same, there was a log in the console of the anythingllm's server:
    [backend] info: [CollectorApi] Response could not be completed
Originally created by @fengnex on GitHub (Oct 18, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2498 1. Started server & collector and confirmed "Document Processor" is available 2. Clicked to upload a pdf document 3. The locally installed anythingllm keeps displaying "Uploading file ...": ![uploading](https://github.com/user-attachments/assets/fc468ba2-1190-4091-a62c-bf0838dc303e) At the same, there was a log in the console of the anythingllm's server: `[backend] info: [CollectorApi] Response could not be completed`
yindo added the question label 2026-02-22 18:25:42 -05:00
yindo closed this issue 2026-02-22 18:25:42 -05:00
Author
Owner

@fengnex commented on GitHub (Oct 18, 2024):

Supplementary information:

  1. The server runs on port 13001 and the collector runs on the default port 8888
  2. The file has been successfully uploaded into the designated folder named "collector/hotdir/"
    Are there any possible erroneous configurations or other reasons for the problem? How to solve it?
@fengnex commented on GitHub (Oct 18, 2024): Supplementary information: 1. The server runs on port 13001 and the collector runs on the default port 8888 2. The file has been successfully uploaded into the designated folder named "collector/hotdir/" Are there any possible erroneous configurations or other reasons for the problem? How to solve it?
Author
Owner

@timothycarambat commented on GitHub (Oct 18, 2024):

What commands are you using to start the server, frontend, and collector?

  • yarn dev:server
  • yarn dev:collector
  • yarn dev:frontend

Should be all you need.

If the frontend can see the collector is only, then that means that the backend can reach the collector
http://0.0.0.0:${process.env.COLLECTOR_PORT || 8888}

Since the error message is not verbose the collector is simply responding with anything other than 200 OK
https://github.com/Mintplex-Labs/anything-llm/blob/41522cdfb450fdef503a94351303da3d6d20f917/server/utils/collectorApi/index.js#L65

Are you able to hit http://localhost:8888/accepts in a browser tab? It should return a simple JSON response.

It simply seems like the collector is failing to do even a simple request - like the service is not even running.

@timothycarambat commented on GitHub (Oct 18, 2024): What commands are you using to start the server, frontend, and collector? - `yarn dev:server` - `yarn dev:collector` - `yarn dev:frontend` Should be all you need. If the frontend can see the collector is only, then that means that the backend can reach the collector `http://0.0.0.0:${process.env.COLLECTOR_PORT || 8888}` Since the error message is not verbose the collector is simply responding with anything other than `200 OK` https://github.com/Mintplex-Labs/anything-llm/blob/41522cdfb450fdef503a94351303da3d6d20f917/server/utils/collectorApi/index.js#L65 Are you able to hit `http://localhost:8888/accepts` in a browser tab? It should return a simple JSON response. It simply seems like the collector is failing to do even a simple request - like the service is not even running.
Author
Owner

@fengnex commented on GitHub (Oct 22, 2024):

@timothycarambat I started the server and collector by executing cd server && NODE_ENV=production node index.js and cd collector && NODE_ENV=production node index.js from anythingllm's home directory.
Before that, I successfully finished executing yarn start according to https://github.com/Mintplex-Labs/anything-llm/blob/master/BARE_METAL.md

@fengnex commented on GitHub (Oct 22, 2024): @timothycarambat I started the server and collector by executing `cd server && NODE_ENV=production node index.js` and `cd collector && NODE_ENV=production node index.js` from anythingllm's home directory. Before that, I successfully finished executing `yarn start` according to [https://github.com/Mintplex-Labs/anything-llm/blob/master/BARE_METAL.md](url)
Author
Owner

@fengnex commented on GitHub (Oct 22, 2024):

@timothycarambat I can get the following output when access http://collector-ip:8888/accepts, the collector seems OK:
{"text/plain":[".txt",".md",".org",".adoc",".rst"],"text/html":[".html"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":[".pptx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":[".xlsx"],"application/vnd.oasis.opendocument.text":[".odt"],"application/vnd.oasis.opendocument.presentation":[".odp"],"application/pdf":[".pdf"],"application/mbox":[".mbox"],"audio/wav":[".wav"],"audio/mpeg":[".mp3"],"video/mp4":[".mp4"],"video/mpeg":[".mpeg"],"application/epub+zip":[".epub"]}

@fengnex commented on GitHub (Oct 22, 2024): @timothycarambat I can get the following output when access `http://collector-ip:8888/accepts`, the collector seems OK: `{"text/plain":[".txt",".md",".org",".adoc",".rst"],"text/html":[".html"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":[".pptx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":[".xlsx"],"application/vnd.oasis.opendocument.text":[".odt"],"application/vnd.oasis.opendocument.presentation":[".odp"],"application/pdf":[".pdf"],"application/mbox":[".mbox"],"audio/wav":[".wav"],"audio/mpeg":[".mp3"],"video/mp4":[".mp4"],"video/mpeg":[".mpeg"],"application/epub+zip":[".epub"]}`
Author
Owner

@fengnex commented on GitHub (Oct 22, 2024):

:13001/api/workspace/a001e24a-9041-43bd-b3bf-ef8a9398903f/upload:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
The upper error message appears in the browser's console when the problem occurs.

The problem (maybe a bug) has been confirmed in the freshly downloaded source code of both anything-llm-1.2.3 and anything-llm-1.2.2! @timothycarambat

By the way, I got 'Not Found' when access 'http://server-ip:13001/' after successfully executing yarn dev:server, yarn dev:collector and yarn dev:frontend. The development env seems not work, don't know how to make it ok

@fengnex commented on GitHub (Oct 22, 2024): `:13001/api/workspace/a001e24a-9041-43bd-b3bf-ef8a9398903f/upload:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)` The upper error message appears in the browser's console when the problem occurs. The problem (maybe a bug) has been confirmed in the freshly downloaded source code of both anything-llm-1.2.3 and anything-llm-1.2.2! @timothycarambat By the way, I got 'Not Found' when access 'http://server-ip:13001/' after successfully executing yarn dev:server, yarn dev:collector and yarn dev:frontend. The development env seems not work, don't know how to make it ok
Author
Owner

@timothycarambat commented on GitHub (Oct 22, 2024):

By the way, I got 'Not Found' when access 'http://server-ip:13001/' after successfully executing yarn dev:server

That is because in developer the server does not serve the frontend when in development. It only servers the server - so http://server-ip:13001/ => Not found is actually expected.
http://server-ip:13001/api/ping => 200 OK

http://collector-ip:8888/accepts returns OK

Okay so both the server and collector are up and running, but the frontend is apparently not relaying information correctly?

Without modifying any ports or anything run each of these commands in a new terminal tab from the repo root.
yarn dev:server -> runs server on localhost:3001
yarn dev:collector -> runs collector on localhost:8888
yarn dev:frontend -> runs frontend server on localhost:3001

Make sure before booting the frontend that you set the correct VITE_API_BASE in frontend/.env

https://github.com/Mintplex-Labs/anything-llm/blob/79ce26de815b6d91ff2db8ce1a59750c4d6290e0/frontend/.env.example#L1-L3

VITE_API_BASE='http://localhost:3001/api'

The frontend, by default expects the server to be on localhost:3001, and the server expects the collector to be on :8888 by default. All over localhost (127)
https://github.com/Mintplex-Labs/anything-llm/blob/79ce26de815b6d91ff2db8ce1a59750c4d6290e0/server/utils/collectorApi/index.js#L11

Its pretty clear from the history here now the issue is something with your config or how you are running this, not the set up since we run this exact codebase for our Linux based managed hosting and have no issues.

Are you trying to run the app outside of a docker image, but on a Linux server that you want to then access remotely? Or are you trying to run in developer mode to run things locally and make changes? Now, I'm not sure which one you are trying to do! Closing but convo can continue since this is not a bug or feature req

@timothycarambat commented on GitHub (Oct 22, 2024): > By the way, I got 'Not Found' when access 'http://server-ip:13001/' after successfully executing yarn dev:server That is because in developer the server does not serve the frontend when in development. It only servers the server - so `http://server-ip:13001/` => Not found is actually expected. `http://server-ip:13001/api/ping` => 200 OK > http://collector-ip:8888/accepts returns OK Okay so both the server and collector are up and running, but the frontend is apparently not relaying information correctly? Without modifying any ports or anything run each of these commands in a new terminal tab from the repo root. `yarn dev:server` -> runs server on localhost:3001 `yarn dev:collector` -> runs collector on localhost:8888 `yarn dev:frontend` -> runs frontend server on localhost:3001 **Make sure before booting the frontend** that you set the correct `VITE_API_BASE` in `frontend/.env` https://github.com/Mintplex-Labs/anything-llm/blob/79ce26de815b6d91ff2db8ce1a59750c4d6290e0/frontend/.env.example#L1-L3 ```bash VITE_API_BASE='http://localhost:3001/api' ``` The frontend, by default expects the server to be on localhost:3001, and the server expects the collector to be on :8888 by default. All over localhost (127) https://github.com/Mintplex-Labs/anything-llm/blob/79ce26de815b6d91ff2db8ce1a59750c4d6290e0/server/utils/collectorApi/index.js#L11 Its pretty clear from the history here now the issue is something with your config or how you are running this, not the set up since we run this exact codebase for our Linux based managed hosting and have no issues. Are you trying to run the app outside of a docker image, but on a Linux server that you want to then access remotely? Or are you trying to run in developer mode to run things locally and make changes? Now, I'm not sure which one you are trying to do! Closing but convo can continue since this is not a bug or feature req
yindo changed title from [Question] Cannot upload a pdf document when installed on Linux locally, how to fix it? to [GH-ISSUE #2498] [Question] Cannot upload a pdf document when installed on Linux locally, how to fix it? 2026-06-05 14:41:45 -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#1618