SolidElectronics / evl-emu

EnvisaLink EVL-4 emulator for DSC IT-100
10 stars 10 forks source link

Connection can hang after restarting Home Assistant #2

Closed SolidElectronics closed 5 years ago

SolidElectronics commented 5 years ago

I've identified a problem where after restarting HA, it can fail to connect back to the Envisalink emulator. This is hugely annoying, and I'm not clear on the root cause yet, but it's probably something to do with the new networkRead/Write processes handling the new client connection. Here's a high-level log dump where it fails.

2019-04-30 23:32:59 - INFO - Client connected: ('192.168.11.75', 43214) 2019-04-30 23:32:59 - INFO - Flushing queues 2019-04-30 23:32:59 - INFO - Terminating networkread and networkwrite 2019-04-30 23:32:59 - INFO - Signal handler called with signal 15 2019-04-30 23:32:59 - INFO - Creating new networkread and networkwrite 2019-04-30 23:32:59 - INFO - Caught exception in networkWrite: <class 'SystemExit'> 2019-04-30 23:32:59 - INFO - Sending login request to client 2019-04-30 23:33:00 - INFO - Starting networkRead (26259) 2019-04-30 23:33:00 - INFO - Starting networkWrite (26260)

Working here

Restarting hass

2019-05-01 00:08:55 - INFO - Connection closed by client, terminating networkRead thread. 2019-05-01 00:08:58 - INFO - Client connected: ('192.168.11.75', 45022) 2019-05-01 00:08:58 - INFO - Flushing queues 2019-05-01 00:08:58 - INFO - Terminating networkread and networkwrite 2019-05-01 00:08:58 - INFO - Signal handler called with signal 15 2019-05-01 00:08:58 - INFO - Creating new networkread and networkwrite 2019-05-01 00:08:58 - INFO - Caught exception in networkWrite: <class 'SystemExit'> 2019-05-01 00:08:58 - INFO - Sending login request to client 2019-05-01 00:08:59 - INFO - Starting networkRead (26305) 2019-05-01 00:08:59 - INFO - Starting networkWrite (26306) 2019-05-01 00:09:00 - INFO - Client connected: ('192.168.11.75', 45044) 2019-05-01 00:09:00 - INFO - Flushing queues 2019-05-01 00:09:00 - INFO - Terminating networkread and networkwrite 2019-05-01 00:09:00 - INFO - Signal handler called with signal 15 2019-05-01 00:09:00 - INFO - Signal handler called with signal 15 2019-05-01 00:09:00 - INFO - Creating new networkread and networkwrite 2019-05-01 00:09:00 - INFO - Caught exception in networkRead: <class 'SystemExit'> 2019-05-01 00:09:00 - INFO - Sending login request to client 2019-05-01 00:09:00 - INFO - Caught exception in networkWrite: <class 'SystemExit'> 2019-05-01 00:09:03 - INFO - Starting networkRead (26311) 2019-05-01 00:09:03 - INFO - Starting networkWrite (26312)

Not working now, only remedy is killing processes from command line and restarting hass

SolidElectronics commented 5 years ago

I think this is solved by the commit today.