{"record":{"id":"45e56fc0244c0ad9","repo":"Mintplex-Labs/anything-llm","slug":"your-ollama-instance-could-not-be-reached-or-is-no","errorCode":null,"errorMessage":"Your Ollama instance could not be reached or is not responding. Please make sure it is running the API server and your connection information is correct in AnythingLLM.","messagePattern":"Your Ollama instance could not be reached or is not responding\\. Please make sure it is running the API server and your connection information is correct in AnythingLLM\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/utils/AiProviders/ollama/index.js","lineNumber":236,"sourceCode":"   * @param {{userPrompt:string, attachments: import(\"../../helpers\").Attachment[]}}\n   * @returns {{content: string, images: string[]}}\n   */\n  #generateContent({ userPrompt, attachments = [] }) {\n    if (!attachments.length) return { content: userPrompt };\n    const images = attachments.map(\n      (attachment) => attachment.contentString.split(\"base64,\").slice(-1)[0]\n    );\n    return { content: userPrompt, images };\n  }\n\n  /**\n   * Handles errors from the Ollama API to make them more user friendly.\n   * @param {Error} e\n   */\n  #errorHandler(e) {\n    switch (e.message) {\n      case \"fetch failed\":\n        throw new Error(\n          \"Your Ollama instance could not be reached or is not responding. Please make sure it is running the API server and your connection information is correct in AnythingLLM.\"\n        );\n      default:\n        return e;\n    }\n  }\n\n  /**\n   * Construct the user prompt for this model.\n   * @param {{attachments: import(\"../../helpers\").Attachment[]}} param0\n   * @returns\n   */\n  constructPrompt({\n    systemPrompt = \"\",\n    contextTexts = [],\n    chatHistory = [],\n    userPrompt = \"\",\n    attachments = [],","sourceCodeStart":218,"sourceCodeEnd":254,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/server/utils/AiProviders/ollama/index.js#L218-L254","documentation":"Error \"Your Ollama instance could not be reached or is not responding. Please make sure it is running the API server and your connection information is correct in AnythingLLM.\" thrown in Mintplex-Labs/anything-llm.","triggerScenarios":"Thrown when a request to the Ollama API fails to connect.","commonSituations":"Ollama not running or wrong connection information.","solutions":["Start the Ollama server (ollama serve).","Verify the base path and port in AnythingLLM settings.","Check firewall rules blocking the Ollama port."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3aec848f2885144aa8f1e53b9731a04310d5d558","analyzedAt":"2026-08-18T10:02:21.017Z","contentChangedAt":"2026-08-18T10:02:21.017Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}