Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
27c24b3f
Unverified
Commit
27c24b3f
authored
Jul 11, 2025
by
Hongkuan Zhou
Committed by
GitHub
Jul 11, 2025
Browse files
fix: fall back to 127.0.0.1 if hostname is not available (#1878)
parent
26d7a61e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
examples/vllm_v1/components/main.py
examples/vllm_v1/components/main.py
+10
-0
No files found.
examples/vllm_v1/components/main.py
View file @
27c24b3f
...
@@ -113,6 +113,16 @@ def set_side_channel_host_and_port(
...
@@ -113,6 +113,16 @@ def set_side_channel_host_and_port(
"""
"""
if
hostname
is
None
:
if
hostname
is
None
:
hostname
=
socket
.
gethostname
()
hostname
=
socket
.
gethostname
()
# Test if hostname is usable by attempting to bind to it
try
:
with
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
as
test_socket
:
test_socket
.
bind
((
hostname
,
0
))
except
(
socket
.
error
,
socket
.
gaierror
):
# If hostname is not usable, fall back to localhost
logger
.
warning
(
f
"Hostname '
{
hostname
}
' is not usable, falling back to '127.0.0.1'"
)
hostname
=
"127.0.0.1"
if
port
is
None
:
if
port
is
None
:
port
=
find_free_port
()
port
=
find_free_port
()
logger
.
debug
(
"Setting VLLM_NIXL_SIDE_CHANNEL_HOST to %s"
,
hostname
)
logger
.
debug
(
"Setting VLLM_NIXL_SIDE_CHANNEL_HOST to %s"
,
hostname
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment