Home assistant 404 error Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
pbutterworth
Posts: 2
Joined: Fri Sep 18, 2020 3:22 pm

Home assistant 404 error

Post by pbutterworth »

Hi,

I tried to install Home assistant, the install seems to have worked and HA is running, but if I go to the web UI I get a 404: not found error.

I'm running DietPi v6.32.2 on a RPi 2 Model B.

I looked at the forum, and there was an old thread about this issue from 2019, but I can't find a resolution.

I'm not a total novice user, but am by no mean an expert either!

Any ideas?

Thanks
Paul
User avatar
Joulinar
Posts: 4815
Joined: Sat Nov 16, 2019 12:49 am

Re: Home assistant 404 error

Post by Joulinar »

Hi,

many thanks for your message, what URL you are using to access HA?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
novitibo
Posts: 120
Joined: Mon Feb 29, 2016 5:11 pm

Re: Home assistant 404 error

Post by novitibo »

sudo apt-get install libjpeg-dev zlib1g-dev

Restart HA and after a few minutes it came up…
User avatar
Joulinar
Posts: 4815
Joined: Sat Nov 16, 2019 12:49 am

Re: Home assistant 404 error

Post by Joulinar »

@novitibo
thx for sharing your solution. For me it was enough to perform apt install libjpeg-dev because zlib1g-dev was already present/installed.

Looks like some new dependency that would need to be added to dietpi-software installation process.

EDIT1:
just verified the apt dependency that will be installed by dietpi-software together with HA from

Code: Select all

DEPS_LIST="gcc libc6-dev make zlib1g-dev libbz2-dev libreadline-dev libssl-dev libsqlite3-dev libffi-dev $custom_apt_deps"
zlib1g-dev is already there, I will open PR on Github to add libjpeg-dev as well.

EDIT2:
PR up https://github.com/MichaIng/DietPi/pull/3781/files
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: 3014
Joined: Sat Nov 18, 2017 6:21 pm

Re: Home assistant 404 error

Post by MichaIng »

User avatar
brightwolf
Posts: 6
Joined: Sun Feb 10, 2019 2:51 pm
Location: The Netherlands

Re: Home assistant 404 error

Post by brightwolf »

Hello, I have a similar problem with Home-Assistant on Dietpi. It is running, yet no web interface is available. Netstat tells me nothing is listening on port 8123, which I believe is the port on which it should be listening. I see home assistant running in htop.
I have installed using the dietpi installer, however, the logs in /mnt/dietpi_userdata contain many errors about missing dependencies, for instance:

Code: Select all

Oct 31 16:43:51 BrightPi homeassistant[576]: 2020-10-31 16:43:51 ERROR (MainThread) [homeassistant.setup] Unable to │
│ set up dependencies of tts. Setup failed for dependencies: http                                                     │
│ Oct 31 16:43:51 BrightPi homeassistant[576]: 2020-10-31 16:43:51 ERROR (MainThread) [homeassistant.setup] Setup     │
│ failed for tts: Could not set up all dependencies.                                                                  │
│ Oct 31 16:43:51 BrightPi homeassistant[576]: 2020-10-31 16:43:51 ERROR (MainThread) [homeassistant.setup] Unable to │
│ set up dependencies of history. Setup failed for dependencies: http, recorder                                       │
│ Oct 31 16:43:51 BrightPi homeassistant[576]: 2020-10-31 16:43:51 ERROR (MainThread) [homeassistant.setup] Setup     │
│ failed for history: Could not set up all dependencies.                                                              │
│ Oct 31 16:43:51 BrightPi homeassistant[576]: 2020-10-31 16:43:51 ERROR (MainThread) [homeassistant.setup] Unable to │
│ set up dependencies of zeroconf. Setup failed for dependencies: api                                                 │
│ Oct 31 16:43:51 BrightPi homeassistant[576]: 2020-10-31 16:43:51 ERROR (MainThread) [homeassistant.setup] Setup     │
│ failed for zeroconf: Could not set up all dependencies.                                                             │
│ Oct 31 16:43:51 BrightPi homeassistant[576]: 2020-10-31 16:43:51 ERROR (MainThread) [homeassistant.setup] Unable to │
│ set up dependencies of media_source. Setup failed for dependencies: http                                            │
│ Oct 31 16:43:51 BrightPi homeassistant[576]: 2020-10-31 16:43:51 ERROR (MainThread) [homeassistant.setup] Setup     │
│ failed for media_source: Could not set up all dependencies.                                                         │
│ Oct 31 16:43:58 BrightPi homeassistant[576]: 2020-10-31 16:43:58 ERROR (MainThread) [homeassistant.setup] Setup     │
│ failed for updater: Unable to import component: No module named 'distro'                                            │
│ Oct 31 16:44:19 BrightPi homeassistant[576]: 2020-10-31 16:44:19 ERROR (MainThread) [homeassistant.setup] Setup     │
│ failed for ssdp: Unable to import component: No module named 'defusedxml'                                           │
Have I missed something? How can I resolve from this?
DietPi@Raspberry PI 3B+ running FHEM domotics server

"I have never tried that before, so I think I should definitely be able to do that" - Pippi Longstocking
User avatar
MichaIng
Site Admin
Posts: 3014
Joined: Sat Nov 18, 2017 6:21 pm

Re: Home assistant 404 error

Post by MichaIng »

Please run: systemctl restart home-assistant
It is a known issue that the service fails to install all dependencies on first run, not sure why. See the "IMPORTANT" note on our docs: viewtopic.php?p=10416#p10416
User avatar
brightwolf
Posts: 6
Joined: Sun Feb 10, 2019 2:51 pm
Location: The Netherlands

Re: Home assistant 404 error

Post by brightwolf »

That's the thing, I tried that. But it won't work. This is what I get:
> systemctl restart home-assistant
Failed to connect to bus: No such file or directory
DietPi@Raspberry PI 3B+ running FHEM domotics server

"I have never tried that before, so I think I should definitely be able to do that" - Pippi Longstocking
User avatar
MichaIng
Site Admin
Posts: 3014
Joined: Sat Nov 18, 2017 6:21 pm

Re: Home assistant 404 error

Post by MichaIng »

systemctl needs to be run with root permissions: sudo systemctl restart home-assistant
Shame on systemd to throw such a misleading error message :(.
pbutterworth
Posts: 2
Joined: Fri Sep 18, 2020 3:22 pm

Re: Home assistant 404 error

Post by pbutterworth »

Hi,

For the life of me I cant remember or find the default homeassistant web login detauls. Any ideas anyone?

Managed to reinstall it and got it to show up the web UI.

Thanks
Paul
Post Reply