UniFi controller under Docker

Currently reading
UniFi controller under Docker

12
0
xbmcnut.blogspot.com
NAS
RS814+ DS201+
Router
  1. RT1900ac
Operating system
  1. Windows
Mobile operating system
  1. Android
Hey there,

1st time poster so I thought I'd give it a go after being encouraged on the UniFi forums.

I've been running jacobalberty/unifi:latest for some time under Docker on my RS814+ and 95% of the time it works flawlessly. Every couple of months though, I start getting device disconnection alarms and if left, the NAS starts to grind to halt. It got so bad last month I couldn't even log into the NAS and I had to force shutdown with the power button which took > 10 mins.

Starting last night, numerous disconnections again so I blew out the container and started again. My single question today though is in regards to the set-inform in the controller. I have eight internal devices on the LAN segment and two external sites with a total of three devices. The external devices were connected using set-inform via SSH. When I got the controller going again today, five of my devices were stuck on 'provisioning' and when I used SSH to connect to them and ran 'info', the set inform URL they were trying to connect to was the docker one, not the host.

Is there a way to change that?

And if anyone has seen memory creep on the UniFi controller that starts to slow the NAS down, please let me know. FYI, the controller version is 5.12.35.
 

jeyare

Subscriber
1,587
537
welcome here

re "memory creep on the UniFi controller that starts to slow the NAS down "
I have 8+ containers running in one of my DS1813+ what is same as your DS814+ from CPU/RAM point of view, include Unifi controller (also same ver).
CPU spending is about 0.7%
RAM about 420MB (I have maxed RAM = 4GB)
The controller have maxed IPS, include 3 remote sites orchestration
Question N.1 - what HWs do you have in the Unifi orchestration (routers, switches, APs,...) ?
Question N.2 - what does exactly mean the "memory creep" in your case? More detailed description is needed.
 

jeyare

Subscriber
1,587
537
I've been running jacobalberty/unifi:latest for some time under Docker on my RS814+ and 95% of the time it works flawlessly. Every couple of months though, I start getting device disconnection alarms and if left, the NAS starts to grind to halt. It got so bad last month I couldn't even log into the NAS and I had to force shutdown with the power button which took > 10 mins.
to be sure:
- "I start getting device disconnection alarms" - did you mean Unifi devices (router, switches, APs) or the NAS?
- "and if left, the NAS starts to grind to halt." - pls. be more specific in your description
- "I couldn't even log into the NAS" - seems to be your whole concern is about the NAS (include above unclear description).Y/N?
- "force shutdown ... which took > 10 mins." - do you have some logs?
 

jeyare

Subscriber
1,587
537
My single question today though is in regards to the set-inform in the controller. I have eight internal devices on the LAN segment and two external sites with a total of three devices. The external devices were connected using set-inform via SSH. When I got the controller going again today, five of my devices were stuck on 'provisioning' and when I used SSH to connect to them and ran 'info', the set inform URL they were trying to connect to was the docker one, not the host.

Is there a way to change that?
... seems to be problem of the rooting way from network appliances to (for set-inform) Unifi controller. Pls. describe your path (hide sensitive info). I t will help me to see more details there
 
12
0
xbmcnut.blogspot.com
NAS
RS814+ DS201+
Router
  1. RT1900ac
Operating system
  1. Windows
Mobile operating system
  1. Android
Apologies for the delay. Not getting emails about post updates so try to fix that now. Answer everyones feedback shortly.
 
12
0
xbmcnut.blogspot.com
NAS
RS814+ DS201+
Router
  1. RT1900ac
Operating system
  1. Windows
Mobile operating system
  1. Android
welcome here

re "memory creep on the UniFi controller that starts to slow the NAS down "
I have 8+ containers running in one of my DS1813+ what is same as your DS814+ from CPU/RAM point of view, include Unifi controller (also same ver).
CPU spending is about 0.7%
RAM about 420MB (I have maxed RAM = 4GB)
The controller have maxed IPS, include 3 remote sites orchestration
Question N.1 - what HWs do you have in the Unifi orchestration (routers, switches, APs,...) ?
A: USG, UniFi AP-AC-Lite x 2, UniFi AP-AC-Pro, UniFi Switch 8, UniFi Switch 8 POE-60W, UniFi Switch 16 POE-150W, UniFi Switch 24.
Question N.2 - what does exactly mean the "memory creep" in your case? More detailed description is needed.
A: Currently UniFi controller is using 0.63% CPU and 838MB RAM (of 4GB). When it affected the NAS last time, the RAM was up to 1.47GB.
Answers above
 
