Skip to content

[macOS][Onboard] Ollama readiness check fails when HTTP_PROXY is set — waitForHttp does not inject NO_PROXY for localhost probes #4181

@mercl-lau

Description

@mercl-lau

Description

After selecting "Install Ollama (macOS)" during nemoclaw onboard, Homebrew installs Ollama and ollama serve starts successfully (PID visible), but the readiness check fails with "Ollama did not become ready on :11434 within timeout." The wizard falls back to the provider selection menu.

Root cause: waitForHttp() in src/lib/core/wait.ts:59-72 spawns curl via spawnSync without injecting NO_PROXY into the child env. When HTTP_PROXY is set, curl routes localhost:11434 through the proxy, which returns 503.

The same issue also prevents Ollama detection — the provider menu shows "Install Ollama (macOS)" instead of "Local Ollama (running)" even though Ollama is installed and serving.

Workaround: export NO_PROXY=localhost,127.0.0.1 before running nemoclaw onboard.

Environment

Device:        MacBook Pro (Apple M4 Pro)
OS:            macOS 26.0.1 (Darwin 25.0.0, arm64)
Architecture:  arm64
Node.js:       v22.22.1
npm:           10.9.4
Docker:        Docker Desktop 29.2.1
OpenShell CLI: openshell 0.0.44
NemoClaw:      v0.0.50
OpenClaw:      2026.5.18 (50a2481)
HTTP_PROXY:    http://127.0.0.1:8118 (Privoxy 4.1.0)

Steps to Reproduce

  1. Ensure HTTP_PROXY is set (e.g. export HTTP_PROXY=http://127.0.0.1:8118)
  2. Uninstall Ollama if present: brew uninstall ollama
  3. Run: nemoclaw onboard
  4. Select option 7: "Install Ollama (macOS)"
  5. Wait for brew install ollama to complete (installs Ollama 0.24.0)
  6. Observe: "Starting Ollama..." followed by "Ollama did not become ready on :11434 within timeout."
  7. Wizard returns to provider selection; option 7 still shows "Install Ollama (macOS)" not "Local Ollama — running"
  8. Verify Ollama IS running:
    NO_PROXY="*" curl -s http://127.0.0.1:11434/api/tags
    Returns {"models":[]} — Ollama is healthy.
  9. Ctrl+C, then:
    export NO_PROXY=localhost,127.0.0.1 && nemoclaw onboard
  10. Now option 7 correctly shows "Local Ollama (localhost:11434) — running (suggested)"

Expected Result

After brew install ollama + ollama serve, the readiness check should detect Ollama on localhost:11434 regardless of HTTP_PROXY. The preflight warning states "NemoClaw injects NO_PROXY for its own subprocess spawns" — the waitForHttp curl call should honor this by injecting NO_PROXY.

Actual Result

  Installing Ollama via Homebrew...
  ✔︎ Bottle ollama (0.24.0)
  Starting Ollama...
  Ollama did not become ready on :11434 within timeout.

  Inference options:
    ...
    7) Install Ollama (macOS)     ← should show "Local Ollama — running"

Ollama IS running (ps aux shows ollama serve PID, NO_PROXY curl returns 200). The readiness probe curl goes through Privoxy which returns 503 for localhost.

Logs

// Source: src/lib/core/wait.ts:59-72
export function waitForHttp(url: string, timeoutSeconds = 5): boolean {
  const result = spawnSync(
    "curl",
    ["-sf", "--connect-timeout", "1", "--max-time", "1", url],
    { stdio: "ignore" },   // ← no env override, inherits HTTP_PROXY
  );
  return result.status === 0;
}

// Fix: add env to spawnSync options:
// { stdio: "ignore", env: { ...process.env, NO_PROXY: "localhost,127.0.0.1,::1", no_proxy: "localhost,127.0.0.1,::1" } }

NVB#6217142

Metadata

Metadata

Assignees

No one assigned

    Labels

    NV QABugs found by the NVIDIA QA Teamarea: inferenceInference routing, serving, model selection, or outputsplatform: macosAffects macOS, including Apple Silicon
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions