Home Assistant throws 404 after upgrading to 107.x

Not sure if this is the right forum for this, but “Installation” comes closest to “Upgrading” I think :slight_smile:

Anyways, every time I upgrade from my latest 106 version to 107.x (any sub-version so far, doesn’t matter) I’m always greeted with a 404 page after the upgrade ran through. All the Docker containers come up in the background and I can also access the SMB share, but I can neither access Lovelace nor the /config or any other page. Always throws a 404 error.

I’ve monitored the home-assistant.log while upgrading and the only non-debug mode error it threw was this:

2020-03-21 15:41:35 ERROR (MainThread) [coap] Exception CancelledError() can not be represented as errno, setting -1.
2020-03-21 15:41:35 WARNING (zeroconf-Engine) [zeroconf] Exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/zeroconf/__init__.py", line 1245, in handle_read
    data, (addr, port, *_v6) = socket_.recvfrom(_MAX_MSG_ABSOLUTE)
OSError: [Errno 9] Bad file descriptor

I’m not even sure if this has anything to do with the upgrade itself, however when restarting HA after that it’ll never throw this error again, so I kind of guess it does? Hope that error tells you guys way more than it does to me :slight_smile:

Anyways, any suggestions on how I can debug this? I’ve already tried a few things such as checking the hypervisor logs with @cogneato yet they didn’t say anything specific that’d be the issue either, at least back then. The only exception we saw there had something to do with Websocket but apparently it isn’t the issue.

Thanks a ton already!

Is there anyting running on port 8123?

Well the Lovelace interface should come up, instead if just comes back with a “404”… So yes something is coming up, just not what should :slight_smile:

How about posting your log then.

TLDR: Have you definitely got either default_config: or frontend: defined in your configuration.yaml?

I’ve been having the same problem, everything worked fine in 106 but upgrading to 107.X failed to start the web interface, just showed 404 Not found error when I tried to access it. All the logs looked good, no (related) errors.

It turns out that at some point in the past I had got rid of the default_config: entry in my configuration.yaml (which defines a whole bunch of useful things to get you started https://www.home-assistant.io/integrations/default_config/ and only added back in some of the things that it includes, I think in an attempt to hide the maps entry on the sidebar. One of the things that I hadn’t re-added was frontend:. For some reason the frontend was still working (this is the bit I don’t understand), it should have broken at that point…

Adding frontend: to the config fixed it for me (either before or after the upgrade). Looking through the logs showed no errors because everything was actually working as expected, it’s just that I had told it not to run the frontend! :slight_smile:

2 Likes

Wow, that was it… And I’ve already started to setup a new Home Assistance instance…

Thanks a ton man! Yeah I removed it cause it didn’t seem necessary to me, didn’t realize that it has so much stuff in the background going on.

Glad to be of service :slight_smile:

I know this was marked as a solution, however I have the exact same zeroconf warning in my logs… but I do have frontend: in my config. I don’t have any 404 errors though.

Hi truglodite, I think the errors in EpicLPer’s logs were not actually related to the 404 issue that is the subject of this thread. It sounds like your symptoms are different too. If you haven’t already, it’s worth starting a new thread with a complete description of your problem, you’ll get more help that way.

I have a 404: Not Found error because I deleted default_config in my configuration.yaml file.
How can I access my configuration.yaml file to solve my error

thank you in advance for your feedback

Do you have ssh or samba access ?

no I don’t have access to samba :frowning:

If you don’t have access to ssh or samba, it is difficult.

  • if it is a Pi with a SD card, put the sd card in a Linux pc (or boot with a Linux Live USB stick) to edit configuration.yaml
  • if it is a VM, mount the disk in another vm to edit configuration.yaml

I have installed home assistant on docker

If it is not HA OS, but pure docker, you can just edit configuration.yaml with any linux editor (nano, vim, …) in the directory you specified when installing in docker.

1 Like

thank you for your help