[GH-ISSUE #9655] Ollama on runpods.io: Network error: Request URL is missing an 'http://' or 'https://' protocol. #6300

Closed
opened 2026-04-12 17:45:04 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @itinance on GitHub (Mar 11, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9655

What is the issue?

We run Ollama inside a docker image that ships a FastAPI application and the Ollama service.
It is running on runpods.io using a A40 GPU.

We have set the ENV-Var OLLAMA_HOST to 0.0.0.0 as it is written in their official docs: https://docs.runpod.io/tutorials/pods/run-ollama

However, although it has worked for weeks without interruption, suddenly, we see after a reboot of the pod the following error message:

Network error communicating with Ollama: Request URL is missing an 'http://' or 'https://' protocol.

When SSH into the Pod, we can talk to Ollama both via CLI command and also via HTTP request:

curl http://localhost:11434/api/tags
curl http://0.0.0.0:11434/api/tags

But within the python application, it can't connect anymore this way, it always shows

Network error communicating with Ollama: Request URL is missing an 'http://' or 'https://' protocol. which doesn't come from the python application. It comes from Ollama according to the logs.

What has changed that we can talk to Ollama within a python application on such an environment?

Relevant log output


OS

Ubuntu 22.04

GPU

A40

CPU

No response

Ollama version

0.5.13

Originally created by @itinance on GitHub (Mar 11, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9655 ### What is the issue? We run Ollama inside a docker image that ships a FastAPI application and the Ollama service. It is running on runpods.io using a A40 GPU. We have set the ENV-Var `OLLAMA_HOST` to 0.0.0.0 as it is written in their official docs: https://docs.runpod.io/tutorials/pods/run-ollama However, although it has worked for weeks without interruption, suddenly, we see after a reboot of the pod the following error message: > Network error communicating with Ollama: Request URL is missing an 'http://' or 'https://' protocol. When SSH into the Pod, we can talk to Ollama both via CLI command and also via HTTP request: ``` curl http://localhost:11434/api/tags curl http://0.0.0.0:11434/api/tags ``` But within the python application, it can't connect anymore this way, it always shows `Network error communicating with Ollama: Request URL is missing an 'http://' or 'https://' protocol.` which doesn't come from the python application. It comes from Ollama according to the logs. What has changed that we can talk to Ollama within a python application on such an environment? ### Relevant log output ```shell ``` ### OS Ubuntu 22.04 ### GPU A40 ### CPU _No response_ ### Ollama version 0.5.13
GiteaMirror added the bug label 2026-04-12 17:45:04 -05:00
Author
Owner

@rick-github commented on GitHub (Mar 11, 2025):

Request URL is missing an 'http://' or 'https://' protocol sounds like an httpx error. It's not something that the ollama server emits.

<!-- gh-comment-id:2715236250 --> @rick-github commented on GitHub (Mar 11, 2025): `Request URL is missing an 'http://' or 'https://' protocol` sounds like an httpx error. It's not something that the ollama server emits.
Author
Owner

@itinance commented on GitHub (Mar 11, 2025):

I found it :( We tested CursorAI and indeed it changed a file that it shouldn't touch and changed our custom ENV-Var from OLLAMA_API_HOST to OLLAMA_HOST. But we are using both. Because of a requirement of Runpod, we assigned 0.0.0.0 to OLLAMA_HOST, while the OLLAMA_API_HOST contains the full URL for the python service to talk to the ollama service (http://localhost:11434).
We review code, especially when the changes are coming from an AI. However, this change has been undetected, with harsh consequences.

<!-- gh-comment-id:2715468683 --> @itinance commented on GitHub (Mar 11, 2025): I found it :( We tested CursorAI and indeed it changed a file that it shouldn't touch and changed our custom ENV-Var from `OLLAMA_API_HOST` to `OLLAMA_HOST`. But we are using both. Because of a requirement of Runpod, we assigned `0.0.0.0` to OLLAMA_HOST, while the OLLAMA_API_HOST contains the full URL for the python service to talk to the ollama service (`http://localhost:11434`). We review code, especially when the changes are coming from an AI. However, this change has been undetected, with harsh consequences.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#6300