[GH-ISSUE #10109] Connection refused from ollama server running in a k8s cluster? #53142

Closed
opened 2026-04-29 02:04:44 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @khteh on GitHub (Apr 3, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10109

I have set the following ENV:

  OLLAMA_HOST: "http://0.0.0.0:11434"
  OLLAMA_ORIGINS: "*"

but still unable to connect to it:

svc-ollama-nodeport          NodePort    10.152.183.193   <none>        11434:32000/TCP                                32m
curl -vv http://10.152.183.193:11434/api/version
18:28:39.716036 [0-0] * [SETUP] added
18:28:39.716101 [0-0] *   Trying 10.152.183.193:11434...
18:28:39.716203 [0-0] * [SETUP] Curl_conn_connect(block=0) -> 0, done=0
18:28:39.716256 [0-0] * connect to 10.152.183.193 port 11434 from 192.168.0.149 port 50148 failed: Connection refused
18:28:39.716282 [0-0] * Failed to connect to 10.152.183.193 port 11434 after 0 ms: Could not connect to server
18:28:39.716291 [0-0] * [SETUP] Curl_conn_connect(block=0) -> 7, done=0
18:28:39.716298 [0-0] * [SETUP] Curl_conn_connect(), filter returned 7
18:28:39.716314 [0-0] * closing connection #0
curl: (7) Failed to connect to 10.152.183.193 port 11434 after 0 ms: Could not connect to server

What happens inside the pod:

root@ollama-0:/# curl -vv http://10.152.183.193:11434/api/version
*   Trying 10.152.183.193:11434...
* TCP_NODELAY set
* connect to 10.152.183.193 port 11434 failed: Connection refused
* Failed to connect to 10.152.183.193 port 11434: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 10.152.183.193 port 11434: Connection refused
root@ollama-0:/# curl http://localhost:11434/api/version
{"version":"0.6.2"}
Originally created by @khteh on GitHub (Apr 3, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10109 I have set the following ENV: ``` OLLAMA_HOST: "http://0.0.0.0:11434" OLLAMA_ORIGINS: "*" ``` but still unable to connect to it: ``` svc-ollama-nodeport NodePort 10.152.183.193 <none> 11434:32000/TCP 32m ``` ``` curl -vv http://10.152.183.193:11434/api/version 18:28:39.716036 [0-0] * [SETUP] added 18:28:39.716101 [0-0] * Trying 10.152.183.193:11434... 18:28:39.716203 [0-0] * [SETUP] Curl_conn_connect(block=0) -> 0, done=0 18:28:39.716256 [0-0] * connect to 10.152.183.193 port 11434 from 192.168.0.149 port 50148 failed: Connection refused 18:28:39.716282 [0-0] * Failed to connect to 10.152.183.193 port 11434 after 0 ms: Could not connect to server 18:28:39.716291 [0-0] * [SETUP] Curl_conn_connect(block=0) -> 7, done=0 18:28:39.716298 [0-0] * [SETUP] Curl_conn_connect(), filter returned 7 18:28:39.716314 [0-0] * closing connection #0 curl: (7) Failed to connect to 10.152.183.193 port 11434 after 0 ms: Could not connect to server ``` What happens inside the pod: ``` root@ollama-0:/# curl -vv http://10.152.183.193:11434/api/version * Trying 10.152.183.193:11434... * TCP_NODELAY set * connect to 10.152.183.193 port 11434 failed: Connection refused * Failed to connect to 10.152.183.193 port 11434: Connection refused * Closing connection 0 curl: (7) Failed to connect to 10.152.183.193 port 11434: Connection refused root@ollama-0:/# curl http://localhost:11434/api/version {"version":"0.6.2"} ```
Author
Owner

@khteh commented on GitHub (Apr 3, 2025):

Because of this?

root@ollama-0:/# lsof -n -P -i +c 13
COMMAND PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
ollama    1 root    3u  IPv6 4117414      0t0  TCP *:11434 (LISTEN)
<!-- gh-comment-id:2775299108 --> @khteh commented on GitHub (Apr 3, 2025): Because of this? ``` root@ollama-0:/# lsof -n -P -i +c 13 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ollama 1 root 3u IPv6 4117414 0t0 TCP *:11434 (LISTEN) ```
Author
Owner

@khteh commented on GitHub (Apr 3, 2025):

Flase alarm. Mis-configuration of my Service

<!-- gh-comment-id:2775447181 --> @khteh commented on GitHub (Apr 3, 2025): Flase alarm. Mis-configuration of my `Service`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#53142