Skip to content

Commit

Permalink
[BugFix] Use IP4 localhost form for zmq bind (vllm-project#7163)
Browse files Browse the repository at this point in the history
  • Loading branch information
njhill authored and sfc-gh-mkeralapura committed Aug 12, 2024
1 parent 6d7c983 commit 853d4b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vllm/entrypoints/openai/rpc/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def __init__(self, async_engine_args: AsyncEngineArgs,

# Init socket for readiness state.
self.socket = self.context.socket(zmq.constants.ROUTER)
self.socket.bind(f"tcp://localhost:{port}")
# Note numeric form of localhost should be used for zmq bind(),
# see https://stackoverflow.com/a/8958414
self.socket.bind(f"tcp://127.0.0.1:{port}")

def cleanup(self):
"""Cleanup all resources."""
Expand Down

0 comments on commit 853d4b0

Please sign in to comment.