Home assistant fatal error Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
sfh1975
Posts: 14
Joined: Sun Nov 03, 2019 12:22 pm

Re: Home assistant fatal error

Post by sfh1975 »

Joulinar wrote: Mon Jun 21, 2021 1:13 pm simply copy the output from your SSH terminal
Its RPi 4 Model B and dietpi v7.2.3
Just finished reinstall with same error. Please check the attachment.
Many thanks.
Attachments
install.txt
(21.46 KiB) Downloaded 11 times
User avatar
Joulinar
Posts: 5149
Joined: Sat Nov 16, 2019 12:49 am

Re: Home assistant fatal error

Post by Joulinar »

can you do a reboot and share following

Code: Select all

journalctl -u home-assistant.service
ls -la /home/homeassistant/
is following working

Code: Select all

cd /home/homeassistant/.homeassistant
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
sfh1975
Posts: 14
Joined: Sun Nov 03, 2019 12:22 pm

Re: Home assistant fatal error

Post by sfh1975 »

Joulinar wrote: Mon Jun 21, 2021 2:42 pm can you do a reboot and share following

Code: Select all

journalctl -u home-assistant.service
ls -la /home/homeassistant/
is following working

Code: Select all

cd /home/homeassistant/.homeassistant
Yes, sure.

Code: Select all

root@DietPi:~# journalctl -u home-assistant.service
-- Logs begin at Thu 2019-02-14 21:11:58 AEDT, end at Mon 2021-06-21 23:51:25 AEST. --
Jun 21 23:51:02 DietPi systemd[1]: Started Home Assistant (DietPi).
Jun 21 23:51:12 DietPi homeassistant[977]: Fatal Error: Specified configuration directory /mnt/dietpi_userdata/homeassistant does not exist
Jun 21 23:51:12 DietPi systemd[1]: home-assistant.service: Main process exited, code=exited, sta
tus=1/FAILURE
Jun 21 23:51:12 DietPi systemd[1]: home-assistant.service: Failed with result 'exit-code'.

Code: Select all

root@DietPi:~# ls -la /home/homeassistant/
total 32
drwxr-xr-x  4 homeassistant homeassistant 4096 Jun 21 21:38 .
drwxr-xr-x  5 root          root          4096 Jun 21 21:22 ..
drwxr-xr-x  3 homeassistant homeassistant 4096 Jun 21 21:30 .cache
lrwxrwxrwx  1 root          mediamgmt       34 Jun 21 21:38 .homeassistant -> /mnt/dietpi_userdata/homeassistant
-rwxr-xr-x  1 root          mediamgmt      102 Jun 21 21:38 homeassistant-start.sh
-rwxr-xr-x  1 root          mediamgmt      125 Jun 21 21:38 homeassistant-update.sh
drwxrwxr-x 12 homeassistant homeassistant 4096 Jun 21 21:23 .pyenv
-rw-r--r--  1 root          mediamgmt      311 Jun 21 21:23 pyenv-activate.sh
-rw-r--r--  1 homeassistant homeassistant    7 Jun 21 21:30 .python-version

Code: Select all

root@DietPi:/home/homeassistant/.homeassistant# ls -la
total 8
drwxr-xr-x  2 homeassistant homeassistant 4096 Jun 21 19:55 .
drwxrwx--- 15 dietpi        dietpi        4096 Jun 21 19:55 ..
sfh1975
Posts: 14
Joined: Sun Nov 03, 2019 12:22 pm

Re: Home assistant fatal error

Post by sfh1975 »

Any ideas folks? :)
User avatar
Joulinar
Posts: 5149
Joined: Sat Nov 16, 2019 12:49 am

Re: Home assistant fatal error

Post by Joulinar »

@MichaIng
any idea how it could happen that an existing directory /mnt/dietpi_userdata/homeassistant is not detected correctly? :?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3106
Joined: Sat Nov 18, 2017 6:21 pm

Re: Home assistant fatal error

Post by MichaIng »

I think the issue is access permissions here, as the homeassistant user is not member of the dietpi group and the userdata dir has 770 mode. Try to solve it via:

Code: Select all

chmod +x /mnt/dietpi_userdata
A bit misleading error message of HA.
sfh1975
Posts: 14
Joined: Sun Nov 03, 2019 12:22 pm

Re: Home assistant fatal error

Post by sfh1975 »

MichaIng wrote: Tue Jun 22, 2021 2:00 pm I think the issue is access permissions here, as the homeassistant user is not member of the dietpi group and the userdata dir has 770 mode. Try to solve it via:

Code: Select all

chmod +x /mnt/dietpi_userdata
A bit misleading error message of HA.
Thanks a lot @MichaIng and @Joulinar This seems to have fixed it and I am now in the process of slowly setting it up. Yes my permissions are a mess as over the years, I have followed advice from different sources. Don't know how to revert back to standard permissions but may be that's something for the future :)
Thanks again for your help and support and keep up the good work!!!
User avatar
Joulinar
Posts: 5149
Joined: Sat Nov 16, 2019 12:49 am

Re: Home assistant fatal error

Post by Joulinar »

good it is solved now.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3106
Joined: Sat Nov 18, 2017 6:21 pm

Re: Home assistant fatal error

Post by MichaIng »

Great. Yeah something to keep in mind: When any non-root user wants to access a file, it requires at least execute permissions for every directory and sub directory down to that file. So to access /a/b/c/d/file, execute permissions are required for /, /a, /a/b, /a/b/c and /a/b/c/d. So if a directory is not world-executable, most users are not able to see or access anything inside.
sfh1975
Posts: 14
Joined: Sun Nov 03, 2019 12:22 pm

Re: Home assistant fatal error

Post by sfh1975 »

MichaIng wrote: Thu Jun 24, 2021 12:20 pm Great. Yeah something to keep in mind: When any non-root user wants to access a file, it requires at least execute permissions for every directory and sub directory down to that file. So to access /a/b/c/d/file, execute permissions are required for /, /a, /a/b, /a/b/c and /a/b/c/d. So if a directory is not world-executable, most users are not able to see or access anything inside.
Thanks a lot MichIng and sorry for the late response. I ended up running HA on its own RPi as the version on offer within Dietpi is limited. Thanks for your help anyway :)
Post Reply