Solved Cant upgrade to latest Unifi7 port.

I have unifi7-7.3.83 installed and if I try to upgrade to 7.3.83_2 I get this from the mongodb log file ( /usr/local/share/java/unifi/logs/mongod.log ):

Code:
{"t":{"$date":"2023-03-25T14:07:50.032+01:00"},"s":"I",  "c":"CONTROL",  "id":20698,   "ctx":"main","msg":"***** SERVER RESTARTED *****"}
{"t":{"$date":"2023-03-25T14:07:50.035+01:00"},"s":"I",  "c":"CONTROL",  "id":23285,   "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
{"t":{"$date":"2023-03-25T14:07:50.041+01:00"},"s":"I",  "c":"NETWORK",  "id":4648602, "ctx":"main","msg":"Implicit TCP FastOpen in use."}
{"t":{"$date":"2023-03-25T14:07:50.042+01:00"},"s":"I",  "c":"STORAGE",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":47558,"port":27117,"dbPath":"/usr/local/share/java/unifi/data/db","architecture":"64-bit","host":"unifi.local"}}
{"t":{"$date":"2023-03-25T14:07:50.042+01:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"4.4.18","gitVersion":"8ed32b5c2c68ebe7f8ae2ebe8d23f36037a17dea","openSSLVersion":"OpenSSL 1.1.1q-freebsd  5 Jul 2022","modules":[],"allocator":"system","environment":{"distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2023-03-25T14:07:50.042+01:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"FreeBSD","version":"FreeBSD 12.4-RELEASE-p1 GENERIC\n"}}}
{"t":{"$date":"2023-03-25T14:07:50.042+01:00"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"bindIp":"127.0.0.1","port":27117,"unixDomainSocket":{"pathPrefix":"/usr/local/share/java/unifi/run"}},"processManagement":{"pidFilePath":"/usr/local/share/java/unifi/run/mongod.pid"},"storage":{"dbPath":"/usr/local/share/java/unifi/data/db","wiredTiger":{"engineConfig":{"configString":"cache_size=256M"}}},"systemLog":{"destination":"file","logAppend":true,"logRotate":"reopen","path":"/usr/local/share/java/unifi/logs/mongod.log"}}}}
{"t":{"$date":"2023-03-25T14:07:50.043+01:00"},"s":"I",  "c":"STORAGE",  "id":22270,   "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/usr/local/share/java/unifi/data/db","storageEngine":"wiredTiger"}}
{"t":{"$date":"2023-03-25T14:07:50.043+01:00"},"s":"I",  "c":"STORAGE",  "id":22315,   "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=24000M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress,compact_progress],cache_size=256M"}}
{"t":{"$date":"2023-03-25T14:07:53.016+01:00"},"s":"W",  "c":"STORAGE",  "id":22347,   "ctx":"initandlisten","msg":"Failed to start up WiredTiger under any compatibility version. This may be due to an unsupported upgrade or downgrade."}
{"t":{"$date":"2023-03-25T14:07:53.016+01:00"},"s":"F",  "c":"STORAGE",  "id":28595,   "ctx":"initandlisten","msg":"Terminating.","attr":{"reason":"45: Operation not supported"}}
{"t":{"$date":"2023-03-25T14:07:53.016+01:00"},"s":"F",  "c":"-",        "id":23091,   "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":28595,"file":"src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp","line":958}}
{"t":{"$date":"2023-03-25T14:07:53.016+01:00"},"s":"F",  "c":"-",        "id":23092,   "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}

{"t":{"$date":"2023-03-25T14:07:57.195+01:00"},"s":"I",  "c":"CONTROL",  "id":20698,   "ctx":"main","msg":"***** SERVER RESTARTED *****"}
{"t":{"$date":"2023-03-25T14:07:57.197+01:00"},"s":"I",  "c":"CONTROL",  "id":23285,   "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
{"t":{"$date":"2023-03-25T14:07:57.216+01:00"},"s":"I",  "c":"NETWORK",  "id":4648602, "ctx":"main","msg":"Implicit TCP FastOpen in use."}
{"t":{"$date":"2023-03-25T14:07:57.217+01:00"},"s":"I",  "c":"STORAGE",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":47560,"port":27117,"dbPath":"/usr/local/share/java/unifi/data/db","architecture":"64-bit","host":"unifi.local"}}
{"t":{"$date":"2023-03-25T14:07:57.217+01:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"4.4.18","gitVersion":"8ed32b5c2c68ebe7f8ae2ebe8d23f36037a17dea","openSSLVersion":"OpenSSL 1.1.1q-freebsd  5 Jul 2022","modules":[],"allocator":"system","environment":{"distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2023-03-25T14:07:57.217+01:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"FreeBSD","version":"FreeBSD 12.4-RELEASE-p1 GENERIC\n"}}}
{"t":{"$date":"2023-03-25T14:07:57.217+01:00"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"bindIp":"127.0.0.1","port":27117,"unixDomainSocket":{"pathPrefix":"/usr/local/share/java/unifi/run"}},"processManagement":{"pidFilePath":"/usr/local/share/java/unifi/run/mongod.pid"},"storage":{"dbPath":"/usr/local/share/java/unifi/data/db","wiredTiger":{"engineConfig":{"configString":"cache_size=256M"}}},"systemLog":{"destination":"file","logAppend":true,"logRotate":"reopen","path":"/usr/local/share/java/unifi/logs/mongod.log"}}}}
{"t":{"$date":"2023-03-25T14:07:57.218+01:00"},"s":"I",  "c":"STORAGE",  "id":22270,   "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/usr/local/share/java/unifi/data/db","storageEngine":"wiredTiger"}}
{"t":{"$date":"2023-03-25T14:07:57.219+01:00"},"s":"I",  "c":"STORAGE",  "id":22315,   "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=24000M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress,compact_progress],cache_size=256M"}}
{"t":{"$date":"2023-03-25T14:07:58.709+01:00"},"s":"W",  "c":"STORAGE",  "id":22347,   "ctx":"initandlisten","msg":"Failed to start up WiredTiger under any compatibility version. This may be due to an unsupported upgrade or downgrade."}
{"t":{"$date":"2023-03-25T14:07:58.709+01:00"},"s":"F",  "c":"STORAGE",  "id":28595,   "ctx":"initandlisten","msg":"Terminating.","attr":{"reason":"45: Operation not supported"}}
{"t":{"$date":"2023-03-25T14:07:58.709+01:00"},"s":"F",  "c":"-",        "id":23091,   "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":28595,"file":"src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp","line":958}}
{"t":{"$date":"2023-03-25T14:07:58.709+01:00"},"s":"F",  "c":"-",        "id":23092,   "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}

i think the major problem is this:

Code:
"s":"W",  "c":"STORAGE",  "id":22347,   "ctx":"initandlisten","msg":"Failed to start up WiredTiger under any compatibility version. This may be due to an unsupported upgrade or downgrade."}


