Can not restart / Stop HA (Error: Can't execute restart while a task is in progress

Tags: #<Tag:0x00007f3265cc4130> #<Tag:0x00007f3265cc4068>

Hi Guys,
Setup: (Ubuntu Server 20.04 on Docker)

arch x86_64
chassis desktop
dev false
docker true
docker_version 19.03.13
hassio true
host_os Ubuntu 20.04.1 LTS
installation_type Home Assistant Supervised
os_name Linux
os_version 5.4.0-48-generic
python_version 3.8.5
supervisor 245
version 0.115.6
virtualenv false

I got everything working,except I can not restart / Stop HA. The only way to do it is either restarting the host or the container. Anyone has come across this issue?
Error from ha su logs:

20-10-04 01:37:11 ERROR (MainThread) [supervisor.utils] Can’t execute restart while a task is in progress
20-10-04 01:37:11 ERROR (MainThread) [supervisor.utils.log_format] Type of message is not string - expected string or bytes-like object

Thanks for the help

I managed to solve it! My firewall was blocking HA port, as soon as I allowed the port, and reboot HA, it solved the problem and I can restart now with no issue.

I guess make sure your HA is accessible to outside world. My guess it was the updater process getting stuck.

I have the same issue, with the same environment as Raul_7.
I can’t manage to restart or stop my HA, even with the CLI.
Running ha core restart gives me Error: Unknown error, see supervisor.
Totally stuck here, I have removed my whole HA instance and made a fresh install but the problem persists.

Can you access HA from outside your network? you should still be able to restart HA with Portainer regardless, that is what I was doing before I fixed the issue.

Yes I can access my HA without any problem from the outside.
I don’t have portainer installed, I usally use the docker cli

I have just freshly reinstall HA and the problem is still here despite the default config.
My HA is setup behind a Nginx reverse proxy and accessible from the outside.
Trying to restart it from the UI give me ERROR (MainThread) [supervisor.utils] Can't execute restart while a task is in progress.
Trying to restart it from the cli (ha core restart) give me Error: Unknown error, see supervisor.
Isn’t there a problem with the supervisor 2020.11.0 as this happens since I have upgraded it?

Before reinstalling it from scratch, I tried to rollback on my full snapshot made before the upgrade of the supervisor but the same message ( ERROR (MainThread) [supervisor.utils] Can't execute restart while a task is in progress) . Details of my environment below.

arch amd64
channel stable
machine qemux86-64
docker_version 19.03.12
host_os Ubuntu 20.04 LTS
installation_type Home Assistant Supervised
os_name Linux
os_version 5.4.0-52-generic
python_version 3.8.5
supervisor_version 2020.11.0
core_version 0.117.5
observer_version 2020.10.1
multicast_version 3
cli_version 2020.10.1
audio_version 17
dns_version 2020.11.0