robotics-in-concert / rocon_multimaster

Key components for ros multimaster systems
11 stars 19 forks source link

Disconnection from Redis Exception causing crash #319

Closed stonier closed 7 years ago

stonier commented 9 years ago

Occurred when disconnecting a wireless connection to the hub.

[WARN] [WallTime: 1436773680.891593] Gateway Hub : pinger update [Error connecting to 192.168.3.10:6380. timed out.]
[INFO] [WallTime: 1436773680.892668] Gateway : lost connection with hub, attempting to disconnect...
[INFO] [WallTime: 1436773691.113990] Gateway : disengaged connection with the hub [GoCart Concert][192.168.3.10:6380]
[INFO] [WallTime: 1436773691.624060] Gateway : discovered hub directly [http://192.168.3.10:6380]
Exception in thread Thread-5:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/opt/groot/rocon_ws/install/lib/python2.7/dist-packages/rocon_hub_client/hub_discovery.py", line 119, in run
    result, _ = self.discovery_update_hook(hostname, port)
  File "/opt/groot/rocon_ws/install/lib/python2.7/dist-packages/rocon_gateway/gateway_node.py", line 152, in _register_gateway
    existing_advertisements
  File "/opt/groot/rocon_ws/install/lib/python2.7/dist-packages/rocon_gateway/hub_manager.py", line 220, in connect_to_hub
    gateway_ip,
  File "/opt/groot/rocon_ws/install/lib/python2.7/dist-packages/rocon_gateway/gateway_hub.py", line 131, in register_gateway
    old_key = self._redis_server.get(self._redis_keys['public_key'])
  File "/opt/groot/rocon_ws/install/lib/python2.7/dist-packages/rocon_python_redis/client.py", line 528, in get
    return self.execute_command('GET', name)
  File "/opt/groot/rocon_ws/install/lib/python2.7/dist-packages/rocon_python_redis/client.py", line 349, in execute_command
    connection.send_command(*args)
  File "/opt/groot/rocon_ws/install/lib/python2.7/dist-packages/rocon_python_redis/connection.py", line 300, in send_command
    self.send_packed_command(self.pack_command(*args))
  File "/opt/groot/rocon_ws/install/lib/python2.7/dist-packages/rocon_python_redis/connection.py", line 282, in send_packed_command
    self.connect()
  File "/opt/groot/rocon_ws/install/lib/python2.7/dist-packages/rocon_python_redis/connection.py", line 229, in connect
    raise ConnectionError(self._error_message(e))
ConnectionError: Error 101 connecting 192.168.3.10:6380. Network is unreachable.
stonier commented 9 years ago

This looks like it just needs to be handled around the redis client get call.

stonier commented 7 years ago

Likely fixed by @asmodehn's large 2016 update. Reopen problems as they arise.