openclaw - 💡(How to fix) Fix [Bug]: Telegram polling fails with "DNS-resolved IP unreachable" on Windows — node fetch works fine [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#77262Fetched 2026-05-05 05:50:30
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
2
Timeline (top)
closed ×1commented ×1labeled ×1

Gateway Telegram polling consistently times out with "DNS-resolved IP unreachable; trying alternative Telegram API IP" while direct Node.js fetch to the same Telegram API URL succeeds instantly on the same machine.

Error Message

  1. Running the gateway manually in foreground (node ... gateway --port 19000) instead of as a Scheduled Task — same error.
  2. Killing all node.exe processes and restarting cleanly — same error.
  3. Upgrading from 2026.4.29 to 2026.5.2 — same error (was present before upgrade too).

Root Cause

Gateway Telegram polling consistently times out with "DNS-resolved IP unreachable; trying alternative Telegram API IP" while direct Node.js fetch to the same Telegram API URL succeeds instantly on the same machine.

Fix Action

Fix / Workaround

  1. Setting NODE_OPTIONS=--dns-result-order=ipv4first as a Machine-level environment variable — no effect.
  2. Adding set "NODE_OPTIONS=--dns-result-order=ipv4first" directly in gateway.cmd — no effect.
  3. Running the gateway manually in foreground (node ... gateway --port 19000) instead of as a Scheduled Task — same error.
  4. Killing all node.exe processes and restarting cleanly — same error.
  5. Upgrading from 2026.4.29 to 2026.5.2 — same error (was present before upgrade too).

Code Example

# Telegram polling fails with "DNS-resolved IP unreachable" on Windows — node fetch works fine

## Environment

- OpenClaw: 2026.5.2 (8b2a6e5)
- OS: Windows 11 Pro (10.0.22621)
- Node.js: 24.14.1
- Gateway mode: local, bind=lan, port=19000
- Channel: Telegram (long-polling)

## Problem

The gateway starts normally and the Telegram provider initializes (`[telegram] [default] starting provider (@my_bot)`), but polling never succeeds. The log shows this repeatedly:


[telegram/network] fetch fallback: DNS-resolved IP unreachable; trying alternative Telegram API IP (codes=none, reason=request-timeout)


The bot never receives messages. After several cycles, polling stalls are detected and the transport is rebuilt, but the problem persists.

## What works

Direct fetch from Node.js in the same environment succeeds instantly:


node -e "fetch('https://api.telegram.org/bot<token>/getMe').then(r=>r.json()).then(d=>console.log(JSON.stringify(d)))"
# Returns {"ok":true,"result":{"id":...,"is_bot":true,...}}


`curl` and `nslookup` also work. DNS resolves to both IPv4 (149.154.166.110) and IPv6 (2001:67c:4e8:f004::9). No outbound firewall rules block node.exe. Only Windows Defender is installed.

## What I tried

1. Setting `NODE_OPTIONS=--dns-result-order=ipv4first` as a Machine-level environment variable — no effect.
2. Adding `set "NODE_OPTIONS=--dns-result-order=ipv4first"` directly in `gateway.cmd` — no effect.
3. Running the gateway manually in foreground (`node ... gateway --port 19000`) instead of as a Scheduled Task — same error.
4. Killing all node.exe processes and restarting cleanly — same error.
5. Upgrading from 2026.4.29 to 2026.5.2 — same error (was present before upgrade too).

## Observations

- The timeout happens specifically on the Telegram `getUpdates` long-poll request, not on short requests.
- The gateway's internal fetch mechanism seems to behave differently from Node's global `fetch()`.
- `event_loop_utilization` frequently hits 0.93+ during polling attempts, suggesting the process gets bogged down.
- On one occasion after a restart, the bot briefly responded with "Something went wrong while processing your request" (meaning the Telegram connection worked momentarily but the Anthropic API call failed). Subsequent restarts went back to the DNS timeout.

## Expected behavior

The gateway should be able to reach `api.telegram.org` for long-polling, since Node.js on the same machine can do so without issues.

## Logs (excerpt)


12:29:44 [telegram] [default] starting provider (@my_bot)
12:29:47 [telegram] menu text exceeded the conservative 5700-character payload budget; shortening descriptions to keep 65 commands visible.
12:30:53 [telegram/network] fetch fallback: DNS-resolved IP unreachable; trying alternative Telegram API IP (codes=none, reason=request-timeout)
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Gateway Telegram polling consistently times out with "DNS-resolved IP unreachable; trying alternative Telegram API IP" while direct Node.js fetch to the same Telegram API URL succeeds instantly on the same machine.

Steps to reproduce

  1. Install OpenClaw 2026.5.2 on Windows 11, Node 24.14.1
  2. Configure Telegram channel with a valid bot token
  3. Start gateway (openclaw gateway start or manual foreground)
  4. Observe "DNS-resolved IP unreachable" in logs after ~30s
  5. Confirm node -e "fetch('https://api.telegram.org/bot<token>/getMe').then(r=>r.json()).then(console.log)" works fine

Expected behavior

Gateway should reach api.telegram.org for long-polling, since Node.js on the same machine can do so.

Actual behavior

Polling never completes. Log shows repeated "fetch fallback: DNS-resolved IP unreachable; trying alternative Telegram API IP (codes=none, reason=request-timeout)". Bot never receives messages.

OpenClaw version

2026.5.2 (8b2a6e5)

Operating system

Windows 11 Pro (10.0.22621)

Install method

npm global

Model

anthropic/claude-opus-4-7

Provider / routing chain

openclaw -> anthropic

Additional provider/model setup details

Default config, gateway.bind=lan, port=19000. NODE_OPTIONS=--dns-result-order=ipv4first set in gateway.cmd, no effect.

Logs, screenshots, and evidence

# Telegram polling fails with "DNS-resolved IP unreachable" on Windows — node fetch works fine

## Environment

- OpenClaw: 2026.5.2 (8b2a6e5)
- OS: Windows 11 Pro (10.0.22621)
- Node.js: 24.14.1
- Gateway mode: local, bind=lan, port=19000
- Channel: Telegram (long-polling)

## Problem

The gateway starts normally and the Telegram provider initializes (`[telegram] [default] starting provider (@my_bot)`), but polling never succeeds. The log shows this repeatedly:


[telegram/network] fetch fallback: DNS-resolved IP unreachable; trying alternative Telegram API IP (codes=none, reason=request-timeout)


The bot never receives messages. After several cycles, polling stalls are detected and the transport is rebuilt, but the problem persists.

## What works

Direct fetch from Node.js in the same environment succeeds instantly:


node -e "fetch('https://api.telegram.org/bot<token>/getMe').then(r=>r.json()).then(d=>console.log(JSON.stringify(d)))"
# Returns {"ok":true,"result":{"id":...,"is_bot":true,...}}


`curl` and `nslookup` also work. DNS resolves to both IPv4 (149.154.166.110) and IPv6 (2001:67c:4e8:f004::9). No outbound firewall rules block node.exe. Only Windows Defender is installed.

## What I tried

1. Setting `NODE_OPTIONS=--dns-result-order=ipv4first` as a Machine-level environment variable — no effect.
2. Adding `set "NODE_OPTIONS=--dns-result-order=ipv4first"` directly in `gateway.cmd` — no effect.
3. Running the gateway manually in foreground (`node ... gateway --port 19000`) instead of as a Scheduled Task — same error.
4. Killing all node.exe processes and restarting cleanly — same error.
5. Upgrading from 2026.4.29 to 2026.5.2 — same error (was present before upgrade too).

## Observations

- The timeout happens specifically on the Telegram `getUpdates` long-poll request, not on short requests.
- The gateway's internal fetch mechanism seems to behave differently from Node's global `fetch()`.
- `event_loop_utilization` frequently hits 0.93+ during polling attempts, suggesting the process gets bogged down.
- On one occasion after a restart, the bot briefly responded with "Something went wrong while processing your request" (meaning the Telegram connection worked momentarily but the Anthropic API call failed). Subsequent restarts went back to the DNS timeout.

## Expected behavior

The gateway should be able to reach `api.telegram.org` for long-polling, since Node.js on the same machine can do so without issues.

## Logs (excerpt)


12:29:44 [telegram] [default] starting provider (@my_bot)
12:29:47 [telegram] menu text exceeded the conservative 5700-character payload budget; shortening descriptions to keep 65 commands visible.
12:30:53 [telegram/network] fetch fallback: DNS-resolved IP unreachable; trying alternative Telegram API IP (codes=none, reason=request-timeout)

Impact and severity

Affected: Windows users with Telegram channel Severity: High (Telegram channel completely non-functional) Frequency: 100% of attempts Consequence: Bot cannot receive or respond to any Telegram messages

Additional information

Was present on 2026.4.29, persists on 2026.5.2. On one occasion after a clean restart the bot briefly responded with "Something went wrong" (meaning Telegram connected momentarily) before reverting to DNS timeout on subsequent restarts. No VPN, no firewall rules blocking node.exe, only Windows Defender.

extent analysis

TL;DR

The gateway's internal fetch mechanism may be causing the "DNS-resolved IP unreachable" issue, which can be mitigated by investigating the difference in behavior between the gateway's fetch and Node's global fetch().

Guidance

  • Investigate the gateway's internal fetch mechanism to understand why it behaves differently from Node's global fetch().
  • Verify that the issue is specific to the Telegram getUpdates long-poll request and not a general problem with the gateway's networking.
  • Check the event_loop_utilization metric to see if the process is getting bogged down during polling attempts, which could be contributing to the timeout.
  • Consider testing the gateway with a different provider or channel to see if the issue is specific to Telegram.

Example

No code example is provided as the issue is more related to the gateway's internal behavior and configuration.

Notes

The issue seems to be specific to the Windows environment and the Telegram channel, and it's not clear if it's a problem with the gateway, the Telegram API, or the Windows networking configuration. Further investigation is needed to determine the root cause.

Recommendation

Apply workaround: Investigate and potentially modify the gateway's internal fetch mechanism to match the behavior of Node's global fetch(), or use a different provider or channel if possible. This is because the issue seems to be specific to the gateway's internal behavior and modifying it might resolve the problem.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The gateway should be able to reach api.telegram.org for long-polling, since Node.js on the same machine can do so without issues.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING