{"record":{"id":"95fa08da2dd8bf82","repo":"cloudflare/cloudflared","slug":"did-not-receive-icmp-echo-reply","errorCode":null,"errorMessage":"did not receive ICMP echo reply","messagePattern":"did not receive ICMP echo reply","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ingress/icmp_windows.go","lineNumber":393,"sourceCode":"\tif err != nil {\n\t\treturn nil, err\n\t}\n\treplyCount, _, err := IcmpSendEcho_proc.Call(\n\t\tip.handle,\n\t\tuintptr(inAddr),\n\t\tuintptr(unsafe.Pointer(&echo.Data[0])),\n\t\tuintptr(dataSize),\n\t\tnoIPHeaderOption,\n\t\tuintptr(unsafe.Pointer(&replyBuf[0])),\n\t\treplySize,\n\t\ticmpRequestTimeoutMs,\n\t)\n\tif replyCount == 0 {\n\t\t// status is returned in 5th to 8th byte of reply buffer\n\t\tif status, parseErr := unmarshalIPStatus(replyBuf[4:8]); parseErr == nil && status != success {\n\t\t\treturn nil, errors.Wrapf(err, \"received ip status: %s\", status)\n\t\t}\n\t\treturn nil, errors.Wrap(err, \"did not receive ICMP echo reply\")\n\t} else if replyCount > 1 {\n\t\tip.logger.Warn().Msgf(\"Received %d ICMP echo replies, only sending 1 back\", replyCount)\n\t}\n\treturn newEchoV4Resp(replyBuf)\n}\n\n// Third definition of https://docs.microsoft.com/en-us/windows/win32/api/inaddr/ns-inaddr-in_addr#syntax is address in uint32\nfunc inAddrV4(ip netip.Addr) (uint32, error) {\n\tif !ip.Is4() {\n\t\treturn 0, fmt.Errorf(\"%s is not IPv4\", ip)\n\t}\n\tv4 := ip.As4()\n\treturn endian.Uint32(v4[:]), nil\n}\n\ntype echoResp interface {\n\tstatus() ipStatus\n\trtt() uint32","sourceCodeStart":375,"sourceCodeEnd":411,"githubUrl":"https://github.com/cloudflare/cloudflared/blob/2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f/ingress/icmp_windows.go#L375-L411","documentation":"In icmpSendEcho, when IcmpSendEcho returns 0 replies and the reply buffer does NOT carry a parseable non-success IP status, cloudflared wraps the raw API error as 'did not receive ICMP echo reply'. It means no ICMPv4 reply arrived (or none could be attributed) within icmpRequestTimeoutMs.","triggerScenarios":"IcmpSendEcho returns replyCount == 0 with either a successful/unknown status byte pattern — typically a pure timeout where no echo response was received before icmpRequestTimeoutMs elapsed.","commonSituations":"Pinging hosts that silently drop ICMP (common for public endpoints), congested links exceeding the fixed request timeout, or firewalls dropping echo requests without an ICMP unreachable response.","solutions":["Treat as a timeout: retry or increase the effective timeout budget in the probing layer.","Confirm the target actually responds to ICMP with the OS ping tool.","Check for firewall rules silently dropping ICMP echo on the path.","Verify network path stability (packet loss) between the Windows host and the destination."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Go: treat as timeout and retry with a budget\nresp, err := proxy.Request(ctx, dst, echo)\nif err != nil && strings.Contains(err.Error(), \"did not receive ICMP echo reply\") {\n\tselect {\n\tcase <-ctx.Done():\n\t\t// give up within caller's deadline\n\tcase <-time.After(retryDelay):\n\t\tresp, err = proxy.Request(ctx, dst, echo)\n\t}\n}","preventionTips":["Expect silent ICMP drops from many public hosts; fall back to TCP/HTTP checks.","Allow multiple probe attempts before declaring a target unhealthy.","Verify packet loss on the path when timeouts cluster."],"tags":["icmp","windows","timeout","network"],"backgroundTag":"request-timeout","analyzedSha":"2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f","analyzedAt":"2026-09-06T04:14:33.757Z","contentChangedAt":"2026-09-06T04:14:33.757Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}