{"record":{"id":"e8da2a80da9c22aa","repo":"jax-ml/jax","slug":"coordinator-bind-address-should-be-defined","errorCode":null,"errorMessage":"coordinator_bind_address should be defined.","messagePattern":"coordinator_bind_address should be defined\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"jax/_src/distributed.py","lineNumber":161,"sourceCode":"      raise TypeError(\"process_id must be a nonnegative int. \"\n                      f\"Got process_id={process_id} of type {type(process_id)}.\")\n    if not isinstance(num_processes, int):\n      raise TypeError(\"num_processes must be a positive int. \"\n                      f\"Got num_processes={num_processes} of type {type(num_processes)}.\")\n    if not (0 <= process_id < num_processes):\n      raise ValueError(\"process_id and num_processes must be nonnegative, with process_id < num_processes. \"\n                       f\"Got process_id={process_id}, num_processes={num_processes}.\")\n\n    self.coordinator_address = coordinator_address\n\n    # The default value of [::]:port tells the coordinator to bind to all\n    # available addresses on the same port as coordinator_address.\n    default_coordinator_bind_address = '[::]:' + coordinator_address.rsplit(':', 1)[1]\n    coordinator_bind_address = (coordinator_bind_address or\n                                os.environ.get('JAX_COORDINATOR_BIND_ADDRESS',\n                                               default_coordinator_bind_address))\n    if coordinator_bind_address is None:\n      raise ValueError('coordinator_bind_address should be defined.')\n\n    if local_device_ids:\n      visible_devices = ','.join(str(x) for x in local_device_ids)\n      logger.info('JAX distributed initialized with visible devices: %s', visible_devices)\n      config.update(\"jax_cuda_visible_devices\", visible_devices)\n      config.update(\"jax_rocm_visible_devices\", visible_devices)\n\n    self.process_id = process_id\n\n    proxy_vars = []\n    if _CHECK_PROXY_ENVS.value:\n      proxy_vars = [key for key in os.environ.keys()\n                    if '_proxy' in key.lower()]\n\n    if len(proxy_vars) > 0:\n      vars = \" \".join(proxy_vars) + \". \"\n      warning = (\n        f'JAX detected proxy variable(s) in the environment as distributed setup: {vars}'","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/distributed.py#L143-L179","documentation":"The coordinator's bind address must resolve to a concrete host:port. When it is not provided and JAX_COORDINATOR_BIND_ADDRESS is unset, initialize falls back to '[::]:<port from coordinator_address>'; if that still yields None (only possible via explicit None after env lookup), this ValueError fires.","triggerScenarios":"Passing coordinator_bind_address=None explicitly while JAX_COORDINATOR_BIND_ADDRESS is unset and the default derivation path is bypassed; malformed coordinator_address without a port making the derived default unusable.","commonSituations":"Containerized coordinators with restrictive networking where operators pass explicit None expecting auto-detection; IPv4-only environments needing a specific bind address instead of the [::] wildcard; port stripped by address parsing bugs.","solutions":["Pass a valid bind address: coordinator_bind_address='0.0.0.0:12345'","Set JAX_COORDINATOR_BIND_ADDRESS env var on the coordinator process","Ensure coordinator_address includes a port so the default '[::]:port' derivation works"],"exampleFix":"# before\njax.distributed.initialize(coordinator_address='10.0.0.1', ...)\n# after\njax.distributed.initialize(coordinator_address='10.0.0.1:12345',\n    coordinator_bind_address='0.0.0.0:12345', ...)","handlingStrategy":"validation","validationCode":"import os\nbind = os.environ.get('JAX_COORDINATOR_BIND_ADDRESS') or '0.0.0.0:12345'\nassert ':' in bind and bind.rsplit(':',1)[1].isdigit(), f'bad bind {bind}'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include :port in coordinator addresses","Set JAX_COORDINATOR_BIND_ADDRESS explicitly on the coordinator"],"tags":["jax","distributed","network","bind-address"],"backgroundTag":"missing-required-config","analyzedSha":"1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb","analyzedAt":"2026-08-27T09:53:25.647Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}