{"record":{"id":"afb856f46725c2f7","repo":"apache/beam","slug":"unable-to-fetch-remote-job-server-jar-at-url-e-also-failed","errorCode":null,"errorMessage":"Unable to fetch remote job server jar at {url}: {e}. Also failed to fetch from Google Maven mirror at {fallback_url}: {fallback_e}. If no Internet access at runtime, stage the jar at {cached_jar}","messagePattern":"Unable to fetch remote job server jar at (.+?): (.+?)\\. Also failed to fetch from Google Maven mirror at (.+?): (.+?)\\. If no Internet access at runtime, stage the jar at (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/utils/subprocess_server.py","lineNumber":578,"sourceCode":"          os.makedirs(cache_dir)\n          # TODO: Clean up this cache according to some policy.\n        try:\n          cls._download_jar_to_cache(url, cached_jar, user_agent)\n        except URLError as e:\n          # Try Google Maven mirror as fallback if the original URL is from\n          # Maven Central\n          if url.startswith(cls.MAVEN_CENTRAL_REPOSITORY):\n            fallback_url = url.replace(\n                cls.MAVEN_CENTRAL_REPOSITORY, cls.GOOGLE_MAVEN_MIRROR)\n            _LOGGER.info(\n                'Trying Google Maven mirror fallback: %s' % fallback_url)\n            try:\n              cls._download_jar_to_cache(fallback_url, cached_jar, user_agent)\n              _LOGGER.info(\n                  'Successfully downloaded from Google Maven mirror: %s' %\n                  fallback_url)\n            except URLError as fallback_e:\n              raise RuntimeError(\n                  f'Unable to fetch remote job server jar at {url}: {e}. '\n                  f'Also failed to fetch from Google Maven mirror at '\n                  f'{fallback_url}: {fallback_e}. '\n                  f'If no Internet access at runtime, stage the jar at '\n                  f'{cached_jar}')\n          else:\n            raise RuntimeError(\n                f'Unable to fetch remote job server jar at {url}: {e}. If no '\n                f'Internet access at runtime, stage the jar at {cached_jar}')\n      return cached_jar\n\n  @classmethod\n  @contextlib.contextmanager\n  def beam_services(cls, replacements):\n    try:\n      old = cls._BEAM_SERVICES.replacements\n      cls._BEAM_SERVICES.replacements = dict(old, **replacements)\n      yield","sourceCodeStart":560,"sourceCodeEnd":596,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/utils/subprocess_server.py#L560-L596","documentation":"local_jar() downloads the job-server jar from a remote URL into a cache directory, with a Google Maven mirror as fallback. If both the primary URL and the mirror fail with URLError, it raises with both underlying errors and suggests manually staging the jar at the cache path. It is a network/availability failure, not a code bug.","triggerScenarios":"Both cls._download_jar_to_cache(url,...) and the mirror fallback raise URLError — no internet access, DNS failure, proxy/firewall blocking repo.maven.apache.org and mirror.googleapis.com, or a bad jar URL.","commonSituations":"Running Beam in an air-gapped/VPN'd corporate network; CI nodes without outbound HTTPS; transient Maven outages; typo'd or removed jar URL after a version change.","solutions":["Pre-stage the jar manually: download it on a connected machine and place it at the path given in {cached_jar}; local_jar() will then skip downloading.","Restore outbound HTTPS to repo.maven.apache.org and mirror.googleapis.com (proxy settings, firewall rules, DNS).","Configure urllib proxy environment variables (https_proxy) so downloads work through your corporate proxy.","Use a released Beam version whose jar URL is valid on Maven Central."],"exampleFix":"# before\n# rely on runtime download in air-gapped cluster (fails)\n# after\ncurl -o ~/.apache_beam/cache/beam-runners-flink-1.17-job-server.jar \\\n  https://repo.maven.apache.org/maven2/org/apache/beam/beam-runners-flink-1.17-job-server/.../beam-runners-flink-1.17-job-server-1.17.jar","handlingStrategy":"fallback","validationCode":"import urllib.request\nfor u in [primary_jar_url, mirror_jar_url]:\n    try:\n        urllib.request.urlopen(u, timeout=10)\n        break\n    except Exception as e:\n        last = e\nelse:\n    print('No network to jar repos; pre-stage the jar in the cache dir')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pre-download the jar into the cache dir for offline environments","Configure https_proxy for corporate networks","Whitelist repo.maven.apache.org and mirror.googleapis.com in firewalls","Verify jar URLs exist for your Beam version"],"tags":["python","network","download","offline","apache-beam"],"backgroundTag":"http-request-failed","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}