Skip to content

Commit 003f8ee

Browse files
authored
[BugFix] Use IP4 localhost form for zmq bind (#7163)
1 parent e963045 commit 003f8ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vllm/entrypoints/openai/rpc/server.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ def __init__(self, async_engine_args: AsyncEngineArgs,
3030

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

3537
def cleanup(self):
3638
"""Cleanup all resources."""

0 commit comments

Comments
 (0)