{"record":{"id":"e0fb240e6924eb44","repo":"sgl-project/sglang","slug":"sglang-rust-server-serves-the-pd-kv-bootstrap-regi","errorCode":null,"errorMessage":"SGLANG_RUST_SERVER serves the PD KV bootstrap registry on the api port itself; --disaggregation-bootstrap-port {} conflicts with --port {}. Drop --disaggregation-bootstrap-port (decode nodes and the PD router must then target the prefill api port).","messagePattern":"SGLANG_RUST_SERVER serves the PD KV bootstrap registry on the api port itself; --disaggregation-bootstrap-port (.+?) conflicts with --port (.+?)\\. Drop --disaggregation-bootstrap-port \\(decode nodes and the PD router must then target the prefill api port\\)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/arg_groups/pd_disaggregation_hook.py","lineNumber":166,"sourceCode":"\ndef _alias_bootstrap_port_to_api_port(server_args: ServerArgs) -> None:\n    \"\"\"Rust-server prefill serves the KV bootstrap registry on the api listener\n    itself, so the resolved bootstrap port must BE the api port — every internal\n    consumer (KVManager registration, PrefillBootstrapQueue) reads the resolved\n    field and agrees automatically. Decode is untouched: there the field names\n    the PREFILL side's bootstrap port and must stay as the operator set it.\n    \"\"\"\n    cfg = resolving_view(server_args)\n    default_port = next(\n        f.default\n        for f in dataclasses.fields(server_args)\n        if f.name == \"disaggregation_bootstrap_port\"\n    )\n    if cfg.disaggregation_bootstrap_port not in (\n        default_port,\n        cfg.port,\n    ):\n        raise ValueError(\n            \"SGLANG_RUST_SERVER serves the PD KV bootstrap registry on the api \"\n            \"port itself; --disaggregation-bootstrap-port \"\n            f\"{cfg.disaggregation_bootstrap_port} conflicts with --port \"\n            f\"{cfg.port}. Drop --disaggregation-bootstrap-port (decode \"\n            \"nodes and the PD router must then target the prefill api port).\"\n        )\n    if cfg.disaggregation_bootstrap_port != cfg.port:\n        logger.info(\n            \"SGLANG_RUST_SERVER: KV bootstrap registry is served on the api \"\n            \"port; disaggregation_bootstrap_port %d -> %d\",\n            cfg.disaggregation_bootstrap_port,\n            cfg.port,\n        )\n        declare_resolution(\n            server_args,\n            \"_alias_bootstrap_port_to_api_port\",\n            disaggregation_bootstrap_port=cfg.port,\n        )","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/arg_groups/pd_disaggregation_hook.py#L148-L184","documentation":"When SGLANG_RUST_SERVER is enabled, the PD KV bootstrap registry is served on the main API port, so an explicitly set --disaggregation-bootstrap-port that differs from both the default and --port is rejected to avoid ambiguity about where decode nodes should connect.","triggerScenarios":"SGLANG_RUST_SERVER enabled plus --disaggregation-bootstrap-port set to a value that is neither the field default nor equal to --port.","commonSituations":"Porting a classic (non-rust-server) disaggregated config that pins a dedicated bootstrap port onto the rust-server runtime.","solutions":["Drop --disaggregation-bootstrap-port entirely (decode nodes/router then target the prefill API port)","Or set it equal to --port","Or unset SGLANG_RUST_SERVER if you need a separate bootstrap port"],"exampleFix":"# before\nSGLANG_RUST_SERVER=1 --disaggregation-bootstrap-port 8999 --port 8000\n# after\nSGLANG_RUST_SERVER=1 --port 8000","handlingStrategy":"validation","validationCode":"if os.environ.get(\"SGLANG_RUST_SERVER\"):\n    cfg.disaggregation_bootstrap_port = None  # let it default to api port","typeGuard":null,"tryCatchPattern":null,"preventionTips":["With rust server, never pin a bootstrap port different from --port"],"tags":["sglang","pd-disaggregation","rust-server","bootstrap-port","port-conflict"],"backgroundTag":"port-already-in-use","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}