question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ensure dashboard starts on the desired port

See original GitHub issue

What is the problem?

We need a guarantee that the ray dashboard will get started on port 8265 when ray stop and ray start are called programmatically in quick succession.

Ray version and other system information (Python version, TensorFlow version, OS):

In Ray 1.2.0 (Python 3.7) using ray stop --force, fixes the problem the majority of the time but we’re still seeing it get started on the undesired port about 1/2000 tries.

Reproduction (REQUIRED)

Please provide a short code snippet (less than 50 lines if possible) that can be copy-pasted to reproduce the issue. The snippet should have no external library dependencies (i.e., use fake or mock data / environments):

Courtesy of @ijrsvt

import subprocess
iteration = 0
while True:
    output = subprocess.run("ray stop --force; ray start --head > /dev/null", shell=True, capture_output=True)
    assert "8265" in output.stderr.decode()
    print("Started on 8265", " -- Iteration -- ", iteration, ")
    iteration += 1

If the code snippet cannot be run by itself, the issue will be closed with “needs-repro-script”.

  • I have verified my script runs in a clean environment and reproduces the issue.
  • I have verified the issue also occurs with the latest wheels.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
ijrsvtcommented, Feb 23, 2021

@edoakes Sounds good, the one edge case that I personally find weird is that if I specify --dashboard-port=8265, the current behavior is to still increment (this is only because it looks like the code doesn’t differentiate from a user-provided value of 8265 and the default value of 8265).

0reactions
fyrestonecommented, Feb 24, 2021

Maybe we can set the default value of dashboard port to None (or 0).

  • If the dashboard port is None,
    • then auto select a port from [8265, 8265 + 10], failed if no available port found.
  • else,
    • use the dashboard port to start dashboard, failed if the port is occupied.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring Dashboard to connect to listeners through a firewall
The FileNet System Manager Dashboard documentation recommends that port 32775 should be opened on a firewall to allow the Dashboard to ...
Read more >
Tableau Services Manager Ports
The processes and services that make up the components of Tableau Services Manager (TSM) and Tableau Server on Windows use various ports to...
Read more >
4. Installation - Windows - CIS-CAT Pro Dashboard Document ...
Server does NOT currently host CIS-CAT Pro Dashboard v2.x ... Port 3306 is available for Maria database installation; Traffic allowed on port 8080...
Read more >
Changing Grafana port - influxdb - Stack Overflow
Change port from 3000 to 3001 in "C:\Program Files\GrafanaLabs\grafana\conf\defaults.ini"; Restart Grafana service from windows services. Share.
Read more >
Troubleshoot App Dashboard | Applications
Citrix ADC instance earlier than 47.x builds · Run the following command to ensure if the collector is UP and running at Port...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found