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

use machine ip instead of localhost #211

Open
leaf-potato opened this issue Aug 15, 2024 · 4 comments
Open

use machine ip instead of localhost #211

leaf-potato opened this issue Aug 15, 2024 · 4 comments

Comments

@leaf-potato
Copy link

After successfully starting the cluster using gtctl, it will print the access address of the dashboard:
image

The machine you are running on may not be your local machine, mabay a virtual machine or a remote development machine. You cannot directly click on the link in the terminal to access it. It may be more convenient to use the machine IP instead of localhost in the link.

@zyy17
Copy link
Collaborator

zyy17 commented Aug 16, 2024

@leaf-potato Sounds reasonable. Can you give it a PR to modify it?

I think we should handle the following cases:

  • If the user specifies the IP, the prompt can reuse the IP and display it;
  • How to choose the appropriate IP if the machine has multiple network devices?

@leaf-potato
Copy link
Author

leaf-potato commented Aug 16, 2024

  • If the user specifies the IP, the prompt can reuse the IP and display it;

You reminded me! If the user specifies the IP address via httpAddr, access will fail using any other address.

  • How to choose the appropriate IP if the machine has multiple network devices?

Use hostname to resolve the IP address, similar to the hostname -i command in Linux and choose first. There is similar logic in Apache/bRPC.

@leaf-potato
Copy link
Author

leaf-potato commented Aug 16, 2024

Can you give it a PR to modify it?

Sure, but I am not very familiar with the Go language, so it will take some time to modify it.

@leaf-potato
Copy link
Author

@zyy17 The code submitted: #212

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