Dear all,
this is my first post in this forum, so I hope I describe the problem well. If not, let me know.
My computer: Raspberry 4, 4GB on a 64GB SD card
I installed a fresh yunohost version 4.3.6.2 (stable). I created a domain, installed nextcloud on this domain and it works.
I created a subdomain (CNAME to this main domain). I installed Home Assistant on this subdomain. Then I updated Home Assistant to version 2022.2.9~ynh1.
If I try to open the Home Assistant Gui, I get the failure “Bad Gateway 502 Nginx”.
I checked the nginx.conf and also the homeassistant.conf. I opened also the port 8123 on my fritz box.
When I start the diagnosys, it says that the port 8123 is not available from outside (checked this also on dnstools.ch). Also I cannot connect internal to the home assistant (tried with telnet from my windows computer). The port is open (test with: sudo yunohost firewall reload):
Hi,
there are a lot of entries. But I cannot read this. Sorry I am a newbie.
The log:
admin@yunohost:~ $ sudo yunohost service log homeassistant
/var/log/homeassistant/homeassistant.log:
2022-02-20 09:34:38 ERROR (MainThread) [homeassistant.setup] Setup failed for cloud: Unable to import component: libffi.so.7: cannot open shared object file: No such file or directory
2022-02-20 09:34:38 ERROR (MainThread) [homeassistant.setup] Setup failed for updater: Unable to import component: libffi.so.7: cannot open shared object file: No such file or directory
2022-02-20 09:34:39 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of my. Setup failed for dependencies: frontend
2022-02-20 09:34:39 ERROR (MainThread) [homeassistant.setup] Setup failed for my: (DependencyError(…), ‘Could not setup dependencies: frontend’)
2022-02-20 09:34:39 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of map. Setup failed for dependencies: frontend
2022-02-20 09:34:39 ERROR (MainThread) [homeassistant.setup] Setup failed for map: (DependencyError(…), ‘Could not setup dependencies: frontend’)
2022-02-20 09:34:39 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of logbook. Setup failed for dependencies: frontend
2022-02-20 09:34:39 ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: (DependencyError(…), ‘Could not setup dependencies: frontend’)
2022-02-20 09:34:39 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.hassio. Make sure all dependencies are installed
Traceback (most recent call last):
File “/var/www/homeassistant/lib/python3.9/site-packages/homeassistant/loader.py”, line 687, in _load_file
module = importlib.import_module(path)
File “/usr/local/lib/python3.9/importlib/init.py”, line 127, in import_module
File “/var/www/homeassistant/lib/python3.9/site-packages/homeassistant/components/hassio/init.py”, line 50, in
from .auth import async_setup_auth_view
File “/var/www/homeassistant/lib/python3.9/site-packages/homeassistant/components/hassio/auth.py”, line 12, in
from homeassistant.auth.providers import homeassistant as auth_ha
File “/var/www/homeassistant/lib/python3.9/site-packages/homeassistant/auth/providers/homeassistant.py”, line 10, in
import bcrypt
File “/var/www/homeassistant/lib/python3.9/site-packages/bcrypt/init.py”, line 25, in
from . import _bcrypt
ImportError: libffi.so.7: cannot open shared object file: No such file or directory
2022-02-20 09:34:39 ERROR (MainThread) [homeassistant.setup] Error during setup of component usb
Traceback (most recent call last):
File “/var/www/homeassistant/lib/python3.9/site-packages/homeassistant/setup.py”, line 227, in _async_setup_component
result = await task
File “/var/www/homeassistant/lib/python3.9/site-packages/homeassistant/components/usb/init.py”, line 97, in async_setup
await usb_discovery.async_setup()
File “/var/www/homeassistant/lib/python3.9/site-packages/homeassistant/components/usb/init.py”, line 128, in async_setup
await self._async_start_monitor()
File “/var/www/homeassistant/lib/python3.9/site-packages/homeassistant/components/usb/init.py”, line 139, in _async_start_monitor
info = await system_info.async_get_system_info(self.hass)
File “/var/www/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/system_info.py”, line 22, in async_get_system_info
"hassio": hass.components.hassio.is_hassio(),
File “/var/www/homeassistant/lib/python3.9/site-packages/homeassistant/loader.py”, line 762, in getattr
raise ImportError(f"Unable to load {comp_name}")
ImportError: Unable to load hassio
2022-02-20 09:34:39 ERROR (MainThread) [homeassistant.setup] Setup failed for mobile_app: Unable to import component: libffi.so.7: cannot open shared object file: No such file or directory
2022-02-20 09:34:39 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of default_config. Setup failed for dependencies: cloud, frontend, logbook, map, mobile_app, my, usb, updater
2022-02-20 09:34:39 WARNING (MainThread) [homeassistant.bootstrap] Detected that frontend did not load. Activating safe mode
2022-02-20 09:34:39 ERROR (MainThread) [homeassistant.auth.providers] Unable to load auth provider homeassistant: libffi.so.7: cannot open shared object file: No such file or directory
2022-02-20 09:34:39 ERROR (MainThread) [homeassistant.bootstrap] Home Assistant core failed to initialize. Further initialization aborted
journalctl:
– Logs begin at Fri 2022-02-18 17:20:23 GMT, end at Sun 2022-02-20 14:47:11 GMT. –
Feb 18 17:20:41 systemd[1]: Started Home Assistant.
Feb 20 09:32:20 systemd[1]: Stopping Home Assistant…
Feb 20 09:32:31 systemd[1]: homeassistant.service: Succeeded.
Feb 20 09:32:31 systemd[1]: Stopped Home Assistant.
Feb 20 09:34:17 systemd[1]: Started Home Assistant.
Feb 20 09:34:24 systemd[1]: homeassistant.service: Current command vanished from the unit file, execution of the command list won’t be resumed.
Feb 20 09:34:24 systemd[1]: Stopping Home Assistant…
Feb 20 09:34:35 systemd[1]: homeassistant.service: Succeeded.
Feb 20 09:34:35 systemd[1]: Stopped Home Assistant.
Feb 20 09:34:35 systemd[1]: Started Home Assistant.
admin@yunohost:~ $
Hi,
after reading the log more carefully I found out the problem is python 3.9.
Therefore I needed to install the libff7.so manually.
I used the following commands:
wget “https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz”
tar zxf libffi-3.3.tar.gz
cd libffi-3.3
./configure
sudo make install
sudo ldconfig
Now it works fine!
Thanks to ewilly with the service.log command. You helped me a lot!!!