Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple core using 127.* address can't run #315

Closed
ghost opened this issue Nov 8, 2013 · 8 comments
Closed

Multiple core using 127.* address can't run #315

ghost opened this issue Nov 8, 2013 · 8 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Nov 8, 2013

Ros should not handle 127.0.0.0/255.0.0.0 as a unique ip: 127.0.0.1. It makes sence on specific environment to bind on 127.1.2.3 and not on 127.0.0.1 like in openshift gears.

It looks like this might be because adress starting with 127. are converted to 127.0.0.1

@simonlopez
Copy link

+1
One bad hack is located here:

if address and (address == 'localhost' or address.startswith('127.') or address == '::1' ):

@ghost ghost assigned dirk-thomas Nov 8, 2013
@dirk-thomas
Copy link
Member

I only found the problematic usage @simonlopez pointed to. That one is addressed in #316.

@Steffel Can you please try that branch and provide feedback if that works for your use case?

@ghost
Copy link
Author

ghost commented Nov 12, 2013

I've tried using #316 but but it still using ip 0.0.0.0

roscore -p 8091
netstat -antu | grep -i 8091
tcp        0      0 0.0.0.0:8091            0.0.0.0:*               LISTEN 

@dirk-thomas
Copy link
Member

Can you please provide some more information in order to be able to reproduce your steps?

@ghost
Copy link
Author

ghost commented Nov 12, 2013

I'm using multiple roscore on Ubuntu 12.04 but i want each roscore to bind different adress using 127 adress (but same port). I'm using hydro version of ros installed using apt-get

@dirk-thomas
Copy link
Member

Please provide the exact command sequence you use. Are you setting a different ROS_MASTER_URL / ROS_IP / ROS_HOSTNAME / __ip / __hostname? Have you checked out the 127_addresses branch of ros_comm, build it and used the environment of that?

@ghost
Copy link
Author

ghost commented Nov 12, 2013

export ROS_MASTER_URL = 127.2.4.23:10041
roscore -p 10041

I've not tried to use ROS_IP and ROS_HOSTNAME I will try and give my feedback.

@dirk-thomas
Copy link
Member

roscore will not use the ROS_MASTER_URL to determine which ip and port to bind to. It will use the ROS_IP / ROS_HOSTNAME if set in the environment and the port number specified via the command line argument -p.

After setting ROS_IP=127.1.2.3 and using ros_comm (which requires a checkout of roscpp_core for Hydro) from the specific branch it worked for me: roscore bound to 127.1.2.3.

@dirk-thomas dirk-thomas reopened this Nov 13, 2013
dirk-thomas added a commit that referenced this issue Nov 18, 2013
allow different 127. addresses than 127.0.0.1 (fix #315)
rsinnet pushed a commit to MisoRobotics/ros_comm that referenced this issue Jun 19, 2017
allow different 127. addresses than 127.0.0.1 (fix ros#315)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants