goodrobots / MAVCesium

An experimental web based map display for MAVProxy based on Cesium
https://gitter.im/goodrobots/Lobby
GNU General Public License v3.0
40 stars 22 forks source link

Can't restart cesium #19

Closed fnoop closed 7 years ago

fnoop commented 7 years ago

Can't unload and load cesium module from mavproxy.

dule reload cesium
MANUAL> WebSocket connection closed: connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)
Unloaded module cesium
MAVCesium display loaded at http://192.168.1.175:6790/
Reloaded module cesium
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1193, in run
    self.startRunning(installSignalHandlers=installSignalHandlers)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1173, in startRunning
    ReactorBase.startRunning(self)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 684, in startRunning
    raise error.ReactorNotRestartable()
ReactorNotRestartable
MANUAL> module unload cesium
MANUAL> Unloaded module cesium

MANUAL> module load cesium
MANUAL> ERROR in command ['load', 'cesium']: Couldn't listen on 192.168.1.175:6790: [Errno 98] Address already in use.
SamuelDudley commented 7 years ago

This is an issue with the twisted "reactor". Once stopped it can't simply be restarted... I have been requested to port the project to tornado which should hopefully resolve this issue at the same time.

SamuelDudley commented 7 years ago

WIP opened with initial port. #24 Some small fixes needed, but very close to replacing the existing flask + twisted arrangement.

SamuelDudley commented 7 years ago

Fixed with #24

fnoop commented 7 years ago

Works great, thanks!