The Dashboard and Grafana of the cluster started with tiup playground in the virtual machine cannot be accessed

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 在虚拟机中庸tiup playground启动的集群Dashboard和grafana不能被访问

| username: vincentLi

[Test Environment for TiDB] Testing
[TiDB Version] any
[Reproduction Path]
[Encountered Issue: Symptoms and Impact]
Dashboard and Grafana cannot be accessed.
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]
Using a virtual machine:
tiup playground v6.5.6 --db 3 --pd 3 --kv 3
Successfully started the test cluster:
Connect TiDB: mysql --comments --host 127.0.0.1 --port 4000 -u root
Connect TiDB: mysql --comments --host 127.0.0.1 --port 4002 -u root
Connect TiDB: mysql --comments --host 127.0.0.1 --port 4001 -u root
TiDB Dashboard: http://127.0.0.1:2379/dashboard
Grafana: http://127.0.0.1:3000
However, accessing the dashboard and Grafana from the host machine fails (replacing 127.0.0.1).
Pinging the virtual machine address works.

| username: WalterWj | Original post link

Try configuring with --host.

| username: vincentLi | Original post link

Tried it, didn’t work.

| username: 小于同学 | Original post link

Try configuring with --host.

| username: zhaokede | Original post link

First, access it within the virtual machine; for external access, you need to check the virtual machine’s network configuration.

| username: zhaokede | Original post link

Assign a DMZ port to a virtual machine

| username: xiaoqiao | Original post link

Is the telnet port open?

| username: TiDBer_21wZg5fm | Original post link

Can you ping and then test if the port is open?

| username: zhang_2023 | Original post link

Is the IP port accessible from the outside?

| username: DBAER | Original post link

You can first use curl to check if the webpage is accessible.

| username: mono | Original post link

Check to see if it is only listening on 127.0.0.1?

| username: stephanie | Original post link

Is the port open? You can try using telnet to check the port.

| username: QH琉璃 | Original post link

Is the port open?

| username: stephanie | Original post link

Or consider issues related to the firewall.

| username: zhaokede | Original post link

Deployed on a virtual machine, first check if the host machine is accessible, then check the firewall and similar settings.

| username: dba远航 | Original post link

I have also encountered this problem, it seems that the related process did not start.

| username: TiDBer_JUi6UvZm | Original post link

Check if the firewall is turned off.

| username: TiDBer_JUi6UvZm | Original post link

Additionally, try not using the loopback address.

| username: TiDBer_JUi6UvZm | Original post link

You can specify the IP address with tiup playground.

| username: tidb菜鸟一只 | Original post link

To allow other machines to access the playground, you need to configure it to 0.0.0.0; otherwise, it can only be accessed on the installed server.