So the mongodb4.4 cant start and the only guide i have is from UPDATING:


"The upgrade path can be as following:

- Take a backup from within the unifi7 application PRIOR to
updating!

- Stop the unifi7 service (if running)

- Copy the "backup" directory from /usr/local/share/java/unifi/data
to a safe location. Also copy keystore and system.properties if
you have made any modifications to those files

- Remove files and directories under /usr/local/share/java/unifi/data

- Upgrade the package

- Copy the "backup" directory from a safe location back to
/usr/local/share/java/unifi/data

- Start the service

- Restore the configuration from backup

- Review system.properties and keystore to merge any manual
modifications you have made (this has to be done with
the application stopped)
"
which say nothing on how to solve this or any steps that needs taking in the process to make the new version of unifi7 work.
The working version of unifi7 is end of life 31 of mars.
So i just have week to make this work!
Is there anyone who have the same problem and/or can help?
 
Last edited by a moderator:
I think you might have missed out on a crucial piece of the pkg message:
One of implications is that the instance MUST be restored from backup.

As per my knowledge, this means that you have to take a backup of your existing installation, completely remove/nuke it, install the new version just as you would on a new setup, then import the backup. Essentially, you're starting from scratch in terms of installing the port.
Have you tried completely removing the net-mgmt/unifi7 port (and potentially a subsequent pkg autoremove) and reinstalling after you created the backup?
 
Thanks for the help. So have removed unifi7 when removed /usr/local/share/java/unifi.
installed unifi7 again and yes now it started when i upload the backup.
I can now confirm that my unifi is up and running.

Steps i took:

  1. Create a zfs snapshot of the jail for my unifi.
  2. Download the latest backup within the webgui from the earlier version of unifi
  3. pkg remove unifi7
  4. rm -rv /usr/local/share/java/unifi
  5. portmaster net-mgmt/unifi7
  6. /usr/local/etc/rc.d/unifi start
  7. In the webbgui restore from the backup file i downloaded earlier.

I lost all my auto backup files as trying to restore the backup folder did not work but i have a working unifi now THANKS!

This is what needs to be i UPDATING expect the zfs snapshot part to be able to "upgrade" unifi to latest version.


This issue is now resolved!

Thanks again!
 
I lost all my auto backup files as trying to restore the backup folder did
For next time: The unifi backup is a singular file which you create in the unifi controller backend. Then you can upload it via the "restore" option either during the initial controller setup or afterwards at the same place in the settings where you created/downloaded the backup file.
As per my knowledge there shouldn't be any folder/directory involved.
 
Back
Top