SpaceX
SpaceX

Reputation: 2890

Unable to open Tensorboard in browser

I am following google cloud machine learning tutorial and I am unable to Launch TensorBoard

I've followed the steps in the above tutorial (also set up my environment using docker container) until typing the below command in the terminal

tensorboard --logdir=data/ --port=8080

Where the terminal outputs the below prompt

Starting TensorBoard 29 on port 8080
(You can navigate to http://172.17.0.2:8080)

When I visit http://172.17.0.2:8080 in my browser I see nothing (the server where this page is located is not responding).

Can someone please advice how I can launch Tensor Board ?

Upvotes: 31

Views: 96572

Answers (11)

bipo12
bipo12

Reputation: 1

In my case, using !pip install tensorrt, helped me.

Upvotes: 0

Mendi Barel
Mendi Barel

Reputation: 3677

Try

tensorboard --logdir=d:/data --host 0.0.0.0

This will open socket listening to all network interfaces, so you can connect from local host (same pc) or from the local network(from pc/mobile in network).

Upvotes: 14

Ankit Jaiswal
Ankit Jaiswal

Reputation: 13

In my case, the port was not open. Opening the port, helped me. This process was done on Linux.

Here is what I did:

First I checked if the port is open or not.

netstat -tulpn

You can check it by above code.

Then open the port by following code. Just change the port number in place of 8080

sudo /sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT

sudo iptables-save

This should solve the issue.

Upvotes: 0

VladVin
VladVin

Reputation: 643

I faced the same problem when used Tensorboard inside a Docker container. The successful steps in my case were:

  1. First of all, make sure the port you use for Tensorboard is opened to the outside world. To make this possible run your Docker container with an option -p <host_machine_port>:<tensorboard_port_inside_container>. For example:

docker run --name my_tensorboard_container -p 7777:8080 my_tensorboard_image bash

  1. Then if you still cannot access the Tensorboard try to add --bind_all option like so:

tensorboard --bind_all --port 8080 --logdir ./logs

Hope, it works in your case as well.

Upvotes: 9

HimalayanCoder
HimalayanCoder

Reputation: 9850

you have to change port to the tensorboard port in the right toolbar in Gloud shell

enter image description here

Upvotes: 1

VinjaNinja
VinjaNinja

Reputation: 59

There are 2 solutions(as far as i could check) to solve this problem:

  1. Instead of using the http://name:port_number, use http://localhost:port_number. This is if you are using Chrome browser.

  2. If you are using firefox(recommended as it's really convenient), then you can open the link(which has your PC name) directly, which is displayed after executing the "tensorboard --logdir=logs/" command in cmd, i.e; http://name:port_number will work here.

(name here refers to the PC or user name)

Upvotes: 2

Gajanan Wadekar
Gajanan Wadekar

Reputation: 36

as stated by 'rodrigo-silveira'

tensorboard --logdir=data/ --host localhost --port 8088

this works for me as well. just change the name of graph directory. here the directory is data/

writer = tf.summary.FileWriter( 'logs', sess.graph )

here, the directory is logs, so when I typed below command in cmd, below window appeared.

tensorboard --logdir=data/ --host localhost --port 8088

this is the window pop up

Upvotes: 1

rodrigo-silveira
rodrigo-silveira

Reputation: 13078

Had the same problem this morning. Solved it with

tensorboard --logdir=data/ --host localhost --port 8088

Navigated the browser to http://localhost:8088

Upvotes: 98

Gabriele
Gabriele

Reputation: 949

I don't know if that's the case, but tensorboard has some visualization problems in several browsers. Try to connect to http://172.17.0.2:8080 with a different browser (for example, on my macbook, safari doesn't work very well with tensorboard and I use google Chrome).

Upvotes: 1

Osoter
Osoter

Reputation: 571

If you are using Google Cloud Shell you have to click on icon placed in upper left of shell window.

Upvotes: 2

Thomas Moreau
Thomas Moreau

Reputation: 4467

It looks like the port 8080 is not open on your machine.
You can check it with this command line tool: netstat -a.

To open a specific port on google cloud platform, see this answer from SO.

Upvotes: 3

Related Questions