I'm trying to access Tensorboard on AWS. Here is my setting :
- Tensorboard :
tensorboard --host 0.0.0.0 --logdir=train
:
Starting TensorBoard b'39' on port 6006 (You can navigate to
http://172.31.18.170:6006)
- AWS Security groups (in):
- HTTPS TCP 443 0.0.0.0/0
- Custom_TCP TCP 6006 0.0.0.0/0
However connecting to ec2-blabla.us-west-1.compute.amazonaws.com:6006
I can't see anything, I basically can't connect.
Do you have any idea?
You can use ssh tunneling technique.
In your terminal you can write:
ssh -i /path/to/your/AWS/key/file -NL 6006:localhost:6006 user@host
where user and host are your aws ec2 user and instance specific.
After that you can browse to http://localhost:6006/
Fast (but unsecure) solution:
Run:
tensorboard --logdir=/training --host=0.0.0.0 --port=8080
on your AWS instance.
Make sure that both your inbound and outbound rules on AWS console (control center) are as unrestricted as possible (allow all types, all ports etc.). However, keep in mind that this solution is not recommendable for environments requiring security (in our case, we didn't consider security for training an NN).
An attempt to explain why this works: when the policy is set as described, AWS still seems to prohibit inbound/outbound connections on the standard tensorboard port 6006. This does not seem to apply to the port 8080.
Long (but more secure) solution:
See: https://blog.altoros.com/getting-started-with-a-cpu-enabled-tensorflow-instance-on-aws.html
(provides explanations for setting ports correctly on AWS)
I managed to set it up like this:
- Go to security groups in your ec2 console:
Simply run the tensorboard without the host parameter (which poses restrictions)
tensorboard --logdir XXX --port 6006
I suffered from the same problem for several days.
Fortunately I solved this issue by adding rule on "AWS Outbound rule" as if I had added "AWS Inbound rule".
Regardless of this setting, it works at home.
The same error is still happening only in the company.