sgl-project/sglang · error · HTTPException
{e}
Error message
{e} What it means
The /register_transfer_engine_info endpoint on the EngineInfoBootstrapServer wraps its registration logic in try/except; any exception while storing a rank's transfer-engine info (malformed payload, bad rank, internal state error) is logged and re-raised as HTTP 400 with the original message as detail.
Source
Thrown at python/sglang/srt/entrypoints/engine_info_bootstrap_server.py:72
tp_rank = data["tp_rank"]
info = data["transfer_engine_info"]
session_id = info["session_id"]
weights_info_dict = info["weights_info_dict"]
with self.lock:
self.transfer_engine_info[tp_rank] = (
session_id,
weights_info_dict,
)
logger.info(
f"Registered transfer engine info for tp_rank={tp_rank}, "
f"session_id={session_id}"
)
return PlainTextResponse("OK")
except Exception as e:
logger.error(f"Failed to register engine info: {e}")
raise HTTPException(status_code=400, detail=str(e))
@app.get("/get_transfer_engine_info")
def get_transfer_engine_info(rank: int):
if rank < 0:
raise HTTPException(status_code=400, detail="Invalid rank parameter")
with self.lock:
info = self.transfer_engine_info.get(rank)
if info is None:
raise HTTPException(
status_code=404,
detail=f"No transfer engine info for rank {rank}",
)
return {"rank": rank, "remote_instance_transfer_engine_info": list(info)}
config = uvicorn.Config(app, host=host, port=port, log_level="warning")View on GitHub (pinned to 0132848349)
Solutions
- Read the response detail — it echoes the underlying exception message which names the real problem.
- Ensure the registering client and server run the same sglang version so the payload schema matches.
- Don't call this endpoint manually; let the launcher's rank-0 workers perform registration.
Defensive patterns
Strategy: retry
Validate before calling
import requests
r = requests.post(f"http://{host}:{port}/register_transfer_engine_info",
json=payload, timeout=10)
assert r.status_code == 200, r.text # surface detail before server logs Try / catch
resp = requests.post(url, json=payload)
if resp.status_code == 400:
logger.error("register rejected: %s", resp.json().get("detail"))
# fix payload per detail, then retry once Prevention
- Never hand-craft registration payloads; use the launcher's built-in registration path.
- Keep client and bootstrap server on the same sglang version.
- Log resp.text on any non-200 to capture the server-side exception message.
When it happens
Trigger: POSTing to /register_transfer_engine_info with a body that fails parsing/validation or triggers an internal error during registration; common when hand-testing the endpoint or when a rank's registration payload doesn't match the expected schema.
Common situations: Custom scripts poking the bootstrap server; version skew between the registering worker and the bootstrap server changing the payload schema; retrying a duplicate/rank-mismatched registration.
Related errors
- Invalid rank parameter
- No transfer engine info for rank {rank}
- Unknown serve backend {name!r}. Available values: {available
- Multiple distributions register serve backend {name!r}: {pro
- Failed to load serve backend {name!r} from {self._entry_poin
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/340cf83fc70505f9.
Report an issue: GitHub.