Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use local ipv6 address #183

Merged
merged 2 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion fed/cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def _process_data_sending_task_return(self, message):
try:
res = ray.get(obj_ref)
except Exception as e:
logger.warn(f'Failed to ??? send {obj_ref} to {dest_party}, error: {e},'
logger.warn(f'Failed to send {obj_ref} to {dest_party}, error: {e},'
f'upstream_seq_id: {upstream_seq_id}, '
f'downstream_seq_id: {downstream_seq_id}.')
if (isinstance(e, RayError)):
Expand Down
13 changes: 6 additions & 7 deletions fed/tests/test_listening_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ def _run(party):
compatible_utils.init_ray(address='local')
occupied_port = 11020
# NOTE(NKcqx): Firstly try to bind IPv6 because the grpc server will do so.
# Otherwise this UT will false because socket bind $occupied_port
# on IPv4 address while grpc server listendn Ipv6 address.
# Otherwise this UT will fail because socket bind $occupied_port
# on IPv4 address while grpc server listened on the Ipv6 address.
try:
s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
# Pre-occuping the port
s.bind(("::", occupied_port))
# Pre-occuping the port using local address
s.bind(("::1", occupied_port))
except OSError:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(("127.0.0.1", occupied_port))
Expand Down Expand Up @@ -63,7 +63,6 @@ def test_listen_used_address():


if __name__ == "__main__":
# import sys
import sys

# sys.exit(pytest.main(["-sv", __file__]))
test_listen_used_address()
sys.exit(pytest.main(["-sv", __file__]))
Loading