Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

LXC Hosted on AWS - Cannot connect to ROS Master

Hi All,

New to ROS, and trying to get the ROS node on my laptop to speak to an LXC living on an AWS ec2 instance. I set up iptable rules on the ec2 instance to forward anything coming in on port 25002 to the same port on the lxc. However, I cannot get the talker node connected to the listener (which is run on the LXC).

As an experiment I set up a pipe, called back on the ec2 instance, and am having it pipe everything coming through on por 25002 to the same port on the lxc:

cat back | nc -l 25002 | nc 25003 > back

where is the local IP of the lxc, and on that instance I run:

nc -l 25003

Netcat then echoes back to the terminal:

Accept-Encoding: gzip
User-Agent: (by
Content-Type: text/xml
Content-Length: 389

<?xml version='1.0'?>

However, if I try to run the launchfile with on port 52002 and switch up the above command to:

cat back | nc -l 25002 | nc 25002 > back

Then when I try to run talker I get

[ERROR] [WallTime: 1420565703.326813] Unable to immediately register with master node []: master may not be running yet. Will keep trying.

While running roswtf on the listener side yields:

ERROR Could not contact the following nodes:

 * /talker_30365_1420565451591
 * /talker_30378_1420565461600
 * /talker_30390_1420565508134
 * /talker_30435_1420565680145
 * /talker_30530_1420566770564
 * /talker_30313_1420564757936

ERROR The following nodes should be connected but aren't:
 * /talker_30365_1420565451591->/rosout (/rosout)
 * /talker_30378_1420565461600->/rosout (/rosout)

I thought the talker should open a port back on the local machine on the same port? How can I go about allowing my local machine to accept connections back from the master? Thanks.