I have an ancient neglected but working install of the Unifi Controller (addon version 0.18.1). I’m trying to migrate/upgrade but am running into problems. I’d like to avoid having to start over from scratch.
(The reason it is such an old installation is because it was originally installed on an RPI with a 32 bit OS so the version got stuck after updates were only for 64 bit OS. Currently I’ve got 0.18.1 running controller version 5.14.23 on an x86_64 VirtualBox VM, supervisor 2024.03.0, core is 2024.2.5.)
The first thing I’m trying to figure out is where are the logs?
I’ve got log-level set to debug. I’m not seeing anything beyond the start up info in the addon logs.
In the controller/site page, I’ve got remote syslog enabled, but I’m only getting syslog messages from the APs and not the controller.
If I docker exec to shell inside the addon container, I don’t see any obvious log files.
Thanks in advance for any help.
EDIT/UPDATE - I did finally see by using journalctl on the HaOS host that mongodb was dumping core as a result of a SIGABRT (6) during process of restoring a Unifi 90 day manual backup from my 0.18.1 install to a fresh 3.0.3 install on another VirtualBox VM.
Mar 16 19:40:06 hasstst audit[34158]: ANOM_ABEND auid=4294967295 uid=0 gid=0 ses=4294967295 subj=docker-default pid=34158 comm="conn2" exe="/usr/bin/mongod" sig=6 res=1
Mar 16 19:40:06 hasstst kernel: audit: type=1701 audit(1710618006.104:1370): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=docker-default pid=34158 comm="conn2" exe="/usr/bin/mongod" sig=6 res=1
Mar 16 19:40:06 hasstst systemd-coredump[34460]: Process 34158 (mongod) of user 0 dumped core.
Mar 16 19:40:06 hasstst systemd[1]: [email protected]: Deactivated successfully.
EDIT/UPDATE - I haven’t found how to get more logging from the Java process, though I have occasionally seen a message in the addon log when the Java process dies.
However the log for MongoDB is inside the container /var/log/unifi/mongod.log
. Have gotten some clues looking at that file.
EDIT/UPDATE - I did successfully get the controller addon moved and upgraded.
-
Trying to use an addon backup to move/copy the existing 0.18.1 install to a test Home Assistant instance in order to try to do a test upgrade there failed. While Supervisor did install the 0.18.1 container there was something wrong that prevented the web app from starting/deploying correctly. I couldn’t find any clues as to why. (My guess is the changes to supervisor/addon file locations since the 0.18.1 addon might be a cause.)
-
Doing a unifi app backup from 0.18.1 and restoring to a fresh 3.0.3 install eventually worked. I had to limit the number of days of history in the backup or mongodb would crash (SIGABORT) doing the restore. I don’t know if that is due to running out of memory or there is corruption in my original database. I did wind up bumping the addon’s optional setting for max memory that set Java’s max memory to 2GB. But that only affects the Unifi web app, not necessarily Mongod.
I did get an exception thrown from Java as it was completely the restore, but it seemed to work fine after that:
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: destroy called
Exception in thread "Thread-8" java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:168)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1172)
at com.ubnt.service.C.Ö00000(Unknown Source)
at com.ubnt.ace.Launcher.Ö00000(Unknown Source)
at java.base/java.lang.Thread.run(Thread.java:840)