You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Ports are chosen at random when they are already occupied.
To Reproduce
Script
#!/usr/bin/env python3
import rerun as rr
import time
def main() -> None:
rr.init("rerun_example_serve")
rr.serve(web_port=57158, ws_port=57159)
try:
while True:
time.sleep(1)
except KeyboardInterrupt:
print("Ctrl-C received. Exiting.")
if __name__ == "__main__":
main()
Run the program twice from two separate terminals
Run1
➜ python spawn_ports.py
[2024-05-03T22:30:55Z INFO re_ws_comms::server] Hosting a WebSocket server on ws://localhost:57159. You can connect to this with a native viewer (`rerun ws://localhost:57159`) or the web viewer (with `?url=ws://localhost:57159`).
[2024-05-03T22:30:55Z INFO re_web_viewer_server] Started web server on http://localhost:57158
[2024-05-03T22:30:55Z INFO re_sdk::web_viewer] Hosting a web-viewer at http://localhost:57158?url=ws://localhost:57159
^CCtrl-C received. Exiting.
[2024-05-03T22:31:03Z INFO re_ws_comms::server] Shutting down Rerun server on ws://localhost:57159
[2024-05-03T22:31:03Z INFO re_web_viewer_server] Shutting down web server on http://localhost:57158
Run 2
➜ python spawn_ports.py
[2024-05-03T22:31:00Z INFO re_ws_comms::server] Hosting a WebSocket server on ws://localhost:42271. You can connect to this with a native viewer (`rerun ws://localhost:42271`) or the web viewer (with `?url=ws://localhost:42271`).
[2024-05-03T22:31:00Z INFO re_web_viewer_server] Started web server on http://localhost:33623
[2024-05-03T22:31:00Z INFO re_sdk::web_viewer] Hosting a web-viewer at http://localhost:33623?url=ws://localhost:42271
^CCtrl-C received. Exiting.
[2024-05-03T22:31:03Z INFO re_ws_comms::server] Shutting down Rerun server on ws://localhost:42271
[2024-05-03T22:31:03Z INFO re_web_viewer_server] Shutting down web server on http://localhost:33623
Expected behavior
The second run should fail with a warning about the ports being occupied.
Desktop (please complete the following information):
OS: Linux
Rerun version
0.15.1
The text was updated successfully, but these errors were encountered:
Describe the bug
Ports are chosen at random when they are already occupied.
To Reproduce
Script
Run the program twice from two separate terminals
Run1
Run 2
Expected behavior
The second run should fail with a warning about the ports being occupied.
Desktop (please complete the following information):
Rerun version
0.15.1
The text was updated successfully, but these errors were encountered: