Home Assistant Community Add-on: UniFi Controller

No errors, but I cannot access the interface, it just forever loads.

It takes some time to start, wouldn’t hurt to update the add-on anyway.

1 Like

Thanks frenck for the work on this add-on been running it for a while to see how it goes.

Have had the usual adopting issues which seem to be rectified with rebooting the AP. Unfortunately since updating dating to 2.0 it won’t launch and the log output is:

Log

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Hass.io Add-on: UniFi Controller v0.2.0
 Manage your UniFi network using a web browser
 From: Community Hass.io Add-ons
 By: Franck Nijhof <[email protected]>
-----------------------------------------------------------
 armhf / Resin OS 2.3.0+rev1 / HA 0.76.0 / SU 126 / stable
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing... 
INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing... 
FATAL: The configured certfile is not found
[cont-init.d] 10-requirements.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
 v0.2.0 / armhf / Resin OS 2.3.0+rev1 / HA 0.76.0 / SU 126 / stable
-----------------------------------------------------------
                Oops! Something went wrong.
 
 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal. 

Running Hass.io on a RPI3 and any pointers would be appreciated. Un-installed and reinstalled with no change.

:tada: Release v0.2.1

Full Changelog

Changed

  • Upgrades base image to v2.1.1

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

The error is in the logs! You have SSL enabled but it can’t find the certificate file specified in the configuration.

thanks frenck, thought I had that set to false, problem solved.:ok_hand:

The default has changed in v0.2.0 :wink:

1 Like

Had the same “cert not found” so I set SSL to false;
Open WebUI opens up https://X:8443/. I assume https is incorrect seeing as SSL is false?
If i remove the “s”, and go to http://X:8443/, I get an empty page with 5 symbols.

Any ideas? :frowning:

EDIT: the page: https://i.imgur.com/piO2WyY.png

UniFi ALWAYS runs with SSL. The disable ssl property disables the use of a custom certificate.

https://x:8443/ never stops loading after accepting “Your connection is not secure” warning

I’ve just upgraded my production system, and cannot reproduce your report. Do you have more information? Maybe errors in the logs?

No idea what I did other than wait a really long time as it’s up now.

Logs gives this warning:
OpenJDK Client VM warning: You have loaded library /usr/lib/unifi/lib/native/Linux/armv7/libubnt_webrtc_jni.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It’s highly recommended that you fix the library with 'execstack -c ', or link it with ‘-z noexecstack’.

Log

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Hass.io Add-on: UniFi Controller v0.2.0
 Manage your UniFi network using a web browser
 From: Community Hass.io Add-ons
 By: Franck Nijhof <[email protected]>
-----------------------------------------------------------
 armhf / HassOS 1.9 / HA 0.75.3 / SU 126 / stable
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing... 
INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing... 
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 50-persist-data.sh: executing... 
[cont-init.d] 50-persist-data.sh: exited 0.
[cont-init.d] 60-ssl.sh: executing... 
Importing keystore /tmp/tmp.qBhGpjUexQ to /usr/lib/unifi/data/keystore...
Warning:
The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using "keytool -importkeystore -srckeystore /usr/lib/unifi/data/keystore -destkeystore /usr/lib/unifi/data/keystore -deststoretype pkcs12".
[cont-init.d] 60-ssl.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
INFO: Starting the UniFi Controller

I’ve updated to version 0.2.0 and now can’t open the controller page anymore. It just keeps loading with a blank page. BTW I’m using the Let’s Encrypt add-on and the certificates are in the /ssl directory.

Am I doing something wrong?

{
  "log_level": "info",
  "ssl": true,
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

Nothing wrong according to the logs, just takes some time to start up and load the page when you open it.

Restarted the add-on and tried 4 times with 15 minutes apart. I hope it doesn’t takes 60 minutes to start and load.

Upgrading to -> v0.2.0 contains a lot of database migrations and may take time (and you can actually destroy your database by restarting every freaking time). Just be patience.

Is it possible to selectively restore the add-on from a hass.io snapshot? I presume the database is included in the backup?
Can I delete or reset the database?

Yes, you can do a partial restore; UniFi should create backups as well (/backups/unifi).

The best method for “resetting” would be un-installing the add-on and re-installing it again.

1 Like

Thank you Frenck! I’ll restore and wait for the migration to finish.

1 Like

Unifi Controller Add-on eating my SD card

I use Hassio and Unifi Add-on on Raspi 3. I noticed I could not update Hassio the other day. I did see a little bit of space on the SD card. When I inserted the SD card into the Linux computer and looked at the large files in it, I saw a total of 25 GB of TMP folders in the Unifi Controller database folder.

I manually deleted the files. I inserted the SD card into Raspi and booted it again. Space was opened on the SD card, but the Unifi WEB UI did not work.

As I waited, I noticed that the place on the SD card was getting smaller. When it came to 99.5%, Unifi Controller WEB UI worked. But I guess that TMP files were created again and my SD card is still full.

How would you recommend solving this problem?