Package Details: unifi 5.6.29-3

Git Clone URL: https://aur.archlinux.org/unifi.git (read-only)
Package Base: unifi
Description: Centralized management system for Ubiquiti UniFi AP
Upstream URL: https://community.ubnt.com/unifi
Licenses: custom
Conflicts: tomcat-native
Submitter: seblu
Maintainer: frederik
Last Packager: frederik
Votes: 17
Popularity: 4.081044
First Submitted: 2017-08-22 01:31
Last Updated: 2018-01-07 20:21

Latest Comments

Archanfel80HUN commented on 2018-01-07 12:33

Latest version gave me this at install: :: no results found for mongodb<3.6.0 (dependency tree: unifi mongodb) :: no results found for wiredtiger<=2.9.3 (dependency tree: unifi wiredtiger)

mal commented on 2018-01-07 05:39

The lack of .SRCINFO update is making my AUR helper angry.

rosshmusic commented on 2018-01-06 22:26

in Step 6 from Therml's post this morning,

I don't have a file unifi file in that directory. The only thing their is the symlink for mongod -> /usr/bin/mongod

Should I be able to find that specific unifi file elsewhere?

Evils commented on 2018-01-06 19:00

Start mongo with --repair in addition to the dbpath to repair your mongodb instace

yochaigal commented on 2018-01-06 16:04

@Termi I think you made a typo!

Where you write /usr/lib/unifi/bin/unifi it should be /usr/lib/unifi/bin/mongod

Thermi commented on 2018-01-06 10:40

To fix: Do all of this as root.

1) Check logs in /var/log/unifi/ for clear errors
2) stop unifi service (systemctl stop unifi)
3) Potentially recover the crashed mongodb database (was crashed in my case) by starting it once from cmdline with a custom data directory (mongod --dbpath /var/lib/unifi/data/db). Then check the output of it to see if the DB was recovered. If it was, continue. If there was no problem, continue.
4) Connect to the database (mongo mongodb://127.0.0.1:27017( and run the following command:
db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } )

That should give you the output
{ "ok" : 1 }

5) Stop the mongodb database
6) Remove the file /usr/lib/unifi/bin/unifi (rm /usr/lib/unifi/bin/unifi)
7) Create the text file /usr/lib/unifi/bin/unifi with the following content

#!/bin/bash  
exec /usr/bin/mongod ${*//--nohttpinterface/}

7) Change owner:group and permissions of /usr/lib/unifi/bin/unifi to root:root and 755
8) Change owner:group of /var/lib/unifi/ to unifi:unifi
9) start unifi again (systemctl start unifi)
10) Check unifi daemon logs in /var/log/unifi/server.log for errors

If that worked, be happy. If it didn't, comment the problem here.

Thanks @treitmayr and @Spider.007

mihanson commented on 2018-01-06 06:08

I followed treitmayr comments on 2017-12-31 09:28 with a fresh install and was able to get my UniFi Switch US-48 set up successfully. My MongoDB version is 3.6.1. After creating an account at https://account.ubnt.com, I can now connect/configure the switch at https://myIPaddress:8443

Thanks so much community! I was lost before reading through these comments!

yochaigal commented on 2018-01-06 00:36

Nevermind, I fixed it. I reinstalled and got a permissions differ error. Fixed them. It works!

yochaigal commented on 2018-01-05 20:31

OK, so: I downgraded mongodb and wiredtiger to the veresions @Spider.007 specified, then I stopped unifi, started the mongodb using @treitmayr's command, then connected to it and set the featurecompatibilityversion to 3.4 as directed. I then created the shell script at /usr/lib/unifi/bin/mongod which removes the illegal optoin, marked it as executable and chowned to unifi user.

I then upgraded the packages to the newer versions and started Unifi. I now get

[internal] unable to list files under /usr/lib/unifi/data/db/local

Obviously, those files exist. They are currently owned by both unifi and root.

Any ideas what I've missed?

Spider.007 commented on 2017-12-31 12:57

@treitmayr what you suggest probably works for new installs, not existing ones. I fixed mine by following the upgrade procedure; like @abra says - downgrade to mongodb-3.4.9-1 and wiredtiger-2.9.3-1 and upgrade the unifi database instance like this:

$ mongo mongodb://127.0.0.1:27117
> db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } )
{ "ok" : 1 }

Now you can upgrade wiredtiger and mongodb to the latest versions - with the fix of a custom wrapper to remove the nohttpinterface parameter it will work

All comments