Starter kit / token splitter / fetch failed

Hi All, hope you’re doing well !

just starting to work with n8n. Got an error at Token splitter node: fetch failed.

Workflow: chat + qdrant + embeded ollama (nomic-ebmedded text) + default data loader + token splitter.

Platform: Win11/WSL/Docker/self-hosted-ai-starter-kit nvidia

Dont know how to chek n8n EXECUTIONS_PROCESS , but i am pressing CHAT to upload a document or trying to test particular qdrant.

Try to enter any simple text prompt and attach a txt or pdf file.
Got: Error in sub-node ‘Token Splitter‘ fetch failed

While debugging Token Spliiter node see:

  1. At the Input left side:
  • File name,
  • File size,
  • File type: aplication/pdf.
    if debugging in chat windows - i can see the text content of PDF or TXT file.
  1. On the Output right side:
    fetch failed
    Error details
    Other info
    n8n version: 1.63.4 (Self Hosted)
    Time: 10/31/2024, 1:46:47 AM
    Error cause
{}

The code is the latest one available in n8n repo. Can’t find out what am i doing wrong. Please help me to find the reason for that behaviour.

This is full configuration:

Appriciate for your help!
Wish you luck.

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

All of above is in the message.

n8n version: 1.63.4 (Self Hosted)
Database: Qdrant
n8n EXECUTIONS_PROCESS setting (default: own, main)
Platform: Win11/Docker/self-hosted-ai-starter-kit nvidia
OS: Win11

Update: WSL doesnt involved in the stack as it shown in inital message.

Another thing: Instead using a ‘token splitter’ I used a ‘character text splitter’.

Hi, I also have issues in Token splitter. I get error “fetch failed” and in the n8n container, the log says:
connect ECONNREFUSED 172.67.68.102:443
2024-11-15 17:10:58 Error: connect ECONNREFUSED 172.67.68.102:443
2024-11-15 17:10:58 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1607:16)

Is it similar to you? did you solve it?
thanks

Hi Community, and @n8n the same issue here:
This is mot likely happenning because the call to ollama model is taking more than 300s, the default nodeJS timeout. Any way we could change with the current implementation ?

24-12-04 15:49:28 fetch failed
2024-12-04 15:49:28 TypeError: fetch failed
2024-12-04 15:49:28 at node:internal/deps/undici/undici:13185:13
2024-12-04 15:49:28 at createOllamaStream (/usr/local/lib/node_modules/n8n/node_modules/@langchain/community/dist/utils/ollama.cjs:12:22)
2024-12-04 15:49:28 at createOllamaGenerateStream (/usr/local/lib/node_modules/n8n/node_modules/@langchain/community/dist/utils/ollama.cjs:57:5)
2024-12-04 15:49:28 at Ollama._streamResponseChunks (/usr/local/lib/node_modules/n8n/node_modules/@langchain/community/dist/llms/ollama.cjs:348:26)
2024-12-04 15:49:28 at Ollama._call (/usr/local/lib/node_modules/n8n/node_modules/@langchain/community/dist/llms/ollama.cjs:378:26)
2024-12-04 15:49:28 at async Promise.all (index 0)
2024-12-04 15:49:28 at Ollama._generate (/usr/local/lib/node_modules/n8n/node_modules/@langchain/core/dist/language_models/llms.cjs:358:29)
2024-12-04 15:49:28 at Ollama._generateUncached (/usr/local/lib/node_modules/n8n/node_modules/@langchain/core/dist/language_models/llms.cjs:172:26)
2024-12-04 15:49:28 at LLMChain._call (/usr/local/lib/node_modules/n8n/node_modules/langchain/dist/chains/llm_chain.cjs:162:37)
2024-12-04 15:49:28 at LLMChain.invoke (/usr/local/lib/node_modules/n8n/node_modules/langchain/dist/chains/base.cjs:58:28)
2024-12-04 15:49:28 at async Promise.all (index 102)
2024-12-04 15:49:28 at MapReduceDocumentsChain._call (/usr/local/lib/node_modules/n8n/node_modules/langchain/dist/chains/combine_docs_chain.cjs:188:29)
2024-12-04 15:49:28 at MapReduceDocumentsChain.invoke (/usr/local/lib/node_modules/n8n/node_modules/langchain/dist/chains/base.cjs:58:28)
2024-12-04 15:49:28 at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js:310:38)
2024-12-04 15:49:28 at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:732:19)
2024-12-04 15:49:28 at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:716:51
2024-12-04 15:49:28 at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1147:20
2024-12-04 15:49:28
2024-12-04 15:49:28 Headers Timeout Error
2024-12-04 15:49:28 HeadersTimeoutError: Headers Timeout Error
2024-12-04 15:49:28 at Timeout.onParserTimeout [as callback] (node:internal/deps/undici/undici:5995:32)
2024-12-04 15:49:28 at Timeout.onTimeout [as _onTimeout] (node:internal/deps/undici/undici:2356:17)
2024-12-04 15:49:28 at listOnTimeout (node:internal/timers:581:17)
2024-12-04 15:49:28 at processTimers (node:internal/timers:519:7)
2024-12-04 15:49:28

