I had a problem recently whereby I was unable to restart HA from the UI. HA just stops and I have to ssh in and restart with systemctl restart home-assistant.
I tried a bunch of things to address this, but nothing worked so I made a completely fresh install of both HA and DietPi and I still have the problem.
I am not sure, therefore, whether this is a problem with HA 2022.2 which I recently upgrades or DietPi from apt update or something else.
there are some HA log entries to do with ffmpeg (below) but nothing that I can see wrt not restarting.
How do I check the service status? htop simply shows that HA isn’t running.
cheers!
File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.9/site-packages/haffmpeg/core.py", line 136, in open
self._proc = await self._loop.run_in_executor(None, proc_func)
File "/home/homeassistant/.pyenv/versions/3.9.9/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.pyenv/versions/3.9.9/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/home/homeassistant/.pyenv/versions/3.9.9/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'
2022-02-04 18:09:00 WARNING (MainThread) [haffmpeg.tools] Error starting FFmpeg.
● home-assistant.service - Home Assistant (DietPi)
Loaded: loaded (/etc/systemd/system/home-assistant.service; disabled; vendor preset: enabled)
Active: active (running) since Fri 2022-02-04 18:28:54 GMT; 32s ago
Main PID: 64734 (hass)
Tasks: 12 (limit: 2198)
CPU: 23.172s
CGroup: /system.slice/home-assistant.service
└─64734 /home/homeassistant/.pyenv/versions/3.9.9/bin/python3.9 /home/homeassistant/.pyenv/versions/3.9.9/bin/hass -c /mnt/dietpi_userdata/homeassistant
Feb 04 18:29:15 DietPi homeassistant[64734]: File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.9/site-packages/haffmpeg/core.py", line 136, in open
Feb 04 18:29:15 DietPi homeassistant[64734]: self._proc = await self._loop.run_in_executor(None, proc_func)
Feb 04 18:29:15 DietPi homeassistant[64734]: File "/home/homeassistant/.pyenv/versions/3.9.9/lib/python3.9/concurrent/futures/thread.py", line 58, in run
Feb 04 18:29:15 DietPi homeassistant[64734]: result = self.fn(*self.args, **self.kwargs)
Feb 04 18:29:15 DietPi homeassistant[64734]: File "/home/homeassistant/.pyenv/versions/3.9.9/lib/python3.9/subprocess.py", line 951, in __init__
Feb 04 18:29:15 DietPi homeassistant[64734]: self._execute_child(args, executable, preexec_fn, close_fds,
Feb 04 18:29:15 DietPi homeassistant[64734]: File "/home/homeassistant/.pyenv/versions/3.9.9/lib/python3.9/subprocess.py", line 1821, in _execute_child
Feb 04 18:29:15 DietPi homeassistant[64734]: raise child_exception_type(errno_num, err_msg, err_filename)
Feb 04 18:29:15 DietPi homeassistant[64734]: FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'
Feb 04 18:29:15 DietPi homeassistant[64734]: 2022-02-04 18:29:15 WARNING (MainThread) [haffmpeg.tools] Error starting FFmpeg.
After I restart, I get this:
● home-assistant.service - Home Assistant (DietPi)
Loaded: loaded (/etc/systemd/system/home-assistant.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2022-02-04 18:30:27 GMT; 3s ago
Process: 64734 ExecStart=/home/homeassistant/homeassistant-start.sh (code=exited, status=100)
Main PID: 64734 (code=exited, status=100)
CPU: 29.994s
Feb 04 18:30:25 DietPi homeassistant[64734]: <traceback object at 0x7f6f332580>)}
Feb 04 18:30:25 DietPi homeassistant[64734]: {'Corrupt packet received while decoding name from {self.source}': (<class 'zeroconf._exceptions.IncomingDecodeError'>,
Feb 04 18:30:25 DietPi homeassistant[64734]: IncomingDecodeError('Corrupt packet received while decoding name from {self.source}'),
Feb 04 18:30:25 DietPi homeassistant[64734]: <traceback object at 0x7f6f332580>)}
Feb 04 18:30:25 DietPi homeassistant[64734]: {'Corrupt packet received while decoding name from {self.source}': (<class 'zeroconf._exceptions.IncomingDecodeError'>,
Feb 04 18:30:25 DietPi homeassistant[64734]: IncomingDecodeError('Corrupt packet received while decoding name from {self.source}'),
Feb 04 18:30:25 DietPi homeassistant[64734]: <traceback object at 0x7f6f332580>)}
Feb 04 18:30:27 DietPi systemd[1]: home-assistant.service: Main process exited, code=exited, status=100/n/a
Feb 04 18:30:27 DietPi systemd[1]: home-assistant.service: Failed with result 'exit-code'.
Feb 04 18:30:27 DietPi systemd[1]: home-assistant.service: Consumed 29.994s CPU time.
sure - but to check, do you want me to delete the log file before restarting (so you haven’t got dross in it)? Also, do Hou want me to use the journalctl command you posted?
on the initial post you stated about an upgrade of HA. But how does it fit if this was a brand new install? Usually all packages should be up-to-date on a fresh install