apache/beam · error · RuntimeError

Unable to fetch remote prism binary at

Error message

Unable to fetch remote prism binary at %s: %s

What it means

prism_runner._download_to_local_path fetches the Prism release binary over HTTP and wraps any URLError in this RuntimeError. It means the runner could not download the prism executable needed to run the pipeline locally.

Solutions

  1. Verify network access to the release URL (github.com) or configure proxy env vars (HTTPS_PROXY).
  2. Pre-install prism locally (`go build` a prism binary) and point --prism_location at the file path.
  3. Retry after a transient network failure; the cache is used on subsequent runs.
  4. Run an already-running prism job server and pass --job_endpoint to PrismRunner to skip download entirely.

Example fix

// before (default, requires network)
--runner=PrismRunner
// after (offline-safe)
--runner=PrismRunner --prism_location=/usr/local/bin/prism
Defensive patterns

Strategy: fallback

Validate before calling

import urllib.request
urllib.request.urlopen('https://github.com', timeout=5)  # check connectivity before running PrismRunner

Try / catch

try:
    result = pipeline.run()
except RuntimeError as e:
    if 'Unable to fetch remote prism binary' in str(e):
        # fall back to a pre-installed local prism
        options.view_as(PrismRunner._PRISM_OPTIONS).prism_location = '/usr/local/bin/prism'
        raise

Prevention

When it happens

Trigger: First run of PrismRunner without a cached or pre-built prism binary while the release download URL is unreachable (offline, proxy/firewall blocking github.com, DNS failure).

Common situations: Corporate networks/proxies blocking github.com; running in air-gapped CI; transient GitHub outage during first PrismRunner use.

Understand the failure class

Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.

Related errors


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/e88fb5f158f618a4. Report an issue: GitHub.

Appendix: source

Thrown at sdks/python/apache_beam/runners/portability/prism_runner.py:301

            'Using cached prism binary/zip from %s for %s' % (cached_file, url))
      else:
        _LOGGER.info('Downloading prism from %s' % url)
        if not os.path.exists(bin_cache):
          os.makedirs(bin_cache)
        try:
          try:
            url_read = FileSystems.open(url)
          except ValueError:
            url_read = urlopen(url)
          with open(cached_file + '.tmp', 'wb') as zip_write:
            shutil.copyfileobj(
                typing.cast(typing.BinaryIO, url_read),
                zip_write,
                length=1 << 20)

          _rename_if_different(cached_file + '.tmp', cached_file)
        except URLError as e:
          raise RuntimeError(
              'Unable to fetch remote prism binary at %s: %s' % (url, e))
        # If we download a new prism, then we should always use it but not
        # the cached one.
        ignore_cache = True
    return cached_file, ignore_cache

  @staticmethod
  def _construct_download_url(
      version: str, root_tag: str, sys: str, mach: str) -> str:
    """Construct the prism download URL with the appropriate release tag.
    This maps operating systems and machine architectures to the compatible
    and canonical names used by the Go build targets.

    platform.system() provides compatible listings, so we need to filter out
    the unsupported versions."""
    opsys = sys.lower()
    if opsys not in ['linux', 'windows', 'darwin']:
      raise ValueError(

View on GitHub (pinned to 12126d8942)