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

[Core] Ray component worker_ports is trying to use a port number 17507 that is used by other components. #25793

Closed
chaomengyuan opened this issue Jun 15, 2022 · 0 comments
Labels
bug Something that is supposed to be working; but isn't core Issues that should be addressed in Ray Core P1 Issue that should be fixed within a few weeks
Milestone

Comments

@chaomengyuan
Copy link

chaomengyuan commented Jun 15, 2022

What happened + What you expected to happen

Traceback (most recent call last):
  File "/usr/local/bin/ray", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/ray/scripts/scripts.py", line 2339, in main
    return cli()
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/ray/autoscaler/_private/cli_logger.py", line 852, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/ray/scripts/scripts.py", line 873, in start
    ray_params, head=False, shutdown_at_exit=block, spawn_reaper=block
  File "/usr/local/lib/python3.7/site-packages/ray/node.py", line 266, in __init__
    self._ray_params.update_pre_selected_port()
  File "/usr/local/lib/python3.7/site-packages/ray/_private/parameter.py", line 323, in update_pre_selected_port
    f"Ray component {comp} is trying to use "
ValueError: Ray component worker_ports is trying to use a port number 17507 that is used by other components.
Port information: {'gcs': 'random', 'object_manager': 'random', 'node_manager': 'random', 'gcs_server': 'random', 'client_server': 10001, 'dashboard': 8265, 'dashboard_agent_grpc': 57208, 'dashboard_agent_http': 'random', 'metrics_export': 17507, 'redis_shards': 'random', 'worker_ports': '9998 ports from 10002 to 19999'}
If you allocate ports, please make sure the same port is not used by multiple components.

From error information,'metrics_export' uses port 17507, this is because if user does not set a port for metrics_export,it will be selected by: new_port = random.randint(port, 65535),L1, L2。If this random number happens to be in range: worker_ports[10002, 19999], in later code L3, L4, where it checks if there is a port being used repeatedly, an error will be thrown up。

Versions / Dependencies

nightly version

Reproduction script

No.

Issue Severity

Medium: It is a significant difficulty but I can work around it.

@chaomengyuan chaomengyuan added bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Jun 15, 2022
@scv119 scv119 added core Issues that should be addressed in Ray Core P1 Issue that should be fixed within a few weeks and removed triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Jun 23, 2022
@scv119 scv119 added this to the Core Backlog milestone Jun 23, 2022
@rkooo567 rkooo567 self-assigned this Jul 8, 2022
@ericl ericl removed the Ray 2.0 label Jul 28, 2022
@rkooo567 rkooo567 removed their assignment Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't core Issues that should be addressed in Ray Core P1 Issue that should be fixed within a few weeks
Projects
None yet
Development

No branches or pull requests

5 participants