[Solved] Roscore registerService error

Hi,

When i issue command roscore, the output shows:

husarion@husarion:~$ roscore
... logging to /home/husarion/.ros/log/6beca3fa-0e6a-11e9-9233-409f384ecc95/roslaunch-husarion-7625.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://husarion:35141/
ros_comm version 1.12.13


SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.13

NODES

auto-starting new master
process[master]: started with pid [7657]
ROS_MASTER_URI=http://husarion:11311/

setting /run_id to 6beca3fa-0e6a-11e9-9233-409f384ecc95
process[rosout-1]: started with pid [7688]
started core service [/rosout]
[ERROR] [1546418586.169342302]: [registerService] Failed to contact master at [husarion:11311].  Retrying...

Please help!

Hi attjahg1,

Above error usually shows when You are trying to start a node or roscore while system is configured to search for currently running roscore on different machine.

Could You provide output of commands:
cat /etc/hosts
ifconfig

Regards,
Łukasz

Hi,

The output of commands are:

husarion@husarion:~$ cat /etc/hosts
127.0.0.1	localhost
::1		localhost ip6-localhost ip6-loopback
ff02::1		ip6-allnodes
ff02::2		ip6-allrouters

127.0.0.1 husarion
husarion@husarion:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr be:d3:63:99:49:97  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:600 (600.0 B)
          Interrupt:43 

hnet0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet6 addr: fc94:7c17:8e0a:7921:34c6:941f:6f88:d4b4/16 Scope:Global
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1340  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:0 (0.0 B)  TX bytes:1056 (1.0 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:6537 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6537 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:565896 (565.8 KB)  TX bytes:565896 (565.8 KB)

wlan0     Link encap:Ethernet  HWaddr 40:9f:38:4e:cc:95  
          inet addr:192.168.43.176  Bcast:192.168.43.255  Mask:255.255.255.0
          inet6 addr: fe80::2159:12f8:44f2:2bdc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:77 errors:0 dropped:0 overruns:0 frame:0
          TX packets:89 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:20214 (20.2 KB)  TX bytes:14693 (14.6 KB)

I will need some more info:

  1. Which device are you using?
  2. Did you flash it with most up to date image?
  3. Did you encounter this problem while following tutorials or your own project?
  4. Did you made any changes to default image? If so, what did you change?

Regards,
Łukasz

  1. I am using CORE2-ROS with Asus Tinkerboard
  2. I flashed the CORE2-ROS image from the husarion downloads page.
  3. I encountered this problem while following tutorials.
  4. I did not make changes to default image.

Could you try to download and flash image again?

Regards,
Łukasz

I have downloaded and flashed the image again. This is the output:

husarion@husarion:~$ roscore
... logging to /home/husarion/.ros/log/47cde892-123b-11e9-a238-409f384ecc95/roslaunch-husarion-22825.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://husarion:36394/
ros_comm version 1.12.13


SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.13

NODES

WARNING: ROS_MASTER_URI [http://master:11311] host is not set to this machine
auto-starting new master
process[master]: started with pid [22907]
ROS_MASTER_URI=http://husarion:11311/

setting /run_id to 47cde892-123b-11e9-a238-409f384ecc95
process[rosout-1]: started with pid [22938]
started core service [/rosout]
[ERROR] [1546838144.275276304]: [registerService] Failed to contact master at [husarion:11311].  Retrying...

Hi attjahg1,

We’ve checked your logs and it seems that you are still using the old CORE2-ROS image.

In your log there is:

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.13

In the newest image it should be:

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

Please make sure to use our latest image available under this link.

Otherwise you could update your current image by executing:

sudo apt update
sudo apt upgrade

Then open the /etc/hosts file with:

sudo nano /etc/hosts

and at the end of file add:

127.0.0.1 husarion
::1 master # managed by Husarnet
::1 husarion # managed by Husarnet

Regards,
Łukasz

The error is gone. Thanks a lot!