Paperless-AI: RAG Chat not working, stuck on "loading data" #1159

Closed
opened 2025-11-20 05:05:29 -05:00 by saavagebueno · 10 comments
Owner

Originally created by @PottiMc on GitHub (May 23, 2025).

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

PaperlessAI

📂 What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/paperless-ai.sh)"

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 12

📝 Provide a clear and concise description of the issue.

I am running PaperlessAI in a freshly created LXC. Document tagging is working fine and as expected. The RAG chat though is not running smoothly. According to the developer I would suggest it is a out-of-the-box feature?
My RAG ist stuck on "Loading Data".

Image

When pressing any of the buttons (Update/Start Indexing), all status info is switching to Offline or Unknown.

Image

🔄 Steps to reproduce the issue.

  1. Fresh install of PaperlessAI script
  2. Set up the system to connect to Paperless and OpenAI
  3. Try RAG chat

Paste the full error output (if available).

No logs at the moment. How do I get them?

🖼️ Additional context (optional).

No response

Originally created by @PottiMc on GitHub (May 23, 2025). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? PaperlessAI ### 📂 What was the exact command used to execute the script? bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/paperless-ai.sh)" ### ⚙️ What settings are you using? - [x] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 12 ### 📝 Provide a clear and concise description of the issue. I am running PaperlessAI in a freshly created LXC. Document tagging is working fine and as expected. The RAG chat though is not running smoothly. According to the developer I would suggest it is a out-of-the-box feature? My RAG ist stuck on "Loading Data". ![Image](https://github.com/user-attachments/assets/990259a3-1cc7-41de-b88f-ab9db8551943) When pressing any of the buttons (Update/Start Indexing), all status info is switching to Offline or Unknown. ![Image](https://github.com/user-attachments/assets/7851f3ca-2e17-4478-9ae7-37c2f317bbf0) ### 🔄 Steps to reproduce the issue. 1. Fresh install of PaperlessAI script 2. Set up the system to connect to Paperless and OpenAI 3. Try RAG chat ### ❌ Paste the full error output (if available). No logs at the moment. How do I get them? ### 🖼️ Additional context (optional). _No response_
saavagebueno added the not a script issuebugexternal labels 2025-11-20 05:05:29 -05:00
Author
Owner

@MickLesk commented on GitHub (May 23, 2025):

I don't know how The function is supposed to work? What are we supposed to do here? Without any input, nobody can say anything about it

@MickLesk commented on GitHub (May 23, 2025): I don't know how The function is supposed to work? What are we supposed to do here? Without any input, nobody can say anything about it
Author
Owner

@tremor021 commented on GitHub (May 23, 2025):

Image

My keys don't work for some reason. Cant test

