TensorBoard could not bind to port 6006, it was already in use

11,141

Solution 1

Sometimes, the port continues to be occupied in spite of ending the instance.

In that case,

you can first check if your port is still occupied by:

lsof -i:6006

and then, using the PID listed above to kill the tcp instance:

kill -9 PID

Solution 2

I don't know why your 6006 port is in use, but you can just try to use another port:

tensorboard --logdir=/tmp/retrain_logs  --port=8008
Share:
11,141
gameon67
Author by

gameon67

Best place to spend free time (?)

Updated on June 20, 2022

Comments

  • gameon67
    gameon67 almost 2 years

    I already closed the Tensorboard before, but after I open new terminal and re-run the command tensorboard --logdir /tmp/retrain_logs, it produces following error:

    E0128 12:24:08.469702 MainThread program.py:201] TensorBoard could not bind to port 6006, it was already in use

    E0128 12:24:08.469702 140707008960320 program.py:201] TensorBoard could not bind to port 6006, it was already in use

    ERROR: TensorBoard could not bind to port 6006, it was already in use

    Anybody knows the how could this happen? I can easily restart the PC, but now I'm in the middle of training my dataset (unfortunately I haven't set checkpoint) so I don't want to terminate it.