Recent timeout error on backup job

I have a set of errors that seem to match from a timestampt perspective. Backup job triggered via automation and via manual via web interface.

'Error message 1:

Logger: homeassistant.components.automation.create_backup
Source: components/automation/init.py:723
integration: Automation (documentation, issues)
First occurred: 8:18:34 PM (1 occurrences)
Last logged: 8:18:34 PM

While executing automation automation.create_backup
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.12/site-packages/bellows/ezsp/protocol.py”, line 74, in command
return await future
^^^^^^^^^^^^
asyncio.exceptions.CancelledError’

The above exception was the direct cause of the following exception:

‘Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/automation/init.py”, line 723, in async_trigger
return await self.action_script.async_run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/script.py”, line 1731, in async_run
return await asyncio.shield(create_eager_task(run.async_run()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/script.py”, line 451, in async_run
await self._async_step(log_exceptions=False)
File “/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/script.py”, line 503, in _async_step
self._handle_exception(
File “/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/script.py”, line 533, in _handle_exception
raise exception
File “/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/script.py”, line 501, in _async_step
await getattr(self, handler)()
File “/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/script.py”, line 736, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/script.py”, line 699, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File “/srv/homeassistant/lib/python3.12/site-packages/homeassistant/core.py”, line 2738, in async_call
response_data = await coro
^^^^^^^^^^
File “/srv/homeassistant/lib/python3.12/site-packages/homeassistant/core.py”, line 2779, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/backup/init.py”, line 35, in async_handle_create_service
await backup_manager.generate_backup()
File “/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/backup/manager.py”, line 199, in generate_backup
await self.pre_backup_actions()
File “/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/backup/manager.py”, line 101, in pre_backup_actions
raise result
File “/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/zha/backup.py”, line 17, in async_pre_backup
await zha_gateway.application_controller.backups.create_backup(load_devices=True)
File “/srv/homeassistant/lib/python3.12/site-packages/zigpy/backups.py”, line 143, in create_backup
await self.app.load_network_info(load_devices=load_devices)
File “/srv/homeassistant/lib/python3.12/site-packages/bellows/zigbee/application.py”, line 376, in load_network_info
(status, key) = await ezsp.getKeyTableEntry(index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/srv/homeassistant/lib/python3.12/site-packages/bellows/ezsp/init.py”, line 215, in _command
return await self._protocol.command(name, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/srv/homeassistant/lib/python3.12/site-packages/bellows/ezsp/protocol.py”, line 73, in command
async with asyncio_timeout(EZSP_CMD_TIMEOUT):
File “/usr/local/lib/python3.12/asyncio/timeouts.py”, line 111, in aexit
raise TimeoutError from exc_val
TimeoutError’

Error message 2:
Logger: pyalarmdotcomajax.websockets.client
Source: /srv/homeassistant/lib/python3.12/site-packages/pyalarmdotcomajax/websockets/client.py:150
First occurred: 6:13:54 PM (7 occurrences)
Last logged: 8:18:47 PM

Unexpected WebSocket error
Traceback (most recent call last):
’ File “/srv/homeassistant/lib/python3.12/site-packages/pyalarmdotcomajax/websockets/client.py”, line 137, in _connect
await self._async_handle_message(json.loads(msg.data))
File “/srv/homeassistant/lib/python3.12/site-packages/pyalarmdotcomajax/websockets/client.py”, line 175, in _async_handle_message
message = process_raw_message(raw_message, self._device_registry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/srv/homeassistant/lib/python3.12/site-packages/pyalarmdotcomajax/websockets/messages.py”, line 44, in process_raw_message
return EventMessage(message, device)
^^^^^^
UnboundLocalError: cannot access local variable ‘device’ where it is not associated with a value’

Error message 3:

Logger: bellows.ezsp.protocol
Source: runner.py:190
First occurred: 5:21:50 PM (9 occurrences)
Last logged: 8:19:24 PM

‘Failed to parse frame getKeyTableEntry: b’03eb9f030100000043690020517600006d0000009116002032’
Failed to parse frame getKeyTableEntry: b’03eb9f03010000004369002051760000ef0000009116002032’
Failed to parse frame getKeyTableEntry: b’03eb9f03010000004369002051760000660000009116002032’
Failed to parse frame getKeyTableEntry: b’03eb9f030100000043690020517600007f0000009116002032’
Failed to parse frame getKeyTableEntry: b’03eb9f03010000004369002051760000090000009116002032’’

Error message 4:
Logger: bellows.ezsp
Source: runner.py:190
First occurred: 5:21:50 PM (12 occurrences)
Last logged: 8:19:24 PM

Failed to parse frame, ignoring

I’m trying to work through the logs but I don’t seem to find anyone with a similar error. I can back up the homeassistant directory, excluding backups, without issue:

example: tar --exclude=backups -cvzf backups/2024.05.14.tar.gz *

I’m getting similar when I try to take ZHA backup with Skyconnect, but not observing when I take HA backup. Not sure what is causing ZHA backup to fail.

2024-05-15 22:51:15.071 WARNING (MainThread) [bellows.ezsp.protocol] Failed to parse frame getKeyTableEntry: b’03eb9f030100000043690020517600005f0000009116002032’
2024-05-15 22:51:15.071 WARNING (MainThread) [bellows.ezsp] Failed to parse frame, ignoring
2024-05-15 22:51:19.673 WARNING (MainThread) [bellows.ezsp] Failed to parse frame, ignoring
2024-05-15 22:51:21.062 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [2498262440] Error handling message: Timeout (timeout) X from 192.168.1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36)

Same problem here when trying to do a ZHA backup (Skyconnect).

2024-05-16 08:12:29.363 WARNING (MainThread) [bellows.ezsp.protocol] Failed to parse frame getKeyTableEntry: b'03eb9f03010000004369002051760000430000009116002032'
2024-05-16 08:12:29.363 WARNING (MainThread) [bellows.ezsp] Failed to parse frame, ignoring
2024-05-16 08:12:31.316 WARNING (MainThread) [bellows.ezsp] Failed to parse frame, ignoring
2024-05-16 08:12:35.353 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139937404406720] Error handling message: Timeout (timeout) X from 192.168.178.148 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15)

Identical error with Sckyconnect backup, not sure whom to ask for help in this case. should be an issue with HA?

  • Core: 2024.5.4
  • Supervisor: 2024.05.1

I have a similar issue and I opened it here:

@nkalis: did you solve the problem?
Otherwise please report it here:

I created a new subject as this one is not about ZHA backup, it’s confusing for other users.

I have the same HA backup issue, and I think it’s due to ZHA backup function. Commented here: [ZHA] failed to create backup - timeout · Issue #117859 · home-assistant/core · GitHub