Failure to Start when updating from 2022.12.8

Just tried to update to 2023.1.0 and now HA wont start.

pi@PiHome:/etc/systemd/system $ sudo systemctl status [email protected]
[email protected] - Home Assistant
Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2023-01-05 18:20:44 GMT; 3s ago
Process: 26951 ExecStart=/srv/homeassistant/bin/hass -c /home/homeassistant/.homeassistant (code=exited, status=1/FAILURE)
Main PID: 26951 (code=exited, status=1/FAILURE)
CPU: 2.321s

searches online return nothing related to a status1 failure with homeassistant. Downgrading to 2022.12.8 which is what i was on before and it starts fine.

Home Assistant Core Running on an RPi4, Bullseye & Python 3.10 in a Virtual Environment

I have a similar setup and it is working fine for me. To be slightly more specific I have Python 3.10.9.
The pip install/upgrade completed successfully for you?
What do you see if you launch hass directly rather than via systemd?

Thanks for the reply.

Yes Im also running 3.10.9.

The pip install command completes without errors. I have changed back and forth a few times between 2022.12.8 and 2023.1 and now 2023.1.1 trying out fixes but iv always managed to downgrade to 2022.12.8 using “pip3 install homeassistant==2022.12.8” command and it starts straight up using systemd.

Ive tried running it directly using the “hass” command in the virtual environment and instead of getting the logging output it just shows a empty command line like it didn’t even attempt to start.

Does it exit or just sit there?
If it exits, what is the exit code (echo $?)?
If it keeps running, is it launching other processes (what does top and/or ps ux show?)?

Iv just ran the update again so I can copy exactly what I get:

This is the end of the update showing the success message and the output I get when running the ‘hass’ command:

Successfully installed attrs-22.1.0 ciso8601-2.3.0 home-assistant-bluetooth-1.9.2 homeassistant-2023.1.1 httpx-0.23.2
(homeassistant) homeassistant@PiHome:/ $ hass
(homeassistant) homeassistant@PiHome:/ $

echo $? gives 1 as its output.

Running htop I see nothing running in terms of home assistant like I do for the working version.

ps ux gives the following output when still in the virtual environment:
(homeassistant) homeassistant@PiHome:/ $ ps ux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
homeass+ 6102 0.0 0.0 8620 3828 pts/0 S 16:21 0:00 bash
homeass+ 6169 0.0 0.0 10860 2648 pts/0 R+ 16:28 0:00 ps ux

And this when outside:
pi@PiHome:~ $ ps ux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
pi 5377 0.0 0.1 14412 7592 ? Ss 15:51 0:00 /lib/systemd/systemd --user
pi 5379 0.0 0.0 37316 3564 ? SN 15:51 0:00 (sd-pam)
pi 5396 0.0 0.1 14528 4420 ? R 15:51 0:00 sshd: pi@pts/0,pts/1
pi 5401 0.0 0.0 8664 3820 pts/0 Ss 15:51 0:00 -bash
pi 6139 0.0 0.0 8664 3832 pts/1 Ss 16:25 0:00 -bash
pi 6152 3.7 0.0 11252 2976 pts/1 T 16:25 0:04 top
pi 6154 2.1 0.0 9232 3640 pts/1 T 16:25 0:01 htop
pi 6164 0.0 0.0 10860 2620 pts/1 R+ 16:27 0:00 ps ux

Just done some more searching and if I run “hass --safe-mode” then it does run and I can access the WebUI but there is nothing in the logs

The top/ps check was to find out what it is doing if it was still running.
But it exits with nothing but code 1. That is weird and unhelpful - it usually logs something.
e.g. I get

2023-01-09 06:47:56.464 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration ...

etc almost immediately on running hass.
Do you have any custom_components? If so perhaps hide them.
Else try a fresh install rather than an upgrade?
(grasping at straws here)

Yeah that’s the problem I was having. Code 1 being entirely unhelpful lol

Ill try moving the custom components folder. There’s only a few in there HACS and a couple installed through that.

Something else to try is enabling debug logging - that may provide some clue as to what is going on.

Is that set in the configuration.yaml or the --debug command line option as the command line option still wouldnt start and all the logs were still blank.

What I had in mind was adding

logger:
  default: debug

to your config.

And have you checked the release notes for any relevant breaking changes? I don’t see anything obvious there, but it is worth a look…

Only just got round to testing this. Logging set to debug and I renamed the custom components folder in case one was causing issues. No Change, still getting “(code=exited, status=1/FAILURE)”

Nothing in the log files and nothing appears in top comand.

Have you tried a clean install?

Thats my next task. Will update when done

Nope. Fresh Virtual environment did not work. I can try a fresh OS install but that would take a number of things offline for a while as I have no Spare Pi to build a replacement SD Card

To anyone who finds this. Was unable to find a fix so setup a new SD card using another RPi and then just swapped it out. So the only way I could fix this was with a fresh install on a fresh OS.