Comfy-Org/ComfyUI · error · ApiServerError

The remote service appears unreachable at this time.

Error message

The remote service appears unreachable at this time.

What it means

Companion to 775: the request failed with ClientError/OSError after retries, but connectivity diagnosis shows the local network IS working — so the remote API endpoint itself is unreachable. Raised as ApiServerError pointing at the service, not the user's machine.

Source

Thrown at comfy_api_nodes/util/download_helpers.py:198

            raise ProcessingInterrupted("Task cancelled") from None
        except (ClientError, OSError) as e:
            if attempt <= max_retries:
                request_logger.log_request_response(
                    operation_id=op_id,
                    request_method="GET",
                    request_url=url,
                    error_message=f"{type(e).__name__}: {str(e)} (will retry)",
                )
                await sleep_with_interrupt(delay, cls, None, None, None)
                delay *= retry_backoff
                continue

            diag = await _diagnose_connectivity()
            if not diag["internet_accessible"]:
                raise LocalNetworkError(
                    "Unable to connect to the network. Please check your internet connection and try again."
                ) from e
            raise ApiServerError("The remote service appears unreachable at this time.") from e
        finally:
            if stop_evt is not None:
                stop_evt.set()
            if monitor_task:
                monitor_task.cancel()
                with contextlib.suppress(Exception):
                    await monitor_task
            if req_task and not req_task.done():
                req_task.cancel()
                with contextlib.suppress(Exception):
                    await req_task
            if session:
                with contextlib.suppress(Exception):
                    await session.close()
            if fhandle:
                with contextlib.suppress(Exception):
                    fhandle.flush()
                    fhandle.close()

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Open the API host directly in a browser or with curl from the same machine to confirm reachability.
  2. Check the provider's status page / support channels for an outage.
  3. Update ComfyUI — endpoint hostnames occasionally migrate.
  4. If behind a firewall, allow egress to the API's media domain.
Defensive patterns

Strategy: retry

Validate before calling

import socket

try:
    socket.getaddrinfo(api_host, 443)
except socket.gaierror:
    raise RuntimeError(f'Cannot resolve API host {api_host}; endpoint may have moved')

Try / catch

try:
    await download(url, ...)
except ApiServerError:
    await asyncio.sleep(60)
    return await download(url, ...)  # provider outages are usually transient

Prevention

When it happens

Trigger: The local internet probe succeeds but the specific API host cannot be reached: provider outage, regional CDN issue, host blocked by a firewall rule, stale/hardcoded endpoint, or the service hostname no longer resolving to a live server.

Common situations: Provider-side outage (check status page); DNS entry for the API removed after a shutdown; a firewall allowlist that does not include the media host; asymmetric routing via VPN.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/d9e1e32576239c38. Report an issue: GitHub.