osrf / srcsim

Space Robotics Challenge
Other
9 stars 3 forks source link

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

Closed osrf-migration closed 7 years ago

osrf-migration commented 7 years ago

Original report (archived issue) by Rud Merriam (Bitbucket: rmerriam).


How? @dan77062 asked how but was redirected to the tutorial which isn't helpful. I'd also like to know how to do this.

This is frustrating. We didn't know what limitations there were on accessing the CloudSim for the control computer. In only a relatively short period of time we have to figure out a protocol to use.

The problem with telnetd is going to be getting the configuration set to make it available. Been trying to get it running on my desktop without success.

osrf-migration commented 7 years ago

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


Starting telnetd is only an example, not necessarily one that you should use in the final competition. The communication between the OCU and FC is a decision that each team has to make.

Can you also post more information about your problem, such as your dockerfile, commands you have run, errors you have seen, etc?

osrf-migration commented 7 years ago

Original comment by Rud Merriam (Bitbucket: rmerriam).


Did some testing with "CloudSim exec" as a terminal and do want to get telnet working. My 'console' is an application that will give me data if I can run a terminal. SSH isn't available (or is it?). I will need to be able to execute it on the field computer and not run it automatically. Is that going to work?

My results using local docker with rebuilds, etc:

In Dockerfile:

added "xinetd telnetd " to the apt-get install. <<== they were added

added the line: RUN echo "telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd" >> /etc/inetd.conf <<== file created

added the line: RUN sudo /etc/init.d/xinetd restart << don't think it worked. Wrong time to run?

added the lines: EXPOSE 23 and ENV TERM xterm

If I run "telnet 172.17.0.2" the response is "telnet: Unable to connect to remote host: Connection refused"

If I "docker exe" to the shell and run "/etc/init.d/xinetd restart" it runs.

Now if I run "telnet 172.17.0.2" the response is "Trying...login:". So telnet is running. But cannot get it to accept a login. "root" it won't accept at all. Supposedly "ubuntu" / "ubuntu" should work but doesn't.

I added the "/etc/init.d/xinetd restart" to my startup script. Didn't work. Added "sudo" to the front. Telnet still wouldn't work until I entered the line manually.

Haven't tried this in CloudSim because now my code isn't being started by my script.

osrf-migration commented 7 years ago

Original comment by Rud Merriam (Bitbucket: rmerriam).


Got it working.

osrf-migration commented 7 years ago

Original comment by Rud Merriam (Bitbucket: rmerriam).