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

Dashboard not accessible on 'localhost' in devcontainer (127.0.0.1 ok) #166

Open
paulyuk opened this issue Sep 18, 2021 · 1 comment
Open

Comments

@paulyuk
Copy link

paulyuk commented Sep 18, 2021

Expected Behavior

Dashboard loads in browser on host machine, thanks to port forward from VS Code into the container.

Actual Behavior

Browser spins indefinitely trying to reach address.

Steps to Reproduce the Problem

Load the official dapr/quickstart repo (now based on Dapr 1.4) in a DevContainer: using VS Code + Remote Container extension, and open dev container when prompted.

Start the dashboard. View in browser, e.g. http://localhost:8080.

codespace$ dapr dashboard
http://localhost:8080/ <-- fails, spins
http://127.0.0.1:8080/ <- works


codespace$ dapr dashboard -p 9999
http://localhost:9999/ <-- fails, spins
http://127.0.0.1:9999/ <- works

It repros on PC and macOS. sometimes i take an additional step in vscode to add a user defined port forward, after removing the auto.

Release Note

RELEASE NOTE:

@CodeMonkeyLeet
Copy link

Additional observations:

  • Other webhosts work in the devcontainer to the same ports (e.g. ng serve to 8080)
  • Running dapr dashboard -k works, vscode opens a port to 127.0.0.1.
  • Dashboard's webserver.go uses http.Server to listen on 0.0.0.0, so it should accept all interfaces, not just localhost. However, changing it to use 127.0.0.1 explicitly makes it work in a devcontainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants