Home Assistant process killed / quitted on Raspberry Pi 3+ Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
Lubster85
Posts: 5
Joined: Tue Sep 14, 2021 3:39 pm

Home Assistant process killed / quitted on Raspberry Pi 3+

Post by Lubster85 »

Hi Everyone,

I've had DietPi running on a Raspberry Pi 3+ for ages with no major issues. Recently I wanted start fresh with Bullseye and chose the 64bit image. My one big issue that I don't understand how to troubleshoot or fix is that Home Assistant keeps quitting, and fairly randomly.

Is there any specific place I should look through to get to the bottom of this?
Should i rather be using the 32-bit image instead?

I've pasted the logs just before the service died, but I've seen other different issues in the logs before , so I'm not entirely sure or convinced it is soething to do with the stream_worker logs.

RPi 3 Model B+ (aarch64)

System Health

version: core-2021.9.6
installation_type: Unknown
dev: false
hassio: false
docker: false
user: homeassistant
virtualenv: false
python_version: 3.8.11
os_name: Linux
os_version: 5.10.60-v8+
arch: aarch64
timezone: Africa/Johannesburg


logged_in: false
can_reach_cert_server: ok
can_reach_cloud_auth: ok
can_reach_cloud: ok


dashboards: 3
resources: 0
views: 3
mode: storage

Code: Select all

 DietPi-Services
─────────────────────────────────────────────────────
 Mode: status 

[  OK  ] DietPi-Services | php7.4-fpm		: active (running) since Mon 2021-09-13 21:06:54 SAST; 18h ago
[  OK  ] DietPi-Services | lighttpd		: active (running) since Mon 2021-09-13 21:06:56 SAST; 18h ago
[  OK  ] DietPi-Services | mosquitto		: active (running) since Mon 2021-09-13 21:06:56 SAST; 18h ago
[FAILED] DietPi-Services | ● home-assistant.service - Home Assistant (DietPi)
     Loaded: loaded (/etc/systemd/system/home-assistant.service; disabled; vendor preset: enabled)
     Active: failed (Result: signal) since Tue 2021-09-14 14:55:58 SAST; 35min ago
    Process: 721 ExecStart=/home/homeassistant/homeassistant-start.sh (code=killed, signal=ABRT)
   Main PID: 721 (code=killed, signal=ABRT)
        CPU: 55min 38.792s

Sep 14 13:44:22 DietPi homeassistant[721]: 2021-09-14 13:44:22 ERROR (stream_worker) [libav.mp4] Application provided duration: 4226252157 / timestamp: 4251685312 is out of range for mov/mp4 format
Sep 14 13:44:22 DietPi homeassistant[721]: 2021-09-14 13:44:22 ERROR (stream_worker) [libav.mp4] Application provided duration: 4226253036 / timestamp: 4251686192 is out of range for mov/mp4 format
Sep 14 13:44:22 DietPi homeassistant[721]: 2021-09-14 13:44:22 ERROR (stream_worker) [libav.mp4] Application provided duration: 4226253899 / timestamp: 4251687056 is out of range for mov/mp4 format
Sep 14 13:44:22 DietPi homeassistant[721]: 2021-09-14 13:44:22 ERROR (stream_worker) [libav.mp4] Application provided duration: 4226255626 / timestamp: 4251688784 is out of range for mov/mp4 format
Sep 14 13:46:00 DietPi homeassistant[721]: 2021-09-14 13:46:00 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream:
Sep 14 13:51:01 DietPi homeassistant[721]: 2021-09-14 13:51:01 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream:
Sep 14 13:58:52 DietPi homeassistant[721]: 2021-09-14 13:58:52 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream:
Sep 14 14:55:58 DietPi systemd[1]: home-assistant.service: Main process exited, code=killed, status=6/ABRT
Sep 14 14:55:58 DietPi systemd[1]: home-assistant.service: Failed with result 'signal'.
Sep 14 14:55:58 DietPi systemd[1]: home-assistant.service: Consumed 55min 38.792s CPU time.
[  OK  ] DietPi-Services | cron			: active (running) since Mon 2021-09-13 21:06:56 SAST; 18h ago
[  OK  ] DietPi-Services | dropbear		: active (running) since Mon 2021-09-13 21:06:51 SAST; 18h ago
[  OK  ] DietPi-Services | unbound		: active (running) since Mon 2021-09-13 21:05:48 SAST; 18h ago
[  OK  ] DietPi-Services | adguardhome		: active (running) since Mon 2021-09-13 21:06:51 SAST; 18h ago
[ INFO ] DietPi-Services | dietpi-vpn		: inactive (dead)
[  OK  ] DietPi-Services | dietpi-ramlog	: active (exited) since Mon 2021-09-13 21:05:46 SAST; 18h ago
[  OK  ] DietPi-Services | dietpi-preboot	: active (exited) since Mon 2021-09-13 21:05:47 SAST; 18h ago
[  OK  ] DietPi-Services | dietpi-boot		: active (exited) since Mon 2021-09-13 21:06:51 SAST; 18h ago
[  OK  ] DietPi-Services | dietpi-postboot	: active (exited) since Mon 2021-09-13 21:06:51 SAST; 18h ago
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: Home Assistant process killed / quitted on Raspberry Pi 3+

Post by Joulinar »

could you share following as well

Code: Select all

journalctl -u home-assistant.service
Looks like there is an issue with a .mp4 file and an incorrect file system format.

Code: Select all

ERROR (stream_worker) [libav.mp4] Application provided duration: 4226252157 / timestamp: 4251685312 is out of range for mov/mp4 format
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Lubster85
Posts: 5
Joined: Tue Sep 14, 2021 3:39 pm

Re: Home Assistant process killed / quitted on Raspberry Pi 3+

Post by Lubster85 »

As much as i doubted this was the cause in the beginning, I think there is something going on with one of the cameras (perhaps weak signal).
Is there any chance that the fault lies within the "stream" service, where a weak signal causes the process to run wild until bombing out?

Code: Select all

-- Journal begins at Tue 2021-09-14 22:10:23 SAST, ends at Wed 2021-09-15 10:34:21 SAST. --
Sep 14 22:11:34 DietPi systemd[1]: Started Home Assistant (DietPi).
Sep 14 22:11:53 DietPi homeassistant[721]: 2021-09-14 22:11:52 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //mnt/dietpi_userdata/homeassistant/home-assistant_v2.db was shutdown cleanly
Sep 14 22:11:53 DietPi homeassistant[721]: 2021-09-14 22:11:53 WARNING (Recorder) [homeassistant.components.recorder.util] Ended unfinished session (id=11 from 2021-09-14 20:03:40.259979)
Sep 14 22:12:24 DietPi homeassistant[721]: 2021-09-14 22:12:24 WARNING (MainThread) [homeassistant.setup] Setup of system_health is taking over 10 seconds.
Sep 14 22:12:24 DietPi homeassistant[721]: 2021-09-14 22:12:24 WARNING (MainThread) [homeassistant.setup] Setup of input_boolean is taking over 10 seconds.
Sep 14 22:12:24 DietPi homeassistant[721]: 2021-09-14 22:12:24 WARNING (MainThread) [homeassistant.setup] Setup of media_source is taking over 10 seconds.
Sep 14 22:12:24 DietPi homeassistant[721]: 2021-09-14 22:12:24 WARNING (MainThread) [homeassistant.setup] Setup of ffmpeg is taking over 10 seconds.
Sep 14 22:12:34 DietPi homeassistant[721]: 2021-09-14 22:12:34 WARNING (MainThread) [homeassistant.setup] Setup of input_select is taking over 10 seconds.
Sep 14 22:12:35 DietPi homeassistant[721]: 2021-09-14 22:12:35 WARNING (MainThread) [homeassistant.setup] Setup of input_text is taking over 10 seconds.
Sep 14 22:12:35 DietPi homeassistant[721]: 2021-09-14 22:12:35 WARNING (MainThread) [homeassistant.setup] Setup of counter is taking over 10 seconds.
Sep 14 22:12:35 DietPi homeassistant[721]: 2021-09-14 22:12:35 WARNING (MainThread) [homeassistant.setup] Setup of input_number is taking over 10 seconds.
Sep 14 22:12:35 DietPi homeassistant[721]: 2021-09-14 22:12:35 WARNING (MainThread) [homeassistant.setup] Setup of timer is taking over 10 seconds.
Sep 14 22:12:35 DietPi homeassistant[721]: 2021-09-14 22:12:35 WARNING (MainThread) [homeassistant.setup] Setup of zone is taking over 10 seconds.
Sep 14 22:12:35 DietPi homeassistant[721]: 2021-09-14 22:12:35 WARNING (MainThread) [homeassistant.setup] Setup of input_datetime is taking over 10 seconds.
Sep 14 22:12:35 DietPi homeassistant[721]: 2021-09-14 22:12:35 WARNING (MainThread) [homeassistant.config_entries] Config entry 'lubhub.ddns.net' for adguard integration not ready yet: Timeout occurred while connecting to AdGuard Home instance.; Retrying in background
Sep 14 22:12:45 DietPi homeassistant[721]: 2021-09-14 22:12:45 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform systemmonitor is taking over 10 seconds.
Sep 14 22:12:46 DietPi homeassistant[721]: 2021-09-14 22:12:45 WARNING (MainThread) [homeassistant.components.camera] Setup of camera platform ffmpeg is taking over 10 seconds.
Sep 14 22:12:46 DietPi homeassistant[721]: 2021-09-14 22:12:46 WARNING (MainThread) [homeassistant.setup] Setup of script is taking over 10 seconds.
Sep 14 22:12:46 DietPi homeassistant[721]: 2021-09-14 22:12:46 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform updater is taking over 10 seconds.
Sep 14 22:13:06 DietPi homeassistant[721]: 2021-09-14 22:13:06 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 22:13:06 DietPi homeassistant[721]: 2021-09-14 22:13:06 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 22:13:06 DietPi homeassistant[721]: 2021-09-14 22:13:06 ERROR (stream_worker) [libav.h264] decode_slice_header error
Sep 14 22:13:06 DietPi homeassistant[721]: 2021-09-14 22:13:06 ERROR (stream_worker) [libav.h264] no frame!
Sep 14 22:13:07 DietPi homeassistant[721]: 2021-09-14 22:13:07 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 22:13:07 DietPi homeassistant[721]: 2021-09-14 22:13:07 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 22:13:07 DietPi homeassistant[721]: 2021-09-14 22:13:07 ERROR (stream_worker) [libav.h264] decode_slice_header error
Sep 14 22:13:07 DietPi homeassistant[721]: 2021-09-14 22:13:07 ERROR (stream_worker) [libav.h264] no frame!
Sep 14 22:13:08 DietPi homeassistant[721]: 2021-09-14 22:13:08 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 22:13:08 DietPi homeassistant[721]: 2021-09-14 22:13:08 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 22:13:08 DietPi homeassistant[721]: 2021-09-14 22:13:08 ERROR (stream_worker) [libav.h264] decode_slice_header error
Sep 14 22:13:08 DietPi homeassistant[721]: 2021-09-14 22:13:08 ERROR (stream_worker) [libav.h264] no frame!
Sep 14 22:13:18 DietPi homeassistant[721]: 2021-09-14 22:13:18 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform adguard is taking over 10 seconds.
Sep 14 22:13:18 DietPi homeassistant[721]: 2021-09-14 22:13:18 WARNING (MainThread) [homeassistant.components.switch] Setup of switch platform adguard is taking over 10 seconds.
Sep 14 22:13:30 DietPi homeassistant[721]: 2021-09-14 22:13:30 ERROR (stream_worker) [libav.rtsp] RTP: PT=60: bad cseq 70a4 expected=6142
Sep 14 22:13:31 DietPi homeassistant[721]: 2021-09-14 22:13:31 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream:
Sep 14 22:13:41 DietPi homeassistant[721]: 2021-09-14 22:13:41 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 22:13:41 DietPi homeassistant[721]: 2021-09-14 22:13:41 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 22:13:41 DietPi homeassistant[721]: 2021-09-14 22:13:41 ERROR (stream_worker) [libav.h264] decode_slice_header error
Sep 14 22:13:41 DietPi homeassistant[721]: 2021-09-14 22:13:41 ERROR (stream_worker) [libav.h264] no frame!
Sep 14 22:13:41 DietPi homeassistant[721]: 2021-09-14 22:13:41 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 22:13:41 DietPi homeassistant[721]: 2021-09-14 22:13:41 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 22:13:41 DietPi homeassistant[721]: 2021-09-14 22:13:41 ERROR (stream_worker) [libav.h264] decode_slice_header error
Sep 14 22:13:41 DietPi homeassistant[721]: 2021-09-14 22:13:41 ERROR (stream_worker) [libav.h264] no frame!
Sep 14 22:14:38 DietPi homeassistant[721]: 2021-09-14 22:14:38 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry Dusty for xiaomi_miio
Sep 14 22:14:38 DietPi homeassistant[721]: Traceback (most recent call last):
Sep 14 22:14:38 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/config_entries.py", line 443, in async_unload
Sep 14 22:14:38 DietPi homeassistant[721]:     result = await component.async_unload_entry(hass, self)  # type: ignore
Sep 14 22:14:38 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/xiaomi_miio/__init__.py", line 303, in async_unload_entry
Sep 14 22:14:38 DietPi homeassistant[721]:     hass.data[DOMAIN].pop(config_entry.entry_id)
Sep 14 22:14:38 DietPi homeassistant[721]: KeyError: '263e38af714c959b68afb56016283b96'
Sep 14 22:15:46 DietPi homeassistant[721]: 2021-09-14 22:15:46 ERROR (MainThread) [aiohttp.server] Error handling request
Sep 14 22:15:46 DietPi homeassistant[721]: Traceback (most recent call last):
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
Sep 14 22:15:46 DietPi homeassistant[721]:     resp = await self._request_handler(request)
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
Sep 14 22:15:46 DietPi homeassistant[721]:     resp = await handler(request)
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
Sep 14 22:15:46 DietPi homeassistant[721]:     return await handler(request)
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
Sep 14 22:15:46 DietPi homeassistant[721]:     return await handler(request)
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/http/forwarded.py", line 89, in forwarded_middleware
Sep 14 22:15:46 DietPi homeassistant[721]:     return await handler(request)
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
Sep 14 22:15:46 DietPi homeassistant[721]:     return await handler(request)
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/http/ban.py", line 78, in ban_middleware
Sep 14 22:15:46 DietPi homeassistant[721]:     return await handler(request)
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/http/auth.py", line 144, in auth_middleware
Sep 14 22:15:46 DietPi homeassistant[721]:     return await handler(request)
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/http/view.py", line 135, in handle
Sep 14 22:15:46 DietPi homeassistant[721]:     result = await result
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/config/config_entries.py", line 155, in post
Sep 14 22:15:46 DietPi homeassistant[721]:     return await super().post(request, flow_id)
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/http/data_validator.py", line 63, in wrapper
Sep 14 22:15:46 DietPi homeassistant[721]:     result = await method(view, request, *args, **kwargs)
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/helpers/data_entry_flow.py", line 109, in post
Sep 14 22:15:46 DietPi homeassistant[721]:     result = await self._flow_mgr.async_configure(flow_id, data)
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 202, in async_configure
Sep 14 22:15:46 DietPi homeassistant[721]:     result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 260, in _async_handle_step
Sep 14 22:15:46 DietPi homeassistant[721]:     result: FlowResult = await getattr(flow, method)(user_input)
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/xiaomi_miio/config_flow.py", line 285, in async_step_select
Sep 14 22:15:46 DietPi homeassistant[721]:     return await self.async_step_connect()
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/xiaomi_miio/config_flow.py", line 323, in async_step_connect
Sep 14 22:15:46 DietPi homeassistant[721]:     await connect_device_class.async_connect_device(self.host, self.token)
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/xiaomi_miio/device.py", line 42, in async_connect_device
Sep 14 22:15:46 DietPi homeassistant[721]:     self._device = Device(host, token)
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.8/site-packages/miio/device.py", line 70, in __init__
Sep 14 22:15:46 DietPi homeassistant[721]:     self._protocol = MiIOProtocol(
Sep 14 22:15:46 DietPi homeassistant[721]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.8/site-packages/miio/miioprotocol.py", line 42, in __init__
Sep 14 22:15:46 DietPi homeassistant[721]:     self.token = bytes.fromhex(token)
Sep 14 22:15:46 DietPi homeassistant[721]: ValueError: non-hexadecimal number found in fromhex() arg at position 2
Sep 14 22:15:48 DietPi homeassistant[721]: 2021-09-14 22:15:48 ERROR (MainThread) [aiohttp.server] Error handling request
Sep 14 22:15:48 DietPi homeassistant[721]: Traceback (most recent call last):
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
Sep 14 22:15:48 DietPi homeassistant[721]:     resp = await self._request_handler(request)
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
Sep 14 22:15:48 DietPi homeassistant[721]:     resp = await handler(request)
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
Sep 14 22:15:48 DietPi homeassistant[721]:     return await handler(request)
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
Sep 14 22:15:48 DietPi homeassistant[721]:     return await handler(request)
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/http/forwarded.py", line 89, in forwarded_middleware
Sep 14 22:15:48 DietPi homeassistant[721]:     return await handler(request)
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
Sep 14 22:15:48 DietPi homeassistant[721]:     return await handler(request)
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/http/ban.py", line 78, in ban_middleware
Sep 14 22:15:48 DietPi homeassistant[721]:     return await handler(request)
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/http/auth.py", line 144, in auth_middleware
Sep 14 22:15:48 DietPi homeassistant[721]:     return await handler(request)
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/http/view.py", line 135, in handle
Sep 14 22:15:48 DietPi homeassistant[721]:     result = await result
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/config/config_entries.py", line 155, in post
Sep 14 22:15:48 DietPi homeassistant[721]:     return await super().post(request, flow_id)
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/http/data_validator.py", line 63, in wrapper
Sep 14 22:15:48 DietPi homeassistant[721]:     result = await method(view, request, *args, **kwargs)
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/helpers/data_entry_flow.py", line 109, in post
Sep 14 22:15:48 DietPi homeassistant[721]:     result = await self._flow_mgr.async_configure(flow_id, data)
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 202, in async_configure
Sep 14 22:15:48 DietPi homeassistant[721]:     result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 260, in _async_handle_step
Sep 14 22:15:48 DietPi homeassistant[721]:     result: FlowResult = await getattr(flow, method)(user_input)
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/xiaomi_miio/config_flow.py", line 285, in async_step_select
Sep 14 22:15:48 DietPi homeassistant[721]:     return await self.async_step_connect()
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/xiaomi_miio/config_flow.py", line 323, in async_step_connect
Sep 14 22:15:48 DietPi homeassistant[721]:     await connect_device_class.async_connect_device(self.host, self.token)
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/xiaomi_miio/device.py", line 42, in async_connect_device
Sep 14 22:15:48 DietPi homeassistant[721]:     self._device = Device(host, token)
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.8/site-packages/miio/device.py", line 70, in __init__
Sep 14 22:15:48 DietPi homeassistant[721]:     self._protocol = MiIOProtocol(
Sep 14 22:15:48 DietPi homeassistant[721]:   File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.8/site-packages/miio/miioprotocol.py", line 42, in __init__
Sep 14 22:15:48 DietPi homeassistant[721]:     self.token = bytes.fromhex(token)
Sep 14 22:15:48 DietPi homeassistant[721]: ValueError: non-hexadecimal number found in fromhex() arg at position 2
Sep 14 22:15:56 DietPi homeassistant[721]: 2021-09-14 22:15:56 ERROR (MainThread) [homeassistant.components.xiaomi_miio.device] DeviceException during setup of xiaomi device with host : Unable to discover the device
Sep 14 22:16:12 DietPi homeassistant[721]: 2021-09-14 22:16:12 ERROR (MainThread) [homeassistant.components.xiaomi_miio.device] DeviceException during setup of xiaomi device with host : Unable to discover the device
Sep 14 22:16:23 DietPi homeassistant[721]: 2021-09-14 22:16:22 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry Lubbe for xiaomi_miio
Sep 14 22:16:23 DietPi homeassistant[721]: Traceback (most recent call last):
Sep 14 22:16:23 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/config_entries.py", line 443, in async_unload
Sep 14 22:16:23 DietPi homeassistant[721]:     result = await component.async_unload_entry(hass, self)  # type: ignore
Sep 14 22:16:23 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/xiaomi_miio/__init__.py", line 303, in async_unload_entry
Sep 14 22:16:23 DietPi homeassistant[721]:     hass.data[DOMAIN].pop(config_entry.entry_id)
Sep 14 22:16:23 DietPi homeassistant[721]: KeyError: '884dbdec09b48b956ceb8d69af0a85af'
Sep 14 22:17:04 DietPi homeassistant[721]: 2021-09-14 22:17:04 WARNING (SyncWorker_4) [homeassistant.components.telegram_bot] Status code 500 (retry #1) loading https://xxxx:8123/api/camera_proxy/camera.living_room?token=1669a609181ab3fb21c5c497ed66e8c51f5a6345d75f3ae8143bf93e4fb42ed5
Sep 14 22:17:07 DietPi homeassistant[721]: 2021-09-14 22:17:07 WARNING (SyncWorker_4) [homeassistant.components.telegram_bot] Status code 500 (retry #2) loading https://xxxx:8123/api/camera_proxy/camera.living_room?token=1669a609181ab3fb21c5c497ed66e8c51f5a6345d75f3ae8143bf93e4fb42ed5
Sep 14 22:17:10 DietPi homeassistant[721]: 2021-09-14 22:17:10 WARNING (SyncWorker_4) [homeassistant.components.telegram_bot] Status code 500 (retry #3) loading https://xxxx:8123/api/camera_proxy/camera.living_room?token=1669a609181ab3fb21c5c497ed66e8c51f5a6345d75f3ae8143bf93e4fb42ed5
Sep 14 22:17:14 DietPi homeassistant[721]: 2021-09-14 22:17:14 WARNING (SyncWorker_4) [homeassistant.components.telegram_bot] Status code 500 (retry #4) loading https://xxxx:8123/api/camera_proxy/camera.living_room?token=1669a609181ab3fb21c5c497ed66e8c51f5a6345d75f3ae8143bf93e4fb42ed5
Sep 14 22:17:17 DietPi homeassistant[721]: 2021-09-14 22:17:17 WARNING (SyncWorker_4) [homeassistant.components.telegram_bot] Status code 500 (retry #5) loading https://xxxx:8123/api/camera_proxy/camera.living_room?token=1669a609181ab3fb21c5c497ed66e8c51f5a6345d75f3ae8143bf93e4fb42ed5
Sep 14 22:17:17 DietPi homeassistant[721]: 2021-09-14 22:17:17 WARNING (SyncWorker_4) [homeassistant.components.telegram_bot] Can't load data in https://xxxx:8123/api/camera_proxy/camera.living_room?token=1669a609181ab3fb21c5c497ed66e8c51f5a6345d75f3ae8143bf93e4fb42ed5 after 5 retries
Sep 14 22:17:17 DietPi homeassistant[721]: 2021-09-14 22:17:17 ERROR (SyncWorker_4) [homeassistant.components.telegram_bot] Can't send file with kwargs: {'url': 'https://xxxxt:8123/api/camera_proxy/camera.living_room?token=1669a609181ab3fb21c5c497ed66e8c51f5a6345d75f3ae8143bf93e4fb42ed5', 'caption': 'Living Room'}
Sep 14 22:33:54 DietPi homeassistant[721]: 2021-09-14 22:33:54 WARNING (MainThread) [homeassistant.setup] Setup of input_boolean is taking over 10 seconds.
Sep 14 22:33:54 DietPi homeassistant[721]: 2021-09-14 22:33:54 WARNING (MainThread) [homeassistant.setup] Setup of input_text is taking over 10 seconds.
Sep 14 22:33:54 DietPi homeassistant[721]: 2021-09-14 22:33:54 WARNING (MainThread) [homeassistant.setup] Setup of zone is taking over 10 seconds.
Sep 14 22:33:54 DietPi homeassistant[721]: 2021-09-14 22:33:54 WARNING (MainThread) [homeassistant.setup] Setup of input_number is taking over 10 seconds.
Sep 14 22:33:54 DietPi homeassistant[721]: 2021-09-14 22:33:54 WARNING (MainThread) [homeassistant.setup] Setup of timer is taking over 10 seconds.
Sep 14 22:33:54 DietPi homeassistant[721]: 2021-09-14 22:33:54 WARNING (MainThread) [homeassistant.setup] Setup of input_datetime is taking over 10 seconds.
Sep 14 22:33:55 DietPi homeassistant[721]: 2021-09-14 22:33:55 WARNING (MainThread) [homeassistant.setup] Setup of input_select is taking over 10 seconds.
Sep 14 22:33:55 DietPi homeassistant[721]: 2021-09-14 22:33:55 WARNING (MainThread) [homeassistant.setup] Setup of counter is taking over 10 seconds.
Sep 14 22:34:00 DietPi homeassistant[721]: 2021-09-14 22:34:00 WARNING (MainThread) [homeassistant.config_entries] Config entry 'lubhub.ddns.net' for adguard integration not ready yet: Timeout occurred while connecting to AdGuard Home instance.; Retrying in background
Sep 14 22:34:35 DietPi homeassistant[721]: 2021-09-14 22:34:35 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform adguard is taking over 10 seconds.
Sep 14 22:34:35 DietPi homeassistant[721]: 2021-09-14 22:34:35 WARNING (MainThread) [homeassistant.components.switch] Setup of switch platform adguard is taking over 10 seconds.
Sep 14 22:37:25 DietPi homeassistant[721]: 2021-09-14 22:37:25 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry Dusty for xiaomi_miio
Sep 14 22:37:25 DietPi homeassistant[721]: Traceback (most recent call last):
Sep 14 22:37:25 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/config_entries.py", line 443, in async_unload
Sep 14 22:37:25 DietPi homeassistant[721]:     result = await component.async_unload_entry(hass, self)  # type: ignore
Sep 14 22:37:25 DietPi homeassistant[721]:   File "/home/homeassistant/.pyenv/versions/3.8.11/lib/python3.8/site-packages/homeassistant/components/xiaomi_miio/__init__.py", line 303, in async_unload_entry
Sep 14 22:37:25 DietPi homeassistant[721]:     hass.data[DOMAIN].pop(config_entry.entry_id)
Sep 14 22:37:25 DietPi homeassistant[721]: KeyError: '2e537f6b65d5220714ccf357ed3d4786'
Sep 14 22:41:31 DietPi homeassistant[721]: 2021-09-14 22:41:31 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream:
Sep 14 22:41:41 DietPi homeassistant[721]: 2021-09-14 22:41:41 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 22:41:41 DietPi homeassistant[721]: 2021-09-14 22:41:41 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 22:41:41 DietPi homeassistant[721]: 2021-09-14 22:41:41 ERROR (stream_worker) [libav.h264] decode_slice_header error
Sep 14 22:41:41 DietPi homeassistant[721]: 2021-09-14 22:41:41 ERROR (stream_worker) [libav.h264] no frame!
Sep 14 22:41:41 DietPi homeassistant[721]: 2021-09-14 22:41:41 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 22:41:41 DietPi homeassistant[721]: 2021-09-14 22:41:41 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 22:41:41 DietPi homeassistant[721]: 2021-09-14 22:41:41 ERROR (stream_worker) [libav.h264] decode_slice_header error
Sep 14 22:41:41 DietPi homeassistant[721]: 2021-09-14 22:41:41 ERROR (stream_worker) [libav.h264] no frame!
Sep 14 23:08:38 DietPi homeassistant[721]: 2021-09-14 23:08:38 ERROR (stream_worker) [libav.rtsp] RTP: PT=60: bad cseq 4470 expected=3866
Sep 14 23:08:38 DietPi homeassistant[721]: 2021-09-14 23:08:38 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream:
Sep 14 23:08:49 DietPi homeassistant[721]: 2021-09-14 23:08:49 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 23:08:49 DietPi homeassistant[721]: 2021-09-14 23:08:49 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 23:08:49 DietPi homeassistant[721]: 2021-09-14 23:08:49 ERROR (stream_worker) [libav.h264] decode_slice_header error
Sep 14 23:08:49 DietPi homeassistant[721]: 2021-09-14 23:08:49 ERROR (stream_worker) [libav.h264] no frame!
Sep 14 23:08:49 DietPi homeassistant[721]: 2021-09-14 23:08:49 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 23:08:49 DietPi homeassistant[721]: 2021-09-14 23:08:49 ERROR (stream_worker) [libav.h264] non-existing PPS 0 referenced
Sep 14 23:08:49 DietPi homeassistant[721]: 2021-09-14 23:08:49 ERROR (stream_worker) [libav.h264] decode_slice_header error
Sep 14 23:08:49 DietPi homeassistant[721]: 2021-09-14 23:08:49 ERROR (stream_worker) [libav.h264] no frame!
Sep 14 23:17:02 DietPi systemd[1]: home-assistant.service: Main process exited, code=killed, status=6/ABRT
Sep 14 23:17:02 DietPi systemd[1]: home-assistant.service: Failed with result 'signal'.
Sep 14 23:17:02 DietPi systemd[1]: home-assistant.service: Consumed 15min 24.397s CPU time.
root@DietPi:~# 
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: Home Assistant process killed / quitted on Raspberry Pi 3+

Post by Joulinar »

looks like issues to xiaomi_miio device

Code: Select all

ERROR (MainThread) [homeassistant.config_entries] Error unloading entry Dusty for xiaomi_miio
Maybe you need to disconnect this device and see how it behave. Probably as well you could reach out to HA community for better support on HA specific topics.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Lubster85
Posts: 5
Joined: Tue Sep 14, 2021 3:39 pm

Re: Home Assistant process killed / quitted on Raspberry Pi 3+

Post by Lubster85 »

I disabled the Xiaomi integration for now to eliminate that. It seems there is something wrong with the "stream" related components.
It seems like then something goes wrong, the process is ultimately killed, but then Home Assistant quits. Probably not a good idea to have it automatically restart, but will try look around for others with this issue.

Code: Select all

Sep 15 16:43:38 DietPi homeassistant[45157]: 2021-09-15 16:43:38 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream:
Sep 15 16:56:04 DietPi homeassistant[45157]: 2021-09-15 16:56:04 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [546829074832] Client unable to keep up with pending messages. Stayed over 512 for 5 seconds
Sep 15 17:10:46 DietPi homeassistant[45157]: 2021-09-15 17:10:46 ERROR (stream_worker) [libav.mp4] Application provided duration: 4226248704 / timestamp: 4252115024 is out of range for mov/mp4 format
Sep 15 17:10:46 DietPi homeassistant[45157]: 2021-09-15 17:10:46 ERROR (stream_worker) [libav.mp4] Application provided duration: 4226249567 / timestamp: 4252115888 is out of range for mov/mp4 format
Sep 15 17:20:22 DietPi homeassistant[45157]: 2021-09-15 17:20:22 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream:
Sep 15 18:22:21 DietPi systemd[1]: home-assistant.service: Main process exited, code=killed, status=6/ABRT
Sep 15 18:22:21 DietPi systemd[1]: home-assistant.service: Failed with result 'signal'.
Sep 15 18:22:21 DietPi systemd[1]: home-assistant.service: Consumed 20min 11.475s CPU time.
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: Home Assistant process killed / quitted on Raspberry Pi 3+

Post by Joulinar »

maybe ask on HA forum what issue Error demuxing stream could be.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Lubster85
Posts: 5
Joined: Tue Sep 14, 2021 3:39 pm

Re: Home Assistant process killed / quitted on Raspberry Pi 3+

Post by Lubster85 »

Thanks for looking anyway. I'll definitely reach out.
One thing I wanted to ask - this is the first time I'm trying out the Dietpi 64bit image. Previously I had the 32bit image on my Pi 3+ with no issues.

Is it common for 64bit vs 32bit to have issues across a particular package?

When I have some time, I was thinking of reloading the 32bit image and reinstalling the same setup to see if there is any difference. Unfortunately I did not check my versions of al the packages etc. before installing this time.
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: Home Assistant process killed / quitted on Raspberry Pi 3+

Post by Joulinar »

yes 64bit and 32bit are different platforms and packages could behave different. Even on the 32bit image we offer 2 version on Bullseye now, using different package source.

ARMv6 - 32bit - Raspbian package repository
ARMv7 - 32bit - Debian package repository
ARMv8 - 64bit - Debian package repository

As well a major difference in your case is the switch from Buster to Bullseye I guess.

In general there should be no benefit on 64bit version over 32bit. If 32bit was working fine, why not continue using it :)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Lubster85
Posts: 5
Joined: Tue Sep 14, 2021 3:39 pm

Re: Home Assistant process killed / quitted on Raspberry Pi 3+

Post by Lubster85 »

Interesting indeed! I reinstalled the 32-bit Debian image. Since then, no issues.
Thank you for the info and suggestions;
Post Reply