Repository navigation
[NemoClaw][MacOS] macOS: host.docker.internal does not resolve inside k3s pods #3136
Description
Description
Description
When using NemoClaw on macOS with Docker Desktop, configuring an Ollama provider with --base-url http://host.docker.internal:11434 fails because the sandbox resolves host.docker.internal to 192.168.5.2 (OpenShell's internal gateway IP), not the actual macOS host. The Docker Desktop gateway IP (192.168.65.254) is also unreachable from the sandbox due to network isolation. However, host.docker.internal resolves correctly at the Docker container level (outside k3s).
Environment
OS: macOS (Darwin 25.3.0) Docker Desktop: with k3s NemoClaw: v0.0.35 OpenShell Cluster: v0.0.36 Ollama: running on host (bound to 0.0.0.0), model qwen2.5:7b
Steps to Reproduce
-
Ensure Ollama is running on macOS host, bound to 0.0.0.0:11434.
-
Create an OpenShell provider with
host.docker.internal:openshell provider create --name ollama-hdi --type generic --credential DUMMY=dummy --config base_url=http://host.docker.internal:11434
-
SSH into the sandbox:
ssh openshell-cdf (via openshell ssh-proxy)
-
Attempt to reach Ollama from inside the sandbox:
-
Sandbox proxy intercepts the request (403 Forbidden). Bypass proxy:
no_proxy=host.docker.internal curl http://host.docker.internal:11434/api/tags
-
Connection refused — resolves to 192.168.5.2:11434 which has no Ollama listening.
-
Try Docker Desktop gateway IP as fallback:
no_proxy=192.168.65.254 curl http://192.168.65.254:11434/api/tags
-
Also connection refused — sandbox network cannot reach Docker Desktop gateway.
Logs
# DNS resolution inside sandbox
$ getent hosts host.docker.internal
192.168.5.2 host.docker.internal host.openshell.internal
# Direct access (bypassing proxy) — connection refused
$ no_proxy=host.docker.internal curl -v http://host.docker.internal:11434/api/tags
* Trying 192.168.5.2:11434...
* connect to 192.168.5.2 port 11434 failed: Connection refused
# Docker Desktop gateway IP — also refused
$ no_proxy=192.168.65.254 curl -v http://192.168.65.254:11434/api/tags
* Trying 192.168.65.254:11434...
* connect to 192.168.65.254 port 11434 failed: Connection refused
# But from Docker container level (outside k3s) — WORKS
$ docker exec openshell-cluster-nemoclaw wget -qO- http://host.docker.internal:11434/api/tags
{"models":[{"name":"qwen2.5:7b",...}]}Analysis
host.docker.internal inside the k3s sandbox resolves to 192.168.5.2, which is OpenShell's internal gateway — not the Docker Desktop host mapping. The sandbox's k3s network is fully isolated from Docker Desktop's host networking layer: - Docker container level: host.docker.internal -> macOS host (works) - k3s sandbox level: host.docker.internal -> 192.168.5.2 (OpenShell gateway, no port forwarding) The proxy inside the sandbox (http_proxy=http://10.200.0.1:3128) also blocks direct access with 403 unless bypassed via no_proxy, but even bypassing it does not help since the resolved IP is wrong. The issue requires OpenShell to either: 1. Forward host.docker.internal traffic from k3s pods to the actual Docker Desktop host mapping, or 2. Provide a dedicated mechanism for sandbox pods to access host services.
Expected Behavior
Inference requests from sandbox to host.docker.internal:11434 should reach the macOS host Ollama service and return valid responses.
Bug Details
| Field | Value |
|---|---|
| Priority | Unprioritized |
| Action | Dev - Open - To fix |
| Disposition | Open issue |
| Module | Machine Learning - NemoClaw |
| Keyword | NemoClaw, NEMOCLAW_GH_SYNC_APPROVAL, NemoClaw_Inference |
[NVB#6152097]
Activity
chengjiew commentedon May 7, 2026
try to take a look
fix(onboard): reject host.docker.internal inference URLs (#3804)
PrachiShevate-nv commentedon May 27, 2026
Able to reproduce the same issue on v0.0.52. Reopening this bug and git issue.
Inside the k3s sandbox:
host.docker.internal → 192.168.5.2 (OpenShell gateway IP), not the Docker Desktop host mapping.
no_proxy=host.docker.internal curl http://host.docker.internal:11434/api/tags → attempts 192.168.5.2:11434 → Connection refused.
no_proxy=192.168.65.254 curl http://192.168.65.254:11434/api/tags → attempts Docker Desktop gateway IP → also Connection refused.
At the Docker container level (outside k3s):
docker exec openshell-cluster-nemoclaw wget -qO- http://host.docker.internal:11434/api/tags → works and returns the Ollama tags JSON.
That is exactly the same pattern as described in the original bug description:
Host Ollama reachable from Docker containers.
Host Ollama not reachable from inside OpenShell’s k3s sandbox, even when bypassing the sandbox proxy.
chengjiew commentedon Jul 10, 2026
Keep assignee to watch the status of the blocking issue
prekshivyas commentedon Aug 17, 2026
Stale-issue verification — behavior is by-design
Reported on: v0.0.35
Verified on: v0.0.109
Verification mode: static analysis at the verified release tag; no runtime reproduction.
What's structurally fixed
The recorded intent states “Keep host.openshell.internal as the supported sandbox-internal host and point local Ollama users at the auth proxy URL.”. The intended replacement is Use the local Ollama auth-proxy URL http://host.openshell.internal:11435/v1 configured by NemoClaw onboarding..
What's not literally the same bug
The reported connection refusal is preserved as evidence that host.docker.internal is not a reliable OpenShell k3s host-service route. PR #3804 does not add forwarding for that route; it fails onboarding with actionable replacement guidance while retaining an explicit exception for Windows-host Ollama validation.
Existing CI coverage
Recommendation
@zNeill — please confirm the by-design framing is correct. A maintainer will decide closure separately.
NVBugs#6152097 needs a separate update; a GitHub issue change does not propagate.
chore(deps): trust OpenShell 0.0.106 manifests (#9224)
chore(deps): update OpenShell to 0.0.106 (#9192)