0
$\begingroup$

Rosanswers logo

Hi all. roscore won't run, and I've tried starting from as clean a system as I can make it. It used to work, and the network config hasn't changed, and all the environment vars are good as they've always been. I can ping myself by ip, by localhost, and by hostname. I've apparently screwed something up somewhere, but fresh installs of all the various ros stuff don't seem to fix it. Any ideas on what to check? Thanks.

Steve.

$ roscore
... logging to /home/rancher/.ros/log/e5678e18-1338-11e2-9087-5404a6b86db0/roslaunch-flyatar-2199.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://flyatar:48980/
ros_comm version 1.8.10

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion

NODES

auto-starting new master
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[master]: started with pid [2249]
ERROR: could not contact master [http://flyatar:11311/]
[master] killing on exit
Traceback (most recent call last):
  File "/opt/ros/fuerte/bin/rosmaster", line 35, in <module>
    rosmaster.rosmaster_main()
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosmaster/main.py", line 73, in rosmaster_main
    configure_logging()   
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosmaster/main.py", line 57, in configure_logging
    _log_filename = rosgraph.roslogging.configure_logging('rosmaster', logging.DEBUG, filename=filename)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosgraph/roslogging.py", line 86, in configure_logging
    rosgraph_d = rospkg.RosPack().get_path('rosgraph')
  File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 147, in get_path
    self._update_location_cache()
  File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 130, in _update_location_cache
    list_by_path(self._manifest_name, path, cache)
  File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 56, in list_by_path
    for d, dirs, files in os.walk(path, topdown=True, followlinks=True):
  File "/usr/lib/python2.7/os.py", line 294, in walk
    for x in walk(new_path, topdown, onerror, followlinks):
  File "/usr/lib/python2.7/os.py", line 294, in walk
    for x in walk(new_path, topdown, onerror, followlinks):
  File "/usr/lib/python2.7/os.py", line 294, in walk
    for x in walk(new_path, topdown, onerror, followlinks):
  File "/usr/lib/python2.7/os.py", line 294, in walk
    for x in walk(new_path, topdown, onerror, followlinks):
  File "/usr/lib/python2.7/os.py", line 276, in walk
    names = listdir(top)
KeyboardInterrupt
$

rancher@flyatar:~$ cat /etc/hostname
flyatar
rancher@flyatar:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 54:04:a6:b8:6d:b0  
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:17 Memory:fb900000-fb920000 

eth1      Link encap:Ethernet  HWaddr 54:04:a6:b8:75:9c  
          inet addr:172.25.253.72  Bcast:172.25.253.255  Mask:255.255.255.0
          inet6 addr: fe80::5604:a6ff:feb8:759c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:443121 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5169 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:51361036 (51.3 MB)  TX bytes:1023229 (1.0 MB)
          Interrupt:18 Memory:fb800000-fb820000 

eth3      Link encap:Ethernet  HWaddr 90:e2:ba:0d:8a:e3  
          inet addr:192.168.3.1  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::92e2:baff:fe0d:8ae3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:8192  Metric:1
          RX packets:393 errors:0 dropped:0 overruns:0 frame:0
          TX packets:483 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:80130 (80.1 KB)  TX bytes:86593 (86.5 KB)
          Memory:fb400000-fb420000 

eth4      Link encap:Ethernet  HWaddr 90:e2:ba:0d:8a:e2  
          inet addr:192.168.4.1  Bcast:192.168.4.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:8192  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Memory:fb420000-fb440000 

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:16436  Metric:1
          RX packets:273 errors:0 dropped:0 overruns:0 frame:0
          TX packets:273 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:15579 (15.5 KB)  TX bytes:15579 (15.5 KB)

rancher@flyatar:~$ env | grep ROS
ROS_ROOT=/opt/ros/fuerte/share/ros
ROS_PACKAGE_PATH=/home/rancher:/opt/ros/fuerte/share:/opt/ros/fuerte/stacks
ROSLISP_PACKAGE_DIRECTORY=/opt/ros/fuerte/share/common-lisp/ros
ROS_MASTER_URI=http://localhost:11311
ROS_DISTRO=fuerte
ROS_ETC_DIR=/opt/ros/fuerte/etc/ros
ROS_IP=172.25.253.72
ROS_HOSTNAME=flyatar

And the relevant log file gives no clue. Here's the tail of it:

[roslaunch][INFO] 2012-10-11 09:55:53,639: master.is_running[http://flyatar:11311/]
[roslaunch][INFO] 2012-10-11 09:55:53,740: master.is_running[http://flyatar:11311/]
[roslaunch][INFO] 2012-10-11 09:55:53,740: master.is_running[http://flyatar:11311/]
[roslaunch][ERROR] 2012-10-11 09:55:53,741: ERROR: could not contact master [http://flyatar:11311/]
[roslaunch.pmon][INFO] 2012-10-11 09:55:53,741: ProcessMonitor.shutdown <ProcessMonitor(ProcessMonitor-1, started daemon -1227019456)>
[roslaunch.pmon][INFO] 2012-10-11 09:55:53,795: ProcessMonitor._post_run <ProcessMonitor(ProcessMonitor-1, started daemon -1227019456)>
[roslaunch.pmon][INFO] 2012-10-11 09:55:53,795: ProcessMonitor._post_run <ProcessMonitor(ProcessMonitor-1, started daemon -1227019456)>: remaining procs are [<roslaunch.nodeprocess.LocalProcess object at 0x8c379cc>]
[roslaunch.pmon][INFO] 2012-10-11 09:55:53,797: ProcessMonitor exit: killing master
[roslaunch][INFO] 2012-10-11 09:55:53,797: [master] killing on exit
[roslaunch][INFO] 2012-10-11 09:55:53,797: process[master]: killing os process with pid[3297] pgid[3297]
[roslaunch][INFO] 2012-10-11 09:55:53,797: [master] sending SIGINT to pgid [3297]
[roslaunch][INFO] 2012-10-11 09:55:53,797: [master] sent SIGINT to pgid [3297]
[roslaunch][INFO] 2012-10-11 09:55:53,897: process[master]: SIGINT killed with return value 1
[roslaunch.pmon][INFO] 2012-10-11 09:55:53,897: ProcessMonitor exit: cleaning up data structures and signals
[roslaunch.pmon][INFO] 2012-10-11 09:55:53,897: ProcessMonitor exit: pmon has shutdown

rancher@flyatar:~/git/Flylab$ cat /etc/hosts
127.0.0.1   localhost
127.0.1.1   flyatar

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Originally posted by ssafarik on ROS Answers with karma: 306 on 2012-10-10

Post score: 0


Original comments

Comment by jbohren on 2012-10-10:
Can you post the following: cat /etc/hostname, ifconfig, echo $ROS_MASTER_URI, echo $ROS_IP, echo $ROS_HOSTNAME

Comment by KruseT on 2012-10-11:
Also inspect the logfiles in .ros/logs

Comment by ssafarik on 2012-10-11:
I edited the question above with the info. I'm just going to move on, and do a new OS install, so figuring this out isn't really crucial.

Comment by PerkinsJames on 2012-10-11:
Can you also post /etc/hosts ?

Comment by ssafarik on 2012-10-11:
Note also that this is 32bit Ubuntu precise.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

In this month I encountered the similar problem twice, one time with some other guy's ROS Fuerte under Ubuntu Precise 64bit, and now with my own computer under Ubuntu Precise 32bit... Just now I tried to run roscore but it could not start after some time of waiting, throwing out almost the same error messages:


... logging to /home/kai/.ros/log/8bd2c78c-3638-11e2-b312-14dae93037a4/roslaunch-Kai-System-27427.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is  ignored
process[master]: started with pid [27448]
ERROR: could not contact master [http://Kai-System:11311/]
[master] killing on exit
Traceback (most recent call last):
  File "/opt/ros/fuerte/bin/rosmaster", line 35, in 
    rosmaster.rosmaster_main()
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosmaster/main.py", line 73, in rosmaster_main
    configure_logging()   
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosmaster/main.py", line 57, in configure_logging
    _log_filename = rosgraph.roslogging.configure_logging('rosmaster', logging.DEBUG, filename=filename)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosgraph/roslogging.py", line 86, in configure_logging
    rosgraph_d = rospkg.RosPack().get_path('rosgraph')
  File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 162, in get_path
    self._update_location_cache()
  File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 145, in _update_location_cache
    list_by_path(self._manifest_name, path, cache)
  File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 57, in list_by_path
    for d, dirs, files in os.walk(path, topdown=True, followlinks=True):
  File "/usr/lib/python2.7/os.py", line 294, in walk
    for x in walk(new_path, topdown, onerror, followlinks):
  File "/usr/lib/python2.7/os.py", line 294, in walk
    for x in walk(new_path, topdown, onerror, followlinks):
  File "/usr/lib/python2.7/os.py", line 294, in walk
    for x in walk(new_path, topdown, onerror, followlinks):
  File "/usr/lib/python2.7/os.py", line 284, in walk
    if isdir(join(top, name)):
  File "/usr/lib/python2.7/genericpath.py", line 41, in isdir
    st = os.stat(s)
KeyboardInterrupt

My ROS configurations has not been touched since last time I run it(no more than a week), so I also think the problem lies in somewhere else.

I will try rebooting and stopping vpns to see if it helps.

Update: Seems this is not a easy to solve problem. The last time I asked that guy to re-install a 32bit ubuntu and the problem disappeared, but this time I don't think this is a good idea. More info: I did not use "rosws" but the old-fashioned way of configuring ROS env. Here is a list:


kai@Kai-System> export | grep ROS
ROSLISP_PACKAGE_DIRECTORY=/opt/ros/fuerte/share/common-lisp/ros
ROS_DISTRO=fuerte
ROS_ETC_DIR=/opt/ros/fuerte/etc/ros
ROS_MASTER_URI=http://localhost:11311
ROS_PACKAGE_PATH=/home/kai/Projects:/home/kai/ros_stacks:/opt/ros/fuerte/share:/opt/ros/fuerte/stacks
ROS_ROOT=/opt/ros/fuerte/share/ros

Pinging localhost or my domain name "Kai-System" is fast(no more than 0.03ms) so it should not be a hosts problem.

Any idea how to debug this? I really dont want to reinstall my Ubuntu(it has been upgraded all the way up from 10.04 and I am glad with this)

Update2: Well... At last I solved this problem by debugging roscore using pdb, and it was caused by a TOO-LARGE $ROS_PACKAGE_PATH.

More detail:

In fact I mistakenly put too many folders(symbolic links) into one of the folder in $ROS_PACKAGE_PATH, so each time when roslaunch starts, it will call a subroutine to walk through all subfolders under it, which costs too much time and as a result, the rosparent thought it could not contact rosmaster and throw a RLException to terminate the program.(Don't ask me for details because I only understand part of the codes..)

To close:

In short, just check if your $ROS_PACKAGE_PATH contains any large folders(symbolic link counts), and remove them out of it, then start a new shell and it works.


Originally posted by K Chen with karma: 391 on 2012-11-24

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.