Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/cluster.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,12 @@ function init_bind_addr()
else
bind_port = 0
try
bind_addr = string(getipaddr())
# On HPC clusters, link-local addresses are usually not usable for
# communication between compute nodes.
# Therefore, we use the first non-link-local IPv4 address.
addrs = Sockets.getipaddrs(Sockets.IPv4)
filter!(!Sockets.islinklocaladdr, addrs)
bind_addr = string(first(addrs))
catch
# All networking is unavailable, initialize bind_addr to the loopback address
# Will cause an exception to be raised only when used.
Expand Down