12
0
xbmcnut.blogspot.com
NAS
RS814+ DS201+
Router
  1. RT1900ac
Operating system
  1. Windows
Mobile operating system
  1. Android
to be sure:
- "I start getting device disconnection alarms" - did you mean Unifi devices (router, switches, APs) or the NAS?
A: Yes, alarms from device disconnects
- "and if left, the NAS starts to grind to halt." - pls. be more specific in your description
A: The NAS very quickly becomes unusable. I can't login to the GUI, can't SSH.
- "I couldn't even log into the NAS" - seems to be your whole concern is about the NAS (include above unclear description).Y/N?
A: I'm trying to determine if the device disconnects followed by the increased RAM usage of the UniFi docker controller are related to the degradation of my RS814+ performance to a point where I can't even SSH in.
- "force shutdown ... which took > 10 mins." - do you have some logs?
A: Sadly no. I can't seem to find anything in the logs that indicate anything went wrong other the the forced shutdown.
Answers above
 
12
0
xbmcnut.blogspot.com
NAS
RS814+ DS201+
Router
  1. RT1900ac
Operating system
  1. Windows
Mobile operating system
  1. Android
... seems to be problem of the rooting way from network appliances to (for set-inform) Unifi controller. Pls. describe your path (hide sensitive info). I t will help me to see more details there
Here is what one of my devices was saying after I rebuilt the UniFi Docker container. You'll see the set-inform is showing the internal Docker IP. If however I set this to the correct internal URL, will this 'stick' forever in the device?

Code:
UniFiSwitchOffice-US.v4.0.80# info

Model:       USW-8
Version:     4.0.80.10875
MAC Address: 78:8a:12:34:56:78
IP Address:  10.0.x.xxx
Hostname:    UniFiSwitchOffice
Uptime:      3120958 seconds

