{"record":{"id":"e7aca1d6414c696b","repo":"Mintplex-Labs/anything-llm","slug":"document-processing-api-is-not-online-document-e7aca1","errorCode":null,"errorMessage":"Document processing API is not online. Document ${originalname} will not be processed automatically.","messagePattern":"Document processing API is not online\\. Document (.+?) will not be processed automatically\\.","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"server/endpoints/workspaces.js","lineNumber":137,"sourceCode":"        const Collector = new CollectorApi();\n        const { originalname } = request.file;\n\n        // Multipart field order matters: multer only exposes text fields on\n        // request.body that were appended BEFORE the file part, so the client\n        // must append folderName/metadata first. See FileUploadProgress.\n        const { folderName = null, metadata: _metadata = \"{}\" } =\n          reqBody(request);\n\n        const metadata =\n          typeof _metadata === \"string\"\n            ? safeJsonParse(_metadata, {})\n            : _metadata;\n\n        const processingOnline = await Collector.online();\n\n        if (!processingOnline) {\n          response\n            .status(500)\n            .json({\n              success: false,\n              error: `Document processing API is not online. Document ${originalname} will not be processed automatically.`,\n            })\n            .end();\n          return;\n        }\n\n        const { success, reason, documents } = await Collector.processDocument(\n          originalname,\n          metadata\n        );\n        if (!success) {\n          response.status(500).json({ success: false, error: reason }).end();\n          return;\n        }\n\n        // When the upload is part of a folder upload, move the processed","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/server/endpoints/workspaces.js#L119-L155","documentation":"The 500 reply from POST /workspace/:slug/upload when Collector.online() returns false. The collector is the companion document-processing (vector/embedding) API; online() is a bare GET against the collector endpoint that must return 2xx. When it cannot be reached, the document cannot be embedded automatically and the upload is rejected with the filename in the message.","triggerScenarios":"Uploading a document while the collector process/container is not running; COLLECTOR_ENDPOINT env pointing at the wrong host/port; the collector listening only on 127.0.0.1 while the server runs in another container; firewall/port conflict; collector still booting after a restart.","commonSituations":"Docker compose deployment where the collector service failed to start (check container logs); changed the collector port without updating COLLECTOR_ENDPOINT; splitting server and collector across hosts without adjusting the env; local dev where only the node server was started.","solutions":["Start (or restart) the document processing/collector service and wait for it to report healthy.","Verify COLLECTOR_ENDPOINT matches the collector's actual scheme/host/port from the server's perspective (container-to-container DNS, not localhost, in multi-container setups).","curl the collector endpoint from the server host - a 2xx on GET means online; connection refused means the process or port is wrong.","Re-upload the document once online(); the check is per-request, so no cleanup is needed."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Health-check the collector before accepting an upload in the UI\nasync function collectorOnline(apiBase) {\n  try {\n    const res = await fetch(`${apiBase}/system/collector-health`); // or probe COLLECTOR_ENDPOINT directly\n    return res.ok;\n  } catch { return false; }\n}\nif (!(await collectorOnline(apiBase))) {\n  showBanner(\"Document processing offline - uploads disabled until the collector service is running\");\n  return;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Wire collector health into orchestration so dependent uploads wait for readiness.","Keep COLLECTATOR/COLLECTOR_ENDPOINT consistent between server and collector deployments.","In multi-container setups, address the collector by service DNS, not localhost."],"tags":["collector","document-upload","network","service-unavailable"],"backgroundTag":"service-unreachable","analyzedSha":"3aec848f2885144aa8f1e53b9731a04310d5d558","analyzedAt":"2026-08-18T10:02:21.017Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}