osrf / srcsim

Space Robotics Challenge
Other
9 stars 4 forks source link

FC open network ports #159

Open osrf-migration opened 7 years ago

osrf-migration commented 7 years ago

Original report (archived issue) by Aric Stewart (Bitbucket: aricstewart).


What network port(s) should we use to communicate to our FC?

With the complicated firewall / traffic shaper I want to make sure we have the FC listening on the correct port so that we can communicate with it. The example docker image uses port 8000 but I want to make sure that is correct.

My first 2 attempts where total failures, already using up 4 hours of the 10 hour budget with no success in connecting. I want to be assured of what we need to do before another 2 hours are used up in an attempt.

osrf-migration commented 7 years ago

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


The OCU talks to the FC through the VPN, and the docker container on FC has access to the VPN network interface. So you should be able to use other ports that you want. How did you test your connection to the FC?

For reference, here're the steps you can take take to test communication between OCU and FC

  1. Download the VPN keys through UI, extract it, and launch VPN (sudo openvpn --config openvpn.conf)

  2. Verify tap0 network interface is created with IP 192.168.2.150, and also try pinging the FC (192.168.2.10)

  3. Launch the docker container on FC by clicking on the START button

  4. In the FC, and attach to running docker container (docker exec -it team_container bash), and start a process that listens to the port you want, e.g. nc -l 5000

  5. In the OCU, test connection to the FC, e.g nc 192.168.2.10 5000 and start typing anything in the console and hit enter to see the text appear on the FC.

osrf-migration commented 7 years ago

Original comment by dan (Bitbucket: dan77062).


@Ian Chen How do we enter a command into the FC to do step 4? It's easy if we have SSH, but direct SSH is only available in practice. We have VPN and when I tried to SSH via the VPN connection, so that I could get to a terminal on the FC, it was refused. I can SSH through the VPN if I give it the SSH key, but we will not have that available for the real runs.

How do we get a terminal that is running on the FC?

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


You can start a server of some kind to serve as a relay from the FC to the OCU, such as the simple http server in my example:

You could also start telnetd instead if you want a terminal.

osrf-migration commented 7 years ago

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


yes as @scpeters suggested, you can add a CMD in your Dockerfile to start a process on the FC container.

osrf-migration commented 7 years ago

Original comment by dan (Bitbucket: dan77062).


Yes, I have that server started, just as in your example, but it just allows listing files. How do you get code to run on the FC from the OCU? Can you give me an example of how to use the OCU to tell the FC to roslaunch a node?

And I do want a terminal, that would be ideal. But I but cannot figure out how to use telnet to get to the docker container. I installed telnetd in the container and used CMD telnetd instead of starting the SimpleHTTPServer, but that container does not stay open, it just exits.

Is there some reason that we are not allowed to ssh through the VPN? Seems like that would be a good solution. But right now you have to supply the SSH key to access SSH through the VPN connection.

osrf-migration commented 7 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


I believe the original question had been answered, and there is tutorial about using CloudSim and docker.

osrf-migration commented 7 years ago

Original comment by Rud Merriam (Bitbucket: rmerriam).


@dan77062 I'm also looking at getting Telnet working.

@nkoenig maybe the original has been answered but perhaps suggesting a new issue would be a better response. Obviously the tutorial is insufficient for many of us to get an OCU-FC setup. We didn't have much time to do so and didn't know the limitations, and still don't in some ways, on what can be done.

osrf-migration commented 7 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


How about we close this issue and keep the cloudsim help conversation on issue #158?