Status:      Unknown[11] (http://172.18.0.3:8080/inform)
 

jeyare

Subscriber
1,587
537
Here is what one of my devices was saying after I rebuilt the UniFi Docker container. You'll see the set-inform is showing the internal Docker IP. If however I set this to the correct internal URL, will this 'stick' forever in the device?

Code:
UniFiSwitchOffice-US.v4.0.80# info

Model:       USW-8
Version:     4.0.80.10875
MAC Address: 78:8a:12:34:56:78
IP Address:  10.0.x.xxx
Hostname:    UniFiSwitchOffice
Uptime:      3120958 seconds

Status:      Unknown[11] (http://172.18.0.3:8080/inform)

you have to set-inform target to correct NAS IP address
follow your info status, your switch is in IP Address: 10.0.x.xxx and your inform target is on 172.18.0.3
 
12
0
xbmcnut.blogspot.com
NAS
RS814+ DS201+
Router
  1. RT1900ac
Operating system
  1. Windows
Mobile operating system
  1. Android
you have to set-inform target to correct NAS IP address
follow your info status, your switch is in IP Address: 10.0.x.xxx and your inform target is on 172.18.0.3
Thanks, I've done that and the device was adopted straight away. I suppose my question was around the 'Controller Hostname/IP' and the 'Override inform host with controller hostname/IP' option. This is currently not checked so when my controller updates using Watchtower like it did today, this happens.

1585112124864.png


That is over 90 minutes after the controller updated to 5.12.66. The USG has defaulted its DHCP to 127.0.0.1 again and of course, some of the other devices that are adopting are looking for the controller on the Docker IP again (don't know why some connect and some don't).

Should I therefore but the LAN IP of the NAS in the 'Controller Hostname/IP' box and check 'Override inform host with controller hostname/IP'? And if I do that, will the external devices throw a spazzy and not like that?
 

jeyare

Subscriber
1,587
537
1. When your Unifi Controller is running in Docker container (anywhere), Controller GUI settings based on:
- field 'Controller Hostname/IP' ... doesn't work (you need setup)
Reason: it's up to your Network parameter configuration in docker (bridge or localhost, ...)
- checkbox 'Override inform host with controller hostname/IP' ... doesn't work (you need setup it by CLI set-inform for each device), in my GUI is such check box blank .... this checkbox is applicable for UCK environment, or direct Controller installation to desktop PC.

2. to be sure, how did you update the controller to 5.12.66? Because when you just use every single step in my guidelines (Resource link), you don't get any problems. I see some different approach here based on your description "the USG has defaulted its DHCP to 127.0.0.1, adopting status". Because when you use right Backup of Controller and Restore procedure in same way as was mentioned in my guidelines, you will get 1:1 environment with new controller version.

3. Re: Adopting status (after checking of the controller update procedure above):
- open SSH to each devices and type
Code:
info
- check the Status there
- send here a Status line copy
but I'm 100% sure, that when you check the point 2, you get "Connected" status for all of them.
 
12
0
xbmcnut.blogspot.com
NAS
RS814+ DS201+
Router
  1. RT1900ac
Operating system
  1. Windows
Mobile operating system
  1. Android
@jeyare

Thank you. My container updates automatically using watchtower and this has not been an issue until recently so trying to figure out what is going on there. I've always had access to the controller Hostname/IP box and the checkbox below it too.:p

1585128901488.png


If I use set-inform with SSH, they instantly connect so not sure why I can just use the NAS IP in the Hostname/IP box and check override. Obviously the remote devices couldn't connect using that but then I set-inform them with CLI anyway. I tried using the FQDN there and everyone is happy except the USG as it can't resolve that IP but every other devices can. I saw some chatter on the UniFi forums about programming the USG to be able to resolve the FQDN to an internal set-inform IP but that was above my pay grade!
 
12
0
xbmcnut.blogspot.com
NAS
RS814+ DS201+
Router
  1. RT1900ac
Operating system
  1. Windows
Mobile operating system
  1. Android
but I'm 100% sure, that when you check the point 2, you get "Connected" status for all of them.
Thanks. I'll disable Watchtower for UniFi and try a manual update next time and see what happens. And to be clear, your saying that whatever I put in Hostname/IP for the controller and the override checkbox makes no difference whatsoever on a Docker install of UniFi?
 

jeyare

Subscriber
1,587
537
Last edited:
@jeyare
Thank you. My container updates automatically using watchtower and this has not been an issue until recently so trying to figure out what is going on there. I've always had access to the controller Hostname/IP box and the checkbox below it too.:p

this is the foundation of your troubles

- when you have operated Unifi Controller in Docker container - you can't perform the upgrade by "standard way", as was performed by you. It was base of my question :cool: .
Your backup/restore procedure of the container wasn't performed, then you lost your Unifi configuration and "default" was re-writed = DHCP, ...
My guideline will take you 5 minutes from your life, without some impact to your mental health. And when something will happen, you have still fall-back to previous container ver. by simple click. in Docker GUI.

Many of container producers have such kind of disclaimer:
We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using Docker Compose.

Finally .... as I know, jacobalberty/unifi don't have Watchtower feature. Then you have maybe other container (linuxserver).
 

jeyare

Subscriber
1,587
537
Thanks. I'll disable Watchtower for UniFi and try a manual update next time and see what happens. And to be clear, your saying that whatever I put in Hostname/IP for the controller and the override checkbox makes no difference whatsoever on a Docker install of UniFi?
yeap, you have to use for such setup just SSH and manually set-inform
but, when you will use next upgrades in smarter way, you don't need perform any such set-inform setup again and again
 

jeyare

Subscriber
1,587
537
@jeyare
If I use set-inform with SSH, they instantly connect so not sure why I can just use the NAS IP in the Hostname/IP box and check override.
as I wrote before - it's just for standard kind of operation of the Controller:
- Unifi Cloud Key
- direct installation to your PC
then it's working

Docker container isn't supported solution directly by Ubiqiuiti, Reason:
- they have revenue from their Unifi Cloud Keys HW and Docker is competitive (free of charge)
 

jeyare

Subscriber
1,587
537
@jeyare
Obviously the remote devices couldn't connect using that but then I set-inform them with CLI anyway. I tried using the FQDN there and everyone is happy except the USG as it can't resolve that IP but every other devices can. I saw some chatter on the UniFi forums about programming the USG to be able to resolve the FQDN to an internal set-inform IP but that was above my pay grade!
yes, yes
I have fixed public IP addresses in all my sites, then no such troubles discovered.
 
27
4
NAS
DS718+
I ordered Unifi equipment and planning to rebuild my home network with that in a few days/weeks. In preparation I already installed the unifi controller docker image, to explore a bit. I had to change the ports in the config file though, because of other containers already using them. I assume as long as other ports work, I won't have issues with those? Or will Unifi equipment expect me to use default ports?

I immediately noticed that jacobalberty/unifi:latest runs a bit behind with the official versions. Makes sense of course since it's not an officially supported build. I was wondering though, typically how quickly are updates processed in this docker image after the official release?
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Similar threads

Similar threads

Trending threads

Top