user2989813
user2989813

Reputation: 283

Tensorboard Site cannot be found

I just followed this Tensorflow tutorial, doing the final retraining step on a classification problem: https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/#3

I used a very large dataset so I let the training run overnight. Now it's completed, and I didn't see how it performed as I wasn't at the computer.

I need to visualize the results, so I tried:

:/tf_files# tensorboard --logdir training_summaries --debug
Starting TensorBoard 47 at http://0.0.0.0:6006
(Press CTRL+C to quit)

There are no additional messages in terminal.

But when I visit http://0.0.0.0:6006 it does not load, and says Site cannot be reached. This site can’t be reached

0.0.0.0 refused to connect. Search Google for 6006 ERR_CONNECTION_REFUSED

What is wrong?

Upvotes: 2

Views: 3991

Answers (3)

ITJscott
ITJscott

Reputation: 552

Use the following command to run your Docker container: docker run -it -p 8888:8888 -p 6006:6006 gcr.io/tensorflow/tensorflow

Adding the extra param -p 6006:6006 meant I could access TensorBoard at http://localhost:6006/ after running docker exec CONTAINER_ID tensorboard --logdir tf_files/training_summaries & as specified in the code lab, where CONTAINER_ID is found by running docker ps.

Source: "Installing with Docker" section at https://www.tensorflow.org/install/install_mac

Upvotes: 2

Meng Lu
Meng Lu

Reputation: 14626

Here is one way that seems to have fixed the issue for me:

Start the Docker virtual machine

Create a virtual machine if not already

bash$ docker-machine create default

Start the virtual machine default:

bash$ docker-machine start
Starting "default"...
(default) Check network to re-create if needed...
(default) Waiting for an IP...
Machine "default" was started.
Waiting for SSH to be available...
Detecting the provisioner...
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
>>> elapsed time 35s
bash$ docker-machine env
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="/Users/meng/.docker/machine/machines/default"
export DOCKER_MACHINE_NAME="default"
# Run this command to configure your shell:
# eval $(docker-machine env)
bash$ eval "$(docker-machine env default)"

Start 'tensorflow/tensorflow' Docker image with --net=host option

$ export MY_WORKSPACE_DIR='/Users/meng/workspace'
$ docker run -it \
--net=host \
--publish 6006:6006 \
--volume ${MY_WORKSPACE_DIR}/tensorflow_test:/tensorflow_test \
--workdir /tensorflow_test \
tensorflow/tensorflow:1.1.0 bash
root@30d79c2e5fc3:/tensorflow_test# pwd
/tensorflow_test

Start TensorBoard

root@30d79c2e5fc3:/tensorflow_test# tensorboard --logdir training_summaries &
[1] 12
root@30d79c2e5fc3:/tensorflow_test# Starting TensorBoard 47 at http://0.0.0.0:6006
(Press CTRL+C to quit)

root@30d79c2e5fc3:/tensorflow_test#

Open TensorBoard at the Docker machine's IP

http://192.168.99.100:6006

in a Web browser, where the IP is the same as DOCKER_HOST in the output of docker-machine env.

Upvotes: 0

Pawan Sharma
Pawan Sharma

Reputation: 21

You can cd to the python code folder in anaconda. for example 'C:\Users\sharmap3\Desktop\pawan\demo\test' and then use tensorboard --logdir="./graphs" Now open http://localhost:6006/ in web browser. Now you can visualize the result in tensorboard. It is working for me.

Upvotes: 2

Related Questions