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?
Run tensorboard in your ec2 terminal (you can custom logdir and port)
Find your workstations public ip (a.b.c.d) address by visiting
http://ip4.me/
Access the security group configuration assigned to your EC2 and add a custom TCP rule to your inbound traffic.
Outbound should be set to allow traffic from tensorboard port. (In this case 8080). Or you just allow all outgoing traffic from your EC2 instance
Use your public DNS to access tensorboard from your workstation
http://ec2-xx-xxx-xx-xx.compute-1.amazonaws.com:8080/
You can use ssh tunneling technique.
In your terminal you can write:
where user and host are your aws ec2 user and instance specific.
After that you can browse to http://localhost:6006/
I managed to set it up like this:
Choose the relevant security group in the table, click edit.
Add a rule like this:
Start tensorboard:
tensorboard --logdir tf_summary/ --port 8080
Find out the URL of your instance and visit
http://yourURL:8080
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.
Fast (but unsecure) solution:
Run:
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)
Simply run the tensorboard without the host parameter (which poses restrictions)