@tremor021 commented on GitHub (May 23, 2025): ![Image](https://github.com/user-attachments/assets/f7680436-1e74-407d-b89a-d63d4710353c) My keys don't work for some reason. Cant test
Author
Owner

@tremor021 commented on GitHub (May 24, 2025):

@PottiMc btw, isn't loading data actually downloading a AI model you selected?

How long you waited ?

@tremor021 commented on GitHub (May 24, 2025): @PottiMc btw, isn't loading data actually downloading a AI model you selected? How long you waited ?
Author
Owner

@PottiMc commented on GitHub (May 24, 2025):

Around 16 hours overnight. Would be awesome if it could download GPT-4o 😅

@PottiMc commented on GitHub (May 24, 2025): Around 16 hours overnight. Would be awesome if it could download GPT-4o 😅
Author
Owner

@ubay86 commented on GitHub (May 24, 2025):

I believe I had the same issue. There is nothing wrong with the script. check the logs of rag service. if you have there something with "punkt_tab" add it to the main.py and try again. idk why but in my 3.0.4 it was missing.

@ubay86 commented on GitHub (May 24, 2025): I believe I had the same issue. There is nothing wrong with the script. check the logs of rag service. if you have there something with "punkt_tab" add it to the main.py and try again. idk why but in my 3.0.4 it was missing.
Author
Owner

@MickLesk commented on GitHub (May 24, 2025):

Around 16 hours overnight. Would be awesome if it could download GPT-4o 😅

Do you have 80 Cores, 512 RAM and 4 5090? 😂

@MickLesk commented on GitHub (May 24, 2025): > Around 16 hours overnight. Would be awesome if it could download GPT-4o 😅 Do you have 80 Cores, 512 RAM and 4 5090? 😂
Author
Owner

@HerrVonundZu commented on GitHub (Jun 2, 2025):

Image

My keys don't work for some reason. Cant test

Have the same issue after i updated to 3.0.4
Trying to figure out the RAG Issue with a local ai running on jetson orin nano super now. Where do i find logfiles?

@HerrVonundZu commented on GitHub (Jun 2, 2025): > ![Image](https://github.com/user-attachments/assets/f7680436-1e74-407d-b89a-d63d4710353c) > > My keys don't work for some reason. Cant test Have the same issue after i updated to 3.0.4 Trying to figure out the RAG Issue with a local ai running on jetson orin nano super now. Where do i find logfiles?
Author
Owner

@fsennj commented on GitHub (Jun 2, 2025):

has anyone found the problem? also using local ollama instance to chat but no documents found. the normal chat just works fine

@fsennj commented on GitHub (Jun 2, 2025): has anyone found the problem? also using local ollama instance to chat but no documents found. the normal chat just works fine
Author
Owner

@MickLesk commented on GitHub (Jun 2, 2025):

No. Anyone asked in the paperless-ai Repo?

@MickLesk commented on GitHub (Jun 2, 2025): No. Anyone asked in the paperless-ai Repo?
Author
Owner

@HerrVonundZu commented on GitHub (Jun 2, 2025):

My open ai key issue was caused by an used up cradit balance. after recharging oai is working again.

found the following error message:

[2025-06-02T16:30:46.511Z] [ERROR] Error checking RAG service status:
[2025-06-02T16:30:49.218Z] [ERROR] Error in /api/rag/index: AxiosError [AggregateError]
at AxiosError.from (/opt/paperless-ai/node_modules/axios/dist/node/axios.cjs:857:14)
at RedirectableRequest.handleRequestError (/opt/paperless-ai/node_modules/axios/dist/node/axios.cjs:3169:25)
at RedirectableRequest.emit (node:events:518:28)
at eventHandlers. (/opt/paperless-ai/node_modules/follow-redirects/index.js:49:24)
at ClientRequest.emit (node:events:518:28)
at emitErrorEvent (node:_http_client:104:11)
at Socket.socketErrorListener (node:_http_client:518:5)
at Socket.emit (node:events:518:28)
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at Axios.request (/opt/paperless-ai/node_modules/axios/dist/node/axios.cjs:4258:41)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async RagService.checkForUpdates (/opt/paperless-ai/services/ragService.js:154:24)
at async /opt/paperless-ai/routes/rag.js:81:20 {
code: 'ECONNREFUSED',
errors: [
Error: connect ECONNREFUSED ::1:8000
at createConnectionError (node:net:1677:14)
at afterConnectMultiple (node:net:1707:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 8000
},
Error: connect ECONNREFUSED 127.0.0.1:8000
at createConnectionError (node:net:1677:14)
at afterConnectMultiple (node:net:1707:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 8000
}
],
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [ 'xhr', 'http', 'fetch' ],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: { FormData: [Function [FormData]], Blob: [class Blob] },
validateStatus: [Function: validateStatus],
headers: Object [AxiosHeaders] {
Accept: 'application/json, text/plain, /',
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'axios/1.8.2',
'Accept-Encoding': 'gzip, compress, deflate, br'
},
method: 'post',
url: 'http://localhost:8000/indexing/check',
allowAbsoluteUrls: true,
data: undefined
},
request: <ref *1> Writable {
_events: {
close: undefined,
error: [Function: handleRequestError],
prefinish: undefined,
finish: undefined,
drain: undefined,
response: [Function: handleResponse],
socket: [Function: handleRequestSocket]
},
_writableState: WritableState {
highWaterMark: 65536,
length: 0,
corked: 0,
onwrite: [Function: bound onwrite],
writelen: 0,
bufferedIndex: 0,
pendingcb: 0,
[Symbol(kState)]: 17580812,
[Symbol(kBufferedValue)]: null
},
_maxListeners: undefined,
_options: {
maxRedirects: 21,
maxBodyLength: Infinity,
protocol: 'http:',
path: '/indexing/check',
method: 'POST',
headers: [Object: null prototype],
agents: [Object],
auth: undefined,
family: undefined,
beforeRedirect: [Function: dispatchBeforeRedirect],
beforeRedirects: [Object],
hostname: 'localhost',
port: '8000',
agent: undefined,
nativeProtocols: [Object],
pathname: '/indexing/check'
},
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 0,
_requestBodyBuffers: [],
_eventsCount: 3,
_onNativeResponse: [Function (anonymous)],
_currentRequest: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
_header: 'POST /indexing/check HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +
'Content-Type: application/x-www-form-urlencoded\r\n' +
'User-Agent: axios/1.8.2\r\n' +
'Accept-Encoding: gzip, compress, deflate, br\r\n' +
'Host: localhost:8000\r\n' +
'Connection: keep-alive\r\n' +
'Content-Length: 0\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: '/indexing/check',
_ended: false,
res: null,
aborted: false,
timeoutCb: [Function: emitRequestTimeout],
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'localhost',
protocol: 'http:',
_redirectable: [Circular *1],
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kChunkedBuffer)]: [],
[Symbol(kChunkedLength)]: 0,
[Symbol(kSocket)]: [Socket],
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 65536,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null
},
_currentUrl: 'http://localhost:8000/indexing/check',
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false
},
cause: AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1714:7) {
code: 'ECONNREFUSED',
[errors]: [ [Error], [Error] ]
}
}

@HerrVonundZu commented on GitHub (Jun 2, 2025): My open ai key issue was caused by an used up cradit balance. after recharging oai is working again. found the following error message: > [2025-06-02T16:30:46.511Z] [ERROR] Error checking RAG service status: [2025-06-02T16:30:49.218Z] [ERROR] Error in /api/rag/index: AxiosError [AggregateError] at AxiosError.from (/opt/paperless-ai/node_modules/axios/dist/node/axios.cjs:857:14) at RedirectableRequest.handleRequestError (/opt/paperless-ai/node_modules/axios/dist/node/axios.cjs:3169:25) at RedirectableRequest.emit (node:events:518:28) at eventHandlers.<computed> (/opt/paperless-ai/node_modules/follow-redirects/index.js:49:24) at ClientRequest.emit (node:events:518:28) at emitErrorEvent (node:_http_client:104:11) at Socket.socketErrorListener (node:_http_client:518:5) at Socket.emit (node:events:518:28) at emitErrorNT (node:internal/streams/destroy:170:8) at emitErrorCloseNT (node:internal/streams/destroy:129:3) at Axios.request (/opt/paperless-ai/node_modules/axios/dist/node/axios.cjs:4258:41) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async RagService.checkForUpdates (/opt/paperless-ai/services/ragService.js:154:24) at async /opt/paperless-ai/routes/rag.js:81:20 { code: 'ECONNREFUSED', errors: [ Error: connect ECONNREFUSED ::1:8000 at createConnectionError (node:net:1677:14) at afterConnectMultiple (node:net:1707:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '::1', port: 8000 }, Error: connect ECONNREFUSED 127.0.0.1:8000 at createConnectionError (node:net:1677:14) at afterConnectMultiple (node:net:1707:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8000 } ], config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [ 'xhr', 'http', 'fetch' ], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: [Function [FormData]], Blob: [class Blob] }, validateStatus: [Function: validateStatus], headers: Object [AxiosHeaders] { Accept: 'application/json, text/plain, */*', 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'axios/1.8.2', 'Accept-Encoding': 'gzip, compress, deflate, br' }, method: 'post', url: 'http://localhost:8000/indexing/check', allowAbsoluteUrls: true, data: undefined }, request: <ref *1> Writable { _events: { close: undefined, error: [Function: handleRequestError], prefinish: undefined, finish: undefined, drain: undefined, response: [Function: handleResponse], socket: [Function: handleRequestSocket] }, _writableState: WritableState { highWaterMark: 65536, length: 0, corked: 0, onwrite: [Function: bound onwrite], writelen: 0, bufferedIndex: 0, pendingcb: 0, [Symbol(kState)]: 17580812, [Symbol(kBufferedValue)]: null }, _maxListeners: undefined, _options: { maxRedirects: 21, maxBodyLength: Infinity, protocol: 'http:', path: '/indexing/check', method: 'POST', headers: [Object: null prototype], agents: [Object], auth: undefined, family: undefined, beforeRedirect: [Function: dispatchBeforeRedirect], beforeRedirects: [Object], hostname: 'localhost', port: '8000', agent: undefined, nativeProtocols: [Object], pathname: '/indexing/check' }, _ended: true, _ending: true, _redirectCount: 0, _redirects: [], _requestBodyLength: 0, _requestBodyBuffers: [], _eventsCount: 3, _onNativeResponse: [Function (anonymous)], _currentRequest: ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: false, _last: false, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, _header: 'POST /indexing/check HTTP/1.1\r\n' + 'Accept: application/json, text/plain, */*\r\n' + 'Content-Type: application/x-www-form-urlencoded\r\n' + 'User-Agent: axios/1.8.2\r\n' + 'Accept-Encoding: gzip, compress, deflate, br\r\n' + 'Host: localhost:8000\r\n' + 'Connection: keep-alive\r\n' + 'Content-Length: 0\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'POST', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/indexing/check', _ended: false, res: null, aborted: false, timeoutCb: [Function: emitRequestTimeout], upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'localhost', protocol: 'http:', _redirectable: [Circular *1], [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kChunkedBuffer)]: [], [Symbol(kChunkedLength)]: 0, [Symbol(kSocket)]: [Socket], [Symbol(kOutHeaders)]: [Object: null prototype], [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 65536, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null }, _currentUrl: 'http://localhost:8000/indexing/check', [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false }, cause: AggregateError [ECONNREFUSED]: at internalConnectMultiple (node:net:1139:18) at afterConnectMultiple (node:net:1714:7) { code: 'ECONNREFUSED', [errors]: [ [Error], [Error] ] } }
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#1159