Supervisor keeps going "unheathly" - dropping out from being privileged(?)

That’s quite interesting. It’s unfortunate it likes to do this to itself now. But thanks for the heads up on the restart.

Maybe this is a real issue or bug in supervisor? Why would supervisor give itself an auto unhealthy status on update? Does it happen on Debian, an “officially” supported OS? If so, that is a bug that can be reported.

I was “forced” to use Ubuntu because Debian Server wasn’t installing on my NUC. I may look back at it again at some point. I just hate the idea of reformatting everything. I have HA and Plex on this box. It would require rebuilding Plex again as well (all my media is on my NAS, not on this box).

The problem isn’t people asking, it’s that they’re never happy with the answer :wink:

3 Likes

Short answer: No.

Originally I was using Ubuntu 18.04 and, after months of quiet operation, received the ‘Unhealthy’ warning. Initially a reboot would clear the message but only temporarily. The root cause (for me) was an outdated version of Network Manager and upgrading to Ubuntu 20.04 fixed it.

I realized there would probably be other issues like this in the future. I don’t care for this game of ‘whack-a-mole’ so I acquired an SSD and re-installed Home Assistant Supervised on the officially supported Linux distro: Debian 10.

Now both the ‘unhealthy’ and ‘unsupported’ messages are gone.

It’s useful to recall how we got here. Originally, the development team wanted to deprecate Home Assistant Supervised; no official support for it at all. They were under the mistaken impression that very few people used it and so the resources to support it could be directed elsewhere.

The community objected and the compromise was that only one Linux distro would be supported (Debian) and no others (not even derivatives of Debian). That’s certainly better than nothing at all.

Requests to expand support for other distros are not likely to be fulfilled unless someone is hired by Nabu Casa to support it or volunteers step forward to (permanently) fill the void. So far (since last spring) neither has happened.

If I were in Paulus’ position, I believe additional employees would provide more value to the community if they focused on enhancing the core product as opposed to supporting more Linux distros.

2 Likes

Debian is the father of Ubuntu, so you should not need to learn much. Most of the command will be almost identical. The different is in standard package which I think Ubuntu have much more bleading-edge version compare to stable version on Debian.

So much recommended to run HA from Debian.

I also find out that adding watchtower into the docker running HA + supervisor will cause unhealthy status. So be sure to get rid of it.

1 Like

NUC should be able to run Debian without any problem? Strange that it wont run on it.

1 Like

I agree. I can’t recall the issues I had, but I do know I had trouble with the installs finishing. It’s an HP 800-G2, with an i5-6500T. I may give it another shot here at some point.

Note: it is labeled as a “Mini Desktop” - I’ve been calling it an NUC. /shrug

I’m there with you. I’ve been contemplating that for a few months now as well.

I get it. And I understand this approach. It’s unfortunately they didn’t decide to use the more widely used Ubuntu over Debian. Maybe it’s due to the increased speed of Ubuntu development? More Ubuntu updates will mean more possible support issues? Debian definitely updates slower, but it is more “industrial” than Ubuntu. I’m not entirely certain their logic, but I’m at least happy they opted to keep HA Supervisor.

I don’t even know if installing HassIO is even an option on this HP 800-G2 “mini-desktop.” I only use it for HA and Plex.

I think ‘more widely used’ is an accurate statistic, but doesn’t represent the situation as well as one would hope. Many years ago Ubuntu was considered to be Debian for noobs, and was basically a debian base with lots of bells and whistles on top to make a ‘nice’ desktop experience.

Obviously that division is relegated to the history books and they’re more independent entities, but as you observe the ‘increased speed of development’ is a sort of side effect of its original bells and whistles approach.

This makes it hard for developers that rely on many factors of a stable backend system to keep up.

Debian is therefore (I suspect, I wasn’t involved in the decision making at all) the better choice because the effort involved in keeping up with the host system is reduced, and if the majority of your users are on debian or a derivative (such as Ubuntu, and their subsequent derivatives such as Mint) then there is no real learning curve for them, just the one off inconvenience of moving from the one base OS to the other.

As a further note, even Debian being supported has it’s caveats.

I bet it will be a bios setting. There was one on the nuc about official operating systems that installing Debian would fail. Only Ubuntu would work. That changed with stretch I think. You should be ok now.

Just take a snapshot and restore it and you will probably not notice any difference.

Debian as default run UFW (firewall) so you need to be sure that ufw being setup properly else you will certainly fail running HA. Ubuntu in other hand skip UFW unless you install it.

My issue was installing the OS, never even got to that part yet. :wink:

Now that’s interesting. Huh, it may very well have been this. Thanks. I’ll give this a shot when I get some free time and when my family isn’t using my Plex server. :rofl:

I always thought that was an ubuntu extra. Never configured UFW on Debian, and I have quite a few Debians at home.

Well… I believe ufw run at default on Debian 10.7 or at least on Debian 10.7 for raspberry

@samnewman86 and @DavidFW1960

I installed Debian on the machine and HA does seem to work a lot better!

1 Like

FYI, I put everything under Debian a while back and it worked well for a while, but now it’s happening again. Just randomly, it goes into unprivileged state, forcing me to restart the container. It’s happening on two instances – remote and local.

Thank you for this solution. However, does this mean this restart needs to be done after every autoupdate? I have been running Home Assistant for almost 4 years now on Debian, without any significant repair needs like this. After the recent HA update, I now have this issue almost weekly. This is a downer to be honest. It will throw off people for sure who don’t want this kind of hassle. But for me, I just like a permanent resolution. Is there another way to fix this permanently?

I’ve come up with an automated way to restart only if the system is unhealthy.

It’s an ugly wokraround, but it seems nobody has figured out the root cause for this to happen.

Run sudo crontab -u root -e to edit crontab as root:

Add the following line so that every 0, 23 or 46 of the hour check the logs and if supervisor started uhhealthy, restart the systemd service unit:

0/23 * * * * docker logs hassio_supervisor 2>&1 | grep -q "System is running in an unhealthy state and needs manual intervention!" && systemctl restart hassio-supervisor.service

This allows me to have a healthy working system in the short term. Where it will remain in an unhealthy state only for a short period of time (a maximum of ~23 mins).

CAVEAT: If the reason it’s unhealthy is different, and a restart doesn’t help, it will restart the supervisor everytime cron runs the command

The unhealthy message stays in the log, triggering a supervisor restart every time the command is executed (my current logs still contain the message from 3 days ago)

Now I’m using:

docker logs --since 15m hassio_supervisor 2>&1 | grep -q 'System is running in an unhealthy state and needs manual intervention!' && { systemctl restart hassio-supervisor.service; curl "url-to-trigger-notification-via-home-assistant"; }

(The notification trigger at the end is for me to know when it happened)

I also regularly have the unhealthy unprivileged issue since Nov 2023. Really annoying