[GH-ISSUE #5944] Most difficult error ever: : no suitable llama servers found. #65747

Closed
opened 2026-05-03 22:31:34 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @Swephoenix on GitHub (Jul 25, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5944

What is the issue?

I've reinstalled Ollama several times but it won't fix the error I'm getting at startup when I manually in CMD write ollama run llama3:8b (or any other model which are listed and recognized by ollama).
image

OS

Windows

GPU

Nvidia

CPU

AMD

Ollama version

Latest

Originally created by @Swephoenix on GitHub (Jul 25, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5944 ### What is the issue? I've reinstalled Ollama several times but it won't fix the error I'm getting at startup when I manually in CMD write ollama run llama3:8b (or any other model which are listed and recognized by ollama). ![image](https://github.com/user-attachments/assets/e0bd27f4-698e-4a7a-81a4-b0ef90330e7b) ### OS Windows ### GPU Nvidia ### CPU AMD ### Ollama version Latest
GiteaMirror added the bug label 2026-05-03 22:31:34 -05:00
Author
Owner

@rick-github commented on GitHub (Jul 25, 2024):

The server has a collection of runners, depending on environment (CUDA, RocM, CPU, etc) and it checks these to see which one it should run for the requested model. In this case, it can't find one (the error message should probably be "no suitable llama runner found" to disambiguate). What do the server logs show? Have you modified the OLLAMA_LLM_LIBRARY environment variable?

<!-- gh-comment-id:2249976914 --> @rick-github commented on GitHub (Jul 25, 2024): The server has a collection of runners, depending on environment (CUDA, RocM, CPU, etc) and it checks these to see which one it should run for the requested model. In this case, it can't find one (the error message should probably be "no suitable llama runner found" to disambiguate). What do the server logs show? Have you modified the `OLLAMA_LLM_LIBRARY` environment variable?
Author
Owner

@Swephoenix commented on GitHub (Jul 25, 2024):

Thanks! You were right, it was something wrong with the paths. Now everything is working.

Below are the summarized and universalized steps to set up and resolve issues with the Ollama server without including any personal paths or identifiers.

Steps to Resolve Ollama Server Issues

1. Set Environment Variables

Set the necessary environment variables in Command Prompt. These variables help the server locate models and configurations.

  1. Open Command Prompt:

    • Press Win + R, type cmd, and press Enter to open Command Prompt.
  2. Set Environment Variables:

    set OLLAMA_HOST=http://127.0.0.1:11434
    set OLLAMA_MODELS=<path_to_your_models>
    set OLLAMA_RUNNERS_DIR=<path_to_ollama_runners>
    set OLLAMA_DEBUG=true
    

Replace <path_to_your_models> and <path_to_ollama_runners> with the actual paths where your models and runners are stored.

2. Start the Ollama Server

Ensure the Ollama server is running. Start it by executing:

ollama server start

3. Verify the Server is Running

Check if the server is running by accessing its root endpoint:

curl http://127.0.0.1:11434/

You should see a message like "Ollama is running."

4. List Available Models

To verify the models available on the server, run:

curl http://127.0.0.1:11434/api/tags

5. Generate Response from a Model

Use the /api/generate endpoint to generate a response from a model. Here is the command format:

curl -X POST http://127.0.0.1:11434/api/generate -H "Content-Type: application/json" -d "{\"model\": \"llama3:8b\", \"prompt\": \"Explain the theory of relativity.\", \"stream\": false}"

Example Commands for Other Models

  • Generate Response from mistral-nemo:latest:

    curl -X POST http://127.0.0.1:11434/api/generate -H "Content-Type: application/json" -d "{\"model\": \"mistral-nemo:latest\", \"prompt\": \"What is the capital of France?\", \"stream\": false}"
    
  • Generate Response from deepseek-coder-v2:16b:

    curl -X POST http://127.0.0.1:11434/api/generate -H "Content-Type: application/json" -d "{\"model\": \"deepseek-coder-v2:16b\", \"prompt\": \"Describe the principles of quantum mechanics.\", \"stream\": false}"
    

6. Check Server Logs for Errors

If you encounter any issues, check the server logs for detailed error messages. Use the following command to view the logs:

type <path_to_ollama_logs>

Replace <path_to_ollama_logs> with the actual path where your logs are stored.

Key Points

  • Correct JSON Formatting: Ensure JSON data is properly formatted and escaped in Windows Command Prompt.
  • Endpoint Verification: Use /api/tags to list models and /api/generate for generating responses.
  • Environment Setup: Correct environment variables and paths are essential for the server's functionality.

References

By following these steps, you should be able to successfully set up and interact with the Ollama server, ensuring it functions correctly and can generate responses from various models. If further issues arise, refer to the server logs for troubleshooting.

<!-- gh-comment-id:2250004464 --> @Swephoenix commented on GitHub (Jul 25, 2024): Thanks! You were right, it was something wrong with the paths. Now everything is working. Below are the summarized and universalized steps to set up and resolve issues with the Ollama server without including any personal paths or identifiers. ### Steps to Resolve Ollama Server Issues #### 1. **Set Environment Variables** Set the necessary environment variables in Command Prompt. These variables help the server locate models and configurations. 1. **Open Command Prompt**: - Press `Win + R`, type `cmd`, and press `Enter` to open Command Prompt. 2. **Set Environment Variables**: ```sh set OLLAMA_HOST=http://127.0.0.1:11434 set OLLAMA_MODELS=<path_to_your_models> set OLLAMA_RUNNERS_DIR=<path_to_ollama_runners> set OLLAMA_DEBUG=true ``` Replace `<path_to_your_models>` and `<path_to_ollama_runners>` with the actual paths where your models and runners are stored. #### 2. **Start the Ollama Server** Ensure the Ollama server is running. Start it by executing: ```sh ollama server start ``` #### 3. **Verify the Server is Running** Check if the server is running by accessing its root endpoint: ```sh curl http://127.0.0.1:11434/ ``` You should see a message like "Ollama is running." #### 4. **List Available Models** To verify the models available on the server, run: ```sh curl http://127.0.0.1:11434/api/tags ``` #### 5. **Generate Response from a Model** Use the `/api/generate` endpoint to generate a response from a model. Here is the command format: ```sh curl -X POST http://127.0.0.1:11434/api/generate -H "Content-Type: application/json" -d "{\"model\": \"llama3:8b\", \"prompt\": \"Explain the theory of relativity.\", \"stream\": false}" ``` #### Example Commands for Other Models - **Generate Response from `mistral-nemo:latest`**: ```sh curl -X POST http://127.0.0.1:11434/api/generate -H "Content-Type: application/json" -d "{\"model\": \"mistral-nemo:latest\", \"prompt\": \"What is the capital of France?\", \"stream\": false}" ``` - **Generate Response from `deepseek-coder-v2:16b`**: ```sh curl -X POST http://127.0.0.1:11434/api/generate -H "Content-Type: application/json" -d "{\"model\": \"deepseek-coder-v2:16b\", \"prompt\": \"Describe the principles of quantum mechanics.\", \"stream\": false}" ``` #### 6. **Check Server Logs for Errors** If you encounter any issues, check the server logs for detailed error messages. Use the following command to view the logs: ```sh type <path_to_ollama_logs> ``` Replace `<path_to_ollama_logs>` with the actual path where your logs are stored. ### Key Points - **Correct JSON Formatting**: Ensure JSON data is properly formatted and escaped in Windows Command Prompt. - **Endpoint Verification**: Use `/api/tags` to list models and `/api/generate` for generating responses. - **Environment Setup**: Correct environment variables and paths are essential for the server's functionality. ### References - [Ollama API Documentation on GitHub](https://github.com/ollama/ollama/blob/main/docs/api.md?plain=1) - [Using the Ollama API to Run LLMs and Generate Responses Locally](https://dev.to/jayantaadhikary/using-the-ollama-api-to-run-llms-and-generate-responses-locally-18b7) - [Self-Hosting LLMs Using Ollama](https://www.avni.sh/self-hosting-llms-using-ollama/) By following these steps, you should be able to successfully set up and interact with the Ollama server, ensuring it functions correctly and can generate responses from various models. If further issues arise, refer to the server logs for troubleshooting.
Author
Owner

@technovangelist commented on GitHub (Jul 25, 2024):

In the discord the original poster noted that the problem was solved after reviewing the docs. This should be closed.

<!-- gh-comment-id:2250792297 --> @technovangelist commented on GitHub (Jul 25, 2024): In the discord the original poster noted that the problem was solved after reviewing the docs. This should be closed.
Author
Owner

@JollyInGIT commented on GitHub (Aug 2, 2024):

Oh yeah, I ran into this issue, but it was fixed after today's update.

<!-- gh-comment-id:2264414906 --> @JollyInGIT commented on GitHub (Aug 2, 2024): Oh yeah, I ran into this issue, but it was fixed after today's update.
Author
Owner

@Tabishtabby commented on GitHub (Oct 24, 2024):

Since the recent update, I have been encountering the same error for llama3.2. I checked the log files and decided to delete, redownload llama3.2 and restart the PC. It still didn't work.
Finally, I spotted the updates folder alongside the logs. It contained OllamaSetup.exe downloaded 3 days back. so I double-clicked it after closing the existing Ollama server.
It Solved The Problem!!. (Maybe manual update did the trick)

<!-- gh-comment-id:2433984252 --> @Tabishtabby commented on GitHub (Oct 24, 2024): Since the recent update, I have been encountering the same error for llama3.2. I checked the log files and decided to delete, redownload llama3.2 and restart the PC. It still didn't work. Finally, I spotted the updates folder alongside the logs. It contained OllamaSetup.exe downloaded 3 days back. so I double-clicked it after closing the existing Ollama server. It Solved The Problem!!. (Maybe manual update did the trick)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#65747