Last week I had a brand new UniFi accesspoint that I just could not get adopted by the controller. It did show up in the controller, ready for adoption, but after adoption, the access point disappeared in the controller. When looking up the status in the access point I noticed the error Server Reject.
My first attempt to solve this was simply resetting the access point back to defaults. You can factory reset the accesspoint using the button, or use SSH and the set-default command. But that didn’t seem to help either. The device kept showing the Server Reject status.
In this article, I will explain how you can solve the UniFi Server Reject error.
Method 1 – Check the inform address
The first step is to check the inform address in the UniFi device. When the inform address is configured incorrectly, then you will also get the server reject status in the UniFi device. Make sure that you know the SSH credentials of the device, default username, and password is ubnt.
ssh [email protected] # Check current inform address info # Set correct address: set-inform http://192.168.1.1:8080/inform
Make sure that you pay close attention to the http://
part, port number and don’t forget to add /inform
at the end.
Method 2 – Forget and reset the UniFi device
If the inform address is set correctly and the device still won’t adopt, then we are first going to reset the device and remove it from the controller.
- Open the UniFi network controller
- Go to devices and select the device
- Click on Settings
- Scroll all the way down, expand Manage, and click on Forget
The device will reboot and should show up for adoption in the network controller.
Method 3 – Remove it from the MongoDB
If these methods don’t work then there is one last step that we can do. We can remove the device manually from the controller, by deleting it in the Mongo Database of the controller. For this, we are going to make an SSH connection to the controller and we will need the MAC address of the UniFi device that we want to delete.
You can find the MAC address in the network controller, when you open the device or on the bottom of the device itself.
The SSH password of the controller can be found/set in the UniFi OS > Settings > System. It’s different from the SSH password that we have used for the UniFi devices. Make sure that you have a backup of your controller before you start!
# Connect to your controller ssh [email protected] # Open the Mongo db mongo --port 27117 # Remove the MAC address from the db use ace db.device.remove({"mac":"xx:xx:xx:xx:xx:xx"}); exit # or reboot the controller with the command reboot
The last step is to reboot the console. You can type the command reboot for this or restart it through the browser under Settings > System.
After these steps, I reset the access point back to factory settings once again, just to be sure that everything was removed. You should now be able to adopt the UniFi device without the server reject error.
Wrapping Up
I hope this article helped you with solver the UniFi server reject error, if you have any questions, just drop a comment below.
Thank you, it works for me with the mongodb trick.
JT
[email protected]:~# mongo –port 27117
MongoDB shell version: 3.2.11
connecting to: 127.0.0.1:27117/test
> use ace
switched to db ace
> db.device.remove({“mac”:”f4:92:bf:29:aa:c0″});
WriteResult({ “nRemoved” : 0 })
> ^C
bye
[email protected]:~# reboot
******
if you copy &paste the commands, you have to write the command with double minus..
mongo –port 27117
Thanks for this article. You’ve been a time saver
Where on earth does “/unifi” come from?
I thought it is supposed to be;
set-inform http://192.161.1.1:8080/inform
not,
set-inform http://192.161.1.1:8080/unifi
thnx
I don’t know how I screwed up that one, but it should indeed be /inform. I have updated the article, thanks for pointing it out!
Hi Ruud and All of you,
I was dealing with this adoption problem for some time. 4-5 pcs U6 LRs, U6 Lite and USW 48 POE Gen 2. couldn’t adopt. Of cours you can try all steps in this article if not please try my solution:
IMPORTANT: Backup your main controller.
1. Before you start adding new Access Points or other devices make sure you have newest version of controller if not please update your controller first.
2. Update devices over SSH (like in this article)
3. Add/adopt devices to controller
If you recive adoption failure. Get another PC and install newest Unifi Controller and add new site. PC has to be connected to same network as Unifi new devices.
1. forget any devices with adoption failure message on main controller
2. export site from your main controller
3. import site to your new controller
4. input IP address/host name of your new controller in exporting creator on main controller
5. delete site on your main controller
6. wait until devices will show up in new controller (if device is not showing, reset device holding reset button for 10 seceonds or over SSH and do “set-default” command)
7. add/adopt new devices in new controller
8. when all devices are adopted and connected you can export site from new controller to your main controller with all same steps without reseting devices.
Many thanks Ruud for your effort. I like very much how you writing. All the best for you.
Regards
Mateusz
For me methods 3, thanls
Thanks for the tip, I’ve fixed my issue now…
Tom
Hi Rudy
Great articles !!!
Ive got a FlexHD AP that was working previously for 1+ years and is now stubbornly refusing to mesh and stuck as isolated
Ive tried resetting it multiple times but no change
I’d like to try your method 3 to remove it from the MongoDB but I get the following
# mongo –port 27117
-sh: mongo: not found
#
The files there
# find / -name mongo -print
/mnt/data/podman/storage/overlay/85132105b147b6feb2e3b6b5705e01694c1f12740029c04c785a13a4cb4b5af0/merged/usr/bin/mongo
/overlay/root_ro/var/lib/containers/storage/overlay/5c8e2f17e3e35f60fade55c688e0221f11bb29799d44fec18a33fc6d87a0340f/diff/usr/bin/mongo
find: /proc/26225: No such file or directory
find: /proc/26350: No such file or directory
find: /proc/26351: No such file or directory
Its listening
# netstat -na | grep 27117
tcp 0 0 127.0.0.1:27117 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:27117 127.0.0.1:52018 ESTABLISHED
tcp 0 0 127.0.0.1:27117 127.0.0.1:58186 ESTABLISHED
tcp 0 0 127.0.0.1:27117 127.0.0.1:46366 ESTABLISHED
tcp 0 0 ::ffff:127.0.0.1:52018 ::ffff:127.0.0.1:27117 ESTABLISHED
tcp 0 0 ::ffff:127.0.0.1:46366 ::ffff:127.0.0.1:27117 ESTABLISHED
tcp 0 0 ::ffff:127.0.0.1:58186 ::ffff:127.0.0.1:27117 ESTABLISHED
unix 2 [ ACC ] STREAM LISTENING 42707 /usr/lib/unifi/run/mongodb-27117.sock
unix 2 [ ] DGRAM 271171
#
Ive tried running with the full path
# /mnt/data/podman/storage/overlay/85132105b147b6feb2e3b6b5705e01694c1f12740029c04c785a13a4cb4b5af0/merged/usr/bin/mongo –port 27117
/mnt/data/podman/storage/overlay/85132105b147b6feb2e3b6b5705e01694c1f12740029c04c785a13a4cb4b5af0/merged/usr/bin/mongo: error while loading shared libraries: libboost_program_options.so.1.62.0: cannot open shared object file: No such file or directory
#
Im running UDM 1.12.22
any ideas ?
Thanks in advance
Tom
You might need to switch to the Unifi OS Shell:
unifi-os shell