I’m trying to read data from Jira and embed it into ollama but I’m getting an error, can anyone help me? I’m a beginner in this and I’m not sure why this is failing, any advice to improve debugging the issue would be great. thanks
Here is the error message I see in the Qdrant Vector Store1 output node:
NodeOperationError: fetch failed
at OllamaEmbeddings.callMethodAsync (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/utils/logWrapper.js:32:23)
at Proxy.connectionType (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/utils/logWrapper.js:205:43)
at QdrantVectorStore.addDocuments (/usr/local/lib/node_modules/n8n/node_modules/@langchain/qdrant/dist/vectorstores.cjs:86:31)
at Function.fromDocuments (/usr/local/lib/node_modules/n8n/node_modules/@langchain/qdrant/dist/vectorstores.cjs:248: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 Object.execute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/shared/createVectorStoreNode.js:203:21)
at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:722:19)
at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:670:51
at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1100:20
It’s working now and I’m not sure what I did to make it work (I change a lot of stuff) but I think it was because I was using the Jira node directly into the Qdrant Vector Store, I added a few steps between to filter the data and send just the relevant ones.
Do you recall the steps? I am having the same issue. I am not sure what I am doing wrong.
I am running in npx with local Ollama and I keep getting the same “fetch failed” error for qdrant vector base. I can run my ollama in other programs like CrewAI, but in here the vectore store is being unreachable.
I took a look into my cluster in qdrant and look untouched, so nothing has passed through.
Any idea what could be?
I am running a simple chat with a document, just like in many tutorials
TypeError: fetch failed at node:internal/deps/undici/undici:13185:13 at processTicksAndRejections (node:internal/process/task_queues:105:5) at fetchJson (/home/ru/.npm/_npx/a8a7eec953f1f314/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:135:22) at /home/ru/.npm/_npx/a8a7eec953f1f314/node_modules/@qdrant/js-client-rest/dist/cjs/api-client.js:46:26 at handler (/home/ru/.npm/_npx/a8a7eec953f1f314/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:156:16) at /home/ru/.npm/_npx/a8a7eec953f1f314/node_modules/@qdrant/js-client-rest/dist/cjs/api-client.js:32:24 at handler (/home/ru/.npm/_npx/a8a7eec953f1f314/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:156:16) at fetchUrl (/home/ru/.npm/_npx/a8a7eec953f1f314/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:162:22) at Object.fun [as getCollections] (/home/ru/.npm/_npx/a8a7eec953f1f314/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:168:20) at QdrantClient.getCollections (/home/ru/.npm/_npx/a8a7eec953f1f314/node_modules/@qdrant/js-client-rest/dist/cjs/qdrant-client.js:836:26) at QdrantVectorStore.ensureCollection (/home/ru/.npm/_npx/a8a7eec953f1f314/node_modules/@langchain/qdrant/dist/vectorstores.cjs:197:26) at QdrantVectorStore.addVectors (/home/ru/.npm/_npx/a8a7eec953f1f314/node_modules/@langchain/qdrant/dist/vectorstores.cjs:101:9) at QdrantVectorStore.addDocuments (/home/ru/.npm/_npx/a8a7eec953f1f314/node_modules/@langchain/qdrant/dist/vectorstores.cjs:86:9) at Function.fromDocuments (/home/ru/.npm/_npx/a8a7eec953f1f314/node_modules/@langchain/qdrant/dist/vectorstores.cjs:248:13) at Object.populateVectorStore (/home/ru/.npm/_npx/a8a7eec953f1f314/node_modules/@n8n/n8n-nodes-langchain/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.ts:135:3) at Object.execute (/home/ru/.npm/_npx/a8a7eec953f1f314/node_modules/@n8n/n8n-nodes-langchain/nodes/vector_store/shared/createVectorStoreNode.ts:308:7) at Workflow.runNode (/home/ru/.npm/_npx/a8a7eec953f1f314/node_modules/n8n-workflow/src/Workflow.ts:1382:8) at /home/ru/.npm/_npx/a8a7eec953f1f314/node_modules/n8n-core/src/WorkflowExecute.ts:1168:27 at /home/ru/.npm/_npx/a8a7eec953f1f314/node_modules/n8n-core/src/WorkflowExecute.ts:1888:11
Hi
I think you case is different, mine was related to the size of the data I was sending, it was too big.
This is was chatgpt answered me:
This error originates from the fetch API in Node.js, specifically within the undici library, which is a modern HTTP client for Node.js. The stack trace indicates that the error occurs during an HTTP request made by the @qdrant/js-client-rest package, which is used to interact with a Qdrant vector database.
Here’s a breakdown of what’s happening:
Qdrant Client Attempting to Fetch Collections: The QdrantClient.getCollections method is being called, which tries to fetch the list of collections from the Qdrant server.
Failure in HTTP Request: The fetchJson function inside @qdrant/openapi-typescript-fetch is making an HTTP request to the Qdrant server but fails.
Possible Causes of fetch Failure:
Server Unreachable: The Qdrant server might not be running or is unreachable due to network issues.
Incorrect Host or Port: The client might be configured with the wrong host or port for the Qdrant server.
Authentication Issues: If the Qdrant server requires authentication, missing or incorrect credentials can cause the request to fail.
SSL/TLS Issues: If the server uses HTTPS and there’s a certificate issue, the request may fail.
Proxy or Firewall: Network proxies or firewalls might be blocking the request.
Recommended Steps to Resolve the Issue:
Verify Qdrant Server Status:
Ensure that the Qdrant server is running and accessible.
Try accessing the Qdrant server directly using a tool like curl or Postman to confirm it’s reachable.
Check Configuration:
Host and Port: Confirm that the client is configured with the correct host and port.
Base URL: Ensure that the base URL is correctly set, including the protocol (http or https).
Review Authentication:
If your Qdrant server requires API keys or other authentication methods, make sure these credentials are correctly provided in your client configuration.
Network Connectivity:
Check for any network issues that might prevent the client from reaching the server.
If you’re behind a proxy, ensure that your Node.js environment is configured to use it.
SSL/TLS Configuration:
If using HTTPS, verify that SSL certificates are correctly set up.
You might need to configure your client to accept self-signed certificates if that’s the case.
Firewall and Security Groups:
Ensure that firewalls or security groups allow traffic between the client and the server on the required ports.
Update Dependencies:
Ensure all your packages are up-to-date. Sometimes, issues are resolved in newer versions of libraries.
Enable Detailed Logging:
Enable verbose or debug logging in your application to get more detailed error messages.
This can provide more context about why the fetch operation failed.
Example of Checking Qdrant Server Connectivity:
curl http://localhost:6333/collections
Replace localhost and 6333 with your Qdrant server’s actual host and port. If you receive a response, the server is running and accessible.
Additional Considerations:
Undici Library: Since the error is in the undici library, which is used by Node.js for HTTP requests, make sure your Node.js version is compatible with the versions of the packages you’re using.
Environmental Variables: If your configuration relies on environment variables, ensure they are correctly set in your execution environment.
Summary:
The error is related to a failure in making an HTTP request to the Qdrant vector database server. It’s most likely due to connectivity issues, misconfiguration, or server unavailability. By verifying the server status and client configuration, you should be able to resolve the issue.