Restart from UI doesn't work


I’m using HASS 2022.7.5 in Ubuntu 20.04 with virtualenv
I can restart home-assistant perfectly from command line:
sudo service home-assistant restart

but it doesn’t restart from web gui. I verified the configuration and it seems that is ok.
I haven’t found any error in the logs, I don’t know where is the problem…

Thanks in advance!