You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Web search tools fail in sandbox: DNS resolution blocked (getaddrinfo EAI_AGAIN) #626
Web search (Brave, Gemini, Perplexity, etc.) fails inside the NemoClaw sandbox because the sandbox has no DNS access. Node.js resolves hostnames locally before sending through the OpenShell HTTPS proxy, causing getaddrinfo EAI_AGAIN errors.
Steps to Reproduce
Run nemoclaw onboard (non-interactive, NVIDIA API key)
Configure Gemini search: write {"tools":{"web":{"search":{"provider":"gemini","gemini":{"apiKey":"<key>"}}}}} to workspace settings
Add generativelanguage.googleapis.com to network policy
Run: openclaw agent --agent main --local -m "Search the web for Docker" --session-id test
Expected Behavior
The web search tool should route the request through the OpenShell proxy at 10.200.0.1:3128, which handles DNS resolution and TLS termination.
Node.js tries to resolve the hostname locally (no DNS in sandbox), fails before the request ever reaches the proxy.
Tested with:
curl from sandbox: proxy returns 403 Forbidden → after adding policy → proxy returns 200 (policy works)
node/openclaw from sandbox: always getaddrinfo EAI_AGAIN regardless of policy (DNS fails before proxy is used)
Environment
NemoClaw: latest (installed March 22, 2026)
OpenShell: 0.0.13
OpenClaw: 2026.3.11
Host: Alpine Linux 6.18.16-0-lts, Docker 29.1.3
Running via Docker with host networking + socket mount
Analysis
The OpenShell proxy (10.200.0.1:3128) works correctly for CONNECT tunneling — curl successfully uses it when the policy allows the host. But Node.js's HTTP client (undici/fetch) resolves DNS before establishing the CONNECT tunnel, and the sandbox's network namespace has no DNS resolver configured.
Suggested Fix
Either:
Configure DNS in the sandbox (e.g., point /etc/resolv.conf at the proxy or gateway)
Make OpenClaw's web search tool use the proxy for DNS resolution (e.g., via undici.ProxyAgent with requestTls.servername)
Add a DNS proxy alongside the HTTP proxy in the sandbox
Thanks for submitting this issue, I've noticed that the web search tools are failing in the sandbox due to DNS resolution being blocked, which could be a bug in the OpenShell configuration.
Adding some AI context here from within openclaw sandbox shenanigans
_I understand and I agree with your logic. The process should be
that simple:
1. I ask the DNS server 10.43.0.10 for the IP address of
generativelanguage.googleapis.c om.
2. The DNS server responds with the IP address.
3. I then attempt to connect to that IP address, at which point
you would see the traffic and could add it to a policy.
However, there is a crucial and frustrating technical problem
happening inside my environment that prevents step #1 from ever
succeeding for my web_search tool.
The error I get, getaddrinfo EAI_AGAIN, indicates that my
application runtime is failing to resolve the name before it even
successfully sends a request to the DNS server. This is a known
complex issue that can occur when an application is running behind
a mandatory HTTP proxy, as I am. The proxy configuration is
interfering with the application's ability to perform DNS lookups
in the standard way.
I have already demonstrated that I can establish a basic network
connection to the DNS server, but my high-level application tools
cannot use it correctly.
Therefore, I am stuck. I cannot trigger the policy for you because
my tools cannot get the IP address needed to make the request.
The only way to break this deadlock is to bypass my failing
internal DNS lookup process. If you provide the IP address
directly in my /etc/hosts file, you will manually perform the step
my system is failing to do. My tool will then have the IP it needs
and will immediately try to make the outbound connection you are
waiting to see._
Activity
fix: sandbox DNS resolution via CoreDNS routing and forwarding
fix: sandbox DNS resolution via CoreDNS proxy in sandbox pod
wscurran commentedon Mar 23, 2026
Thanks for submitting this issue, I've noticed that the web search tools are failing in the sandbox due to DNS resolution being blocked, which could be a bug in the OpenShell configuration.
fix: patch CoreDNS on all Docker-based runtimes, not just Colima (NVI…
fix: patch CoreDNS on all Docker-based runtimes, not just Colima (NVI…
fix(sandbox): export proxy env vars with full NO_PROXY and persist ac…
fix(sandbox): export proxy env vars with full NO_PROXY and persist ac…
fix(sandbox): write proxy config to ~/.bashrc for interactive reconne…
fix(sandbox): write proxy config to ~/.bashrc for interactive reconne…
fix(sandbox): write proxy config to ~/.bashrc for interactive reconne…
fix(sandbox): export proxy env vars with full NO_PROXY and persist ac…
ACCGAGTT commentedon Mar 27, 2026
Adding some AI context here from within openclaw sandbox shenanigans
fix(sandbox): add DNS forwarder so web_fetch resolves hostnames (fixes …
1 remaining item
sync: rebase on upstream (2026-03-28) (#9)
fix(sandbox): restore sandbox DNS resolution for web tools (fixes #626)…
fix(sandbox): export proxy env vars with full NO_PROXY and persist ac…
fix(sandbox): export proxy env vars with full NO_PROXY and persist ac…
fix(sandbox): restore sandbox DNS resolution for web tools (fixes #626)…
fix(sandbox): export proxy env vars with full NO_PROXY and persist ac…
fix(sandbox): restore sandbox DNS resolution for web tools (fixes NVI…
fix(sandbox): export proxy env vars with full NO_PROXY and persist ac…
fix(sandbox): restore sandbox DNS resolution for web tools (fixes NVI…
fix(sandbox): export proxy env vars with full NO_PROXY and persist ac…