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 talker.py 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 10.0.3.20 25003 > back

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

nc -l 25003

Netcat then echoes back to the terminal:

POST /RPC2 HTTP/1.1
Host: xx.xxx.xx.xxx:25002
Accept-Encoding: gzip
User-Agent: xmlrpclib.py/1.0.1 (by www.pythonware.com)
Content-Type: text/xml
Content-Length: 389

<?xml version='1.0'?>
<methodCall>
<methodName>registerPublisher</methodName>
<params>
<param>
<value><string>/talker_30504_1420566191918</string></value>
</param>
<param>
<value><string>/chatter</string></value>
</param>
<param>
<value><string>std_msgs/String</string></value>
</param>
<param>
<value><string>http://xxx-MacBookPro:41567/</string></value>
</param>
</params>
</methodCall>

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

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

Then when I try to run talker I get

[ERROR] [WallTime: 1420565703.326813] Unable to immediately register with master node [http://xx.xxx.xx.xxx:25002]: 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.