n8n version: 1.70.2 (Self Hosted)
Database: postgres
n8n EXECUTIONS_PROCESS setting (default: own, main)
Platform: Win11/Docker
OS: Win11

n8n version

1.70.2 (Self Hosted)

Error cause

{}

Have exactly the same topic. I am using a self hosted n8n and a self hosted qdrant at railway.
I can list qdrant collections and create a new qdrant collection via terminal and curl without problems. But connection with n8n seems not working.
Anybody have a solution out there?
Error log:

{
  "errorMessage": "fetch failed",
  "errorDetails": {},
  "n8nDetails": {
    "n8nVersion": "1.79.3 (Self Hosted)",
    "binaryDataMode": "default",
    "stackTrace": [
      "TypeError: fetch failed",
      "    at node:internal/deps/undici/undici:13502:13",
      "    at processTicksAndRejections (node:internal/process/task_queues:95:5)",
      "    at fetchJson (/usr/local/lib/node_modules/n8n/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:135:22)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/@qdrant/js-client-rest/dist/cjs/api-client.js:46:26",
      "    at handler (/usr/local/lib/node_modules/n8n/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:156:16)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/@qdrant/js-client-rest/dist/cjs/api-client.js:32:24",
      "    at handler (/usr/local/lib/node_modules/n8n/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:156:16)",
      "    at fetchUrl (/usr/local/lib/node_modules/n8n/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:162:22)",
      "    at Object.fun [as getCollections] (/usr/local/lib/node_modules/n8n/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:168:20)",
      "    at QdrantClient.getCollections (/usr/local/lib/node_modules/n8n/node_modules/@qdrant/js-client-rest/dist/cjs/qdrant-client.js:836:26)",
      "    at QdrantVectorStore.ensureCollection (/usr/local/lib/node_modules/n8n/node_modules/@langchain/qdrant/dist/vectorstores.cjs:230:26)",
      "    at QdrantVectorStore.addVectors (/usr/local/lib/node_modules/n8n/node_modules/@langchain/qdrant/dist/vectorstores.cjs:101:9)",
      "    at QdrantVectorStore.addDocuments (/usr/local/lib/node_modules/n8n/node_modules/@langchain/qdrant/dist/vectorstores.cjs:86:9)",
      "    at Function.fromDocuments (/usr/local/lib/node_modules/n8n/node_modules/@langchain/qdrant/dist/vectorstores.cjs:281:13)",
      "    at Object.populateVectorStore (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.js:103:9)",
      "    at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/shared/createVectorStoreNode.js:281:17)",
      "    at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:627:19)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:878:51",
      "    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:1211:20"
    ]
  }
}

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.