[MacOS] Gateway fails to proxy inference requests to integrate.api.nvidia.com from sandbox
Description
Test Plan https://docs.google.com/document/d/14bIihtww1Jtzz9eU-FdmFixKRFO9WI_OuGw9yrEP9Cw/edit?pli=1&tab=t.0
4.1 NVIDIA Cloud Inference (default profile)
When running inside the NemoClaw sandbox on macOS (Colima), requests to https://inference.local/v1/chat/completions are correctly intercepted by the OpenShell gateway and routed to integrate.api.nvidia.com, but the gateway fails to establish the outbound HTTPS connection to NVIDIA's API. The same request succeeds when run directly from the host.
- OS: macOS (Apple Silicon)
- Gateway: nemoclaw (Healthy, Connected)
- Provider: nvidia-nim (openai type, NVIDIA_API_KEY configured
The test case instructions (4.1 #3) say to run scripts/test-inference.sh inside the sandbox. However, the Dockerfile only copies scripts/nemoclaw-start.sh into the image (as /usr/local/bin/nemoclaw-start). The test scripts (test-inference.sh, test-inference-local.sh, etc.) are not included in the sandbox image.
ISSUE #3 TLS handshake error in the logs
ERROR openshell_server: TLS handshake failed error=tls handshake eof client=10.42.0.1:43780 ERROR openshell_server: Connection error error=connection error client=10.42.0.10:36312 WARN openshell_server::sandbox: Sandbox watcher error error=watch stream failed ISSUE #4 After unsetting the NVIDIA_API_KEY, the curl command to inference.local returns no error.Steps to reproduce
- Complete
nemoclaw setupsuccessfully (gateway healthy, sandbox ready, providers registered) - Export
NVIDIA_API_KEYwith a valid key - Connect to sandbox:
nemoclaw connect - Run inference test inside sandbox: curl -s https://inference.local/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model":"nvidia/nemotron-3-super-120b-a12b","messages":[{"role":"user","content":"say hello"}]}'
{"error":"failed to connect to https://integrate.api.nvidia.com/v1/chat/completions: error sending request for url (https://integrate.api.nvidia.com/v1/chat/completions)"}
Steps to reproduce
No steps provided.
[NVB# 5982604]
[NVB#5982604]
Encountered the similar error about tls on macos apple silicon.
Created sandbox: my-assistant [0.0s] Requesting compute... Error: × status: Unknown, message: "h2 protocol error: error reading a body from │ connection", details: [], metadata: MetadataMap { headers: {} } ├─▶ error reading a body from connection ╰─▶ peer closed connection without sending TLS close_notify: https:// docs.rs/rustls/latest/rustls/manual/_03_howto/index.html#unexpected-eof
another time:
[6/7] Setting up OpenClaw inside sandbox ────────────────────────────────────────────────── Error: × transport error ├─▶ tls handshake eof ╰─▶ tls handshake eof
@zNeill Please confirm if we can close NVbugs for this. I tested and no issue found. Curl
curl -s https://inference.local/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model":"nvidia/nemotron-3-super-120b-a12b","messages":[{"role":"user","content":"say hello"}]}'
{"error":"connection not allowed by policy"}
Using node to call endpoint passed successfully.
sandbox@35a3b60c8a55:~$ node -e 'const body={model:"nvidia/nemotron-3-super-120b-a12b",messages:[{role:"user",content:"say hello"}]}; fetch("https://inference.local/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(body)}).then((r)=>r.text()).then((text)=>console.log(text)).catch((e)=>{console.error(e);process.exit(1);})'
(node:1557) [UNDICI-EHPA] Warning: EnvHttpProxyAgent is experimental, expect them to change at any time.
(Use `node --trace-warnings ...` to show where the warning was created)
{"id":"chatcmpl-5d8d87ee-6369-4ba1-a9de-095aedec64c9","choices":[{"index":0,"message":{"content":"\n\nHello! 👋 How can I help you today?","role":"assistant","reasoning_content":"The user just wants me to say hello. This is a simple greeting request.\n"},"finish_reason":"stop"}],"created":1782296168,"model":"minimaxai/minimax-m2.7","object":"chat.completion","usage":{"prompt_tokens":40,"completion_tokens":30,"total_tokens":70,"prompt_tokens_details":{"audio_tokens":null,"cached_tokens":16}},"nvext":{"worker_id":{"prefill_worker_id":7587894510589978132,"prefill_dp_rank":0,"decode_worker_id":7587894510589978132,"decode_dp_rank":0},"timing":{"request_received_ms":1782296168544,"prefill_wait_time_ms":0.994231,"prefill_time_ms":86.97097400000001,"ttft_ms":87.96520500000001,"total_time_ms":572.098022,"kv_hit_rate":0.0,"router_queue_depth":0}}}