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

Remotely hosted rerun web-viewer still tries to connect to incorrect (local) websocket #1542

Closed
jleibs opened this issue Mar 9, 2023 · 0 comments · Fixed by #1664
Closed
Labels
🪳 bug Something isn't working good first issue Good for newcomers 🕸️ web regarding running the viewer in a browser

Comments

@jleibs
Copy link
Member

jleibs commented Mar 9, 2023

Describe the bug

I have two computers on my home network:
server: 192.168.86.32
laptop: 192.168.68.100

I want to run the web-viewer on the server:

jleibs@server:~$ rerun --web-viewer data.rrd

But then connect to it from my laptop.

jleibs@laptop:~$ firefox 192.168.86.32:9090

Unfortunately when I do this, the browser just shows:

Waiting for data from ws://127.0.0.1:9877

Clearly this won't work since the websocket connection actually needs to be made to: ws://192.168.86.32:9877

Expected behavior

The web-viewer should connect to the correct websocket and receive the data.

Known work-arounds

The websocket address can be overridden via a url-parameter.

If I instead run:

firefox 192.168.86.32:9090?url=ws://192.168.68.32:9877

Then the client connects to the correct websocket and everything works.

The user needing to craft a complex url like this, however, is sub-optimal.

Proposed solution:

  1. The default behavior of the client should be to use the same hostname used to connect to the webserver for the websocket, such as retrieved from window.location.hostname.
  2. Additionally, the server should have a way of specifying which address(and port) to advertise as its hostname. This would be provided to any client connecting to the webserver, and will not always match the local hostname or ports. For example if connecting to the server through a NAT with port-mapping, or eventually splitting the web-host and websocket onto different machines.
@jleibs jleibs added 🪳 bug Something isn't working 👀 needs triage This issue needs to be triaged by the Rerun team 🕸️ web regarding running the viewer in a browser and removed 👀 needs triage This issue needs to be triaged by the Rerun team labels Mar 9, 2023
@emilk emilk added the good first issue Good for newcomers label Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working good first issue Good for newcomers 🕸️ web regarding running the viewer in a browser
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants