无法从Google Cloud VM实例连接到TensorBoard页面

时间:2019-01-16 23:36:21

标签: tensorflow google-cloud-platform tensorboard

我试图从运行中打开TensorBoard页面

tensorboard --logdir=./Train_log/tb_train_log --port=8080在Google Cloud Compute Engine VM实例上。并且输出网页http:<usename>:8080不可用。打开页面时的错误是:

Error: Could not connect to Cloud Shell on port 8080.
Ensure your server is listening on port 8080 and try again.

所以我抬头看着Unable to open Tensorboard in browserCan't open port 8080 on Google Compute Engine running Debian

然后我

1) set up the fire wall with creating a new rule as tcp:8080 and IP ranges 0.0.0.0/0.  
2) changed the port to 8080 and the default output 6006, changed the host to 0.0.0.0 and 127.0.0.1. Copy and paste corresponding address like http:0.0.0.0:8080 to google chrome. 
3) use web preview through google cloud shell to the port I set as above. 

netstat -an | grep "LISTEN "的输出也是

tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN     
tcp6       0      0 ::1:631                 :::*                    LISTEN 

这些都不起作用,我想知道如何解决该问题?

任何想法都会有所帮助!

1 个答案:

答案 0 :(得分:0)

我认为GCP中的防火墙配置阻止了端口8080,首先打开GCP中的端口8080,然后执行以下命令:

tensorboard --logdir=./dir/log --port=8080 --bind_all