Core not updating, Supervisor logging seems broken, related?

I’m running HA on an RPi4 with 4GB of RAM. OS version is 12.2. Current Core version is 2024.3.3

Trying to troubleshoot why Core will not update, but having issues with the Suervisor log.

(I am currently unable to update core, it just appears not to run, and I am unable to troubleshoot, because it appears something is broken with HA Supervisor. Here’s an example of what my HA Supervisor log looks like:

  File "/usr/src/supervisor/supervisor/bootstrap.py", line 108, in <lambda>
    logging.Formatter.converter = lambda *args: coresys.now().timetuple()
                                                ^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/coresys.py", line 525, in now
    return datetime.now(get_time_zone(self.timezone) or UTC)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/utils/dt.py", line 73, in get_time_zone
    return zoneinfo.ZoneInfo(time_zone_str)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/zoneinfo/_common.py", line 28, in load_data
    header = _TZifHeader.from_file(fobj)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/zoneinfo/_common.py", line 146, in from_file
    raise ValueError("Invalid TZif file: magic not found")
ValueError: Invalid TZif file: magic not found
Call stack:
  File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap
    self._bootstrap_inner()
  File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
Message: 'Starting Home Assistant ghcr.io/home-assistant/raspberrypi4-64-homeassistant with version 2024.3.3'
Arguments: None
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/logging/__init__.py", line 1160, in emit
    msg = self.format(record)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/logging/__init__.py", line 999, in format
    return fmt.format(record)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/logging/__init__.py", line 705, in format
    record.asctime = self.formatTime(record, self.datefmt)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/logging/__init__.py", line 640, in formatTime
    ct = self.converter(record.created)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/bootstrap.py", line 108, in <lambda>
    logging.Formatter.converter = lambda *args: coresys.now().timetuple()
                                                ^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/coresys.py", line 525, in now
    return datetime.now(get_time_zone(self.timezone) or UTC)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/utils/dt.py", line 73, in get_time_zone
    return zoneinfo.ZoneInfo(time_zone_str)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/zoneinfo/_common.py", line 28, in load_data
    header = _TZifHeader.from_file(fobj)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/zoneinfo/_common.py", line 146, in from_file
    raise ValueError("Invalid TZif file: magic not found")
ValueError: Invalid TZif file: magic not found
Call stack:
  File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap
    self._bootstrap_inner()
  File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
Message: 'Wait until Home Assistant is ready'
Arguments: None
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/logging/__init__.py", line 1160, in emit
    msg = self.format(record)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/logging/__init__.py", line 999, in format
    return fmt.format(record)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/logging/__init__.py", line 705, in format
    record.asctime = self.formatTime(record, self.datefmt)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/logging/__init__.py", line 640, in formatTime
    ct = self.converter(record.created)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/bootstrap.py", line 108, in <lambda>
    logging.Formatter.converter = lambda *args: coresys.now().timetuple()
                                                ^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/coresys.py", line 525, in now
    return datetime.now(get_time_zone(self.timezone) or UTC)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/utils/dt.py", line 73, in get_time_zone
    return zoneinfo.ZoneInfo(time_zone_str)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/zoneinfo/_common.py", line 28, in load_data
    header = _TZifHeader.from_file(fobj)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/zoneinfo/_common.py", line 146, in from_file
    raise ValueError("Invalid TZif file: magic not found")
ValueError: Invalid TZif file: magic not found
Call stack:
  File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap
    self._bootstrap_inner()
  File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
Message: 'Home Assistant Core state changed to NOT_RUNNING'
Arguments: None

Is there a way to fix the above issues relating to output a timestamp?

Is the RPi4 connected to the internet (it needs a valid NTP time source)? Is there enough free disk space?

You may need to try:

ha core check
ha core rebuild

You may also need:

ha supervisor repair
ha host reboot

See Home Assistant via the command line

Thanks MaxK

Yes it’s connected to the internet.

I’ve tried to run these a few times but always from Terminal and SSH add-on.

Today I found the Debugging Instructions and was able to SSH remotely into the Home Assistant OS to run your suggested commands again.

What I noticed right off the bat was that the command ran much longer, however while they all completed successfully, the only anomaly is that on

ha host reboot

I get the following output:

Post "http://supervisor/host/reboot": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

Not sure if that is meaningful.

However, none of those steps fixed it.

I am not sure how or what broke it, but ended up fixing it by backing up and restoring to a fresh install.

Wanted to migrate from USB Boot to SD+USB Data drive anyway.

That is always an option when you have good backups :+1:

Also, connecting a keyboard and monitor can save having to SSH remotely and it also allows you to see what is happening on the console.