Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 726
gameon67 Avatar asked Jan 28 '19 03:01

gameon67


2 Answers

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

like image 196
Shalini Maiti Avatar answered Nov 25 '22 15:11

Shalini Maiti


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
like image 30
tomkot Avatar answered Nov 25 '22 14:11

tomkot