Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
f90945c4
Unverified
Commit
f90945c4
authored
Jun 01, 2025
by
storyicon
Committed by
GitHub
May 31, 2025
Browse files
fix(PD-disaggregation): Can not get local ip (#6792)
Signed-off-by:
storyicon
<
storyicon@foxmail.com
>
parent
094fbdac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
python/sglang/srt/utils.py
python/sglang/srt/utils.py
+8
-0
No files found.
python/sglang/srt/utils.py
View file @
f90945c4
...
...
@@ -2077,6 +2077,14 @@ def get_local_ip_by_remote() -> str:
except
Exception
:
pass
try
:
hostname
=
socket
.
gethostname
()
ip
=
socket
.
gethostbyname
(
hostname
)
if
ip
and
ip
!=
"127.0.0.1"
and
ip
!=
"0.0.0.0"
:
return
ip
except
Exception
:
pass
# try ipv6
try
:
s
=
socket
.
socket
(
socket
.
AF_INET6
,
socket
.
SOCK_DGRAM
)
...
...
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