[Support] Linuxserver.io - Unifi-Controller


Recommended Posts

I don’t know if this is actually how it works, but it’s how I think about it. And I have no problems running this docker on bridge mode.

When running UniFi in a docker in bridge mode, the docker IP is something on the bridge network, e.g. 172.x.x.x.
I think the unifi app detects it’s own IP and broadcasts it out to all APs that are listening. This is how auto-adopt works.
But of course, the AP can’t talk back to unifi on 172.x.x.x. It needs to use the unRAID host IP.

The controller override settings in unifi neatly fixes this problem by broadcasting an IP that the AP’s can actually reach.

So in summary, bridge mode works well but you HAVE TO set the controller override options correctly.

Again, this is how I think about it, I don’t know for sure that it’s how it works behind the scenes.


Sent from my iPhone using Tapatalk

  • Like 2
Link to comment
8 hours ago, Jorgen said:

I don’t know if this is actually how it works, but it’s how I think about it. And I have no problems running this docker on bridge mode.

When running UniFi in a docker in bridge mode, the docker IP is something on the bridge network, e.g. 172.x.x.x.
I think the unifi app detects it’s own IP and broadcasts it out to all APs that are listening. This is how auto-adopt works.
But of course, the AP can’t talk back to unifi on 172.x.x.x. It needs to use the unRAID host IP.

The controller override settings in unifi neatly fixes this problem by broadcasting an IP that the AP’s can actually reach.

So in summary, bridge mode works well but you HAVE TO set the controller override options correctly.

Again, this is how I think about it, I don’t know for sure that it’s how it works behind the scenes.


Sent from my iPhone using Tapatalk

Many thanks for the insights.

Now I have the controller settings correct hopefully and the docker back in bridge mode.

couple of questions:

 

How is the controller name used? Can I just put anything in here?

Also, changing just the IP address and setting override inform wasn’t enough, I also had to set the L2 layer discoverability. What exactly does this do?

 

F7177CB4-1EEE-40D3-9EC2-CE0E692E0BF0.thumb.jpeg.57a32b2891e6f7cf3b7e21f8f9bd7e75.jpeg

 

One final thing, sorry it’s a lot of questions but it’s a lot to take in, but I’ve noticed I seem to be on the latest branch which by all accounts is not super stable. Is there an easy way to recreate the docker with the 5.9 branch enabled without having to redo everything?

 

thanks!

Link to comment

I'm having an issue with this docker disappearing. I don't open it much so it can be a week or more before I notice that it's missing. The folder is still in /appdata/ and if I add it back through Community Apps it comes right back as if nothing ever changed. This is the only docker container I have that does this.

I'm probably not looking at the right logs because in the system log this is all I can find.

Apr 12 04:30:03 Unraid root: Fix Common Problems: Warning: Docker Application unifi-controller has an update available for it
Apr 12 05:00:11 Unraid Docker Auto Update: Stopping unifi-controller
Apr 12 05:01:09 Unraid Docker Auto Update: Installing Updates for unifi-controller
Apr 12 05:05:55 Unraid Docker Auto Update: Restarting unifi-controller
Apr 12 05:11:40 Unraid CA Backup/Restore: Stopping unifi-controller
Apr 12 05:11:40 Unraid CA Backup/Restore: docker stop -t 60 unifi-controller
Apr 25 05:02:26 Unraid CA Backup/Restore: Stopping unifi-controller
Apr 25 05:02:35 Unraid CA Backup/Restore: docker stop -t 60 unifi-controller
Apr 26 04:30:03 Unraid root: Fix Common Problems: Warning: Docker Application unifi-controller has an update available for it
Apr 26 05:00:10 Unraid Docker Auto Update: Stopping unifi-controller
Apr 26 05:00:43 Unraid Docker Auto Update: Installing Updates for unifi-controller
Apr 26 05:05:21 Unraid Docker Auto Update: Restarting unifi-controller
Apr 26 05:09:23 Unraid CA Backup/Restore: Stopping unifi-controller
Apr 26 05:09:23 Unraid CA Backup/Restore: docker stop -t 60 unifi-controller

Doesn't show the docker starting up after CA Backup/Retore runs or when I re-add the docker from community apps much less why it's disappearing from the list of docker containers. I figure there's probably a better log somewhere but I'm not sure where to look

Edited by ClintonRH
Link to comment

Hi all,

 

I just noticed the web UI is not working anymore, browsing is timed out.

I have not made any changes. Not sure if there have been any updates of the container recently.

But otherwise the container seems to work, I can access the CLI. I need some help on how to proceed the troubleshooting.

 

Command:
root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='unifi-controller' --net='host' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -e 'UDP_PORT_3478'='3478' -e 'TCP_PORT_8080'='8080' -e 'TCP_PORT_8443'='8443' -e 'TCP_PORT_8880'='8880' -e 'TCP_PORT_8843'='8843' -e 'UDP_PORT_10001'='10001' -e 'PUID'='99' -e 'PGID'='100' -v '/mnt/user/appdata/unifi-controller':'/config':'rw' 'linuxserver/unifi-controller:LTS'

b0695b8cfaeea76cb8ea11d7829e008d96e482a8ec1f925cc602c54a9f46f560

The command finished successfully!
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...
usermod: no changes

-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/


Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

 

Edited by UnspokenDrop7
Corrected a typo
Link to comment
3 hours ago, UnspokenDrop7 said:

Hi all,

 

I just noticed the web UI is not working anymore, browsing is timed out.

I have note made any changes. Not sure if there have been any updates of the container recently.

But otherwise the container seems to work, I can access the CLI. I need some help on how to proceed the troubleshooting.

 

I have spent all morning trying to get this working to no avail. I am glad it's not just me!

 

  • Like 1
Link to comment

I figured it out.  The problem is that even if you force the webui to a different port, it will still use 8080.  I tried about 10 different ways.  Edit, delete/recreate, delete entire docker image and force set it with command:

/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='unifi-controller' --net='host' -e TZ="America/Chicago" -e HOST_OS="Unraid" -e 'UDP_PORT_3478'='3478' -e 'TCP_PORT_8443'='8443' -e 'TCP_PORT_8880'='8880' -e 'TCP_PORT_8843'='8843' -e 'UDP_PORT_10001'='10001' -e 'TCP_PORT_8082'='8082' -e 'PUID'='99' -e 'PGID'='100' -v '/mnt/user/appdata/unifi-controller':'/config':'rw' 'linuxserver/unifi-controller' fd7e767bc1ba26be17dcf3dbb0c71262909dbbb29ca1a9f5ec73327f1c65b2da

It will not adhere to your TCP port in host mode.  Works in bridged mode but that creates other issues.  
 

Link to comment
1 hour ago, Singularity42 said:

I figured it out.  The problem is that even if you force the webui to a different port, it will still use 8080.  I tried about 10 different ways.  Edit, delete/recreate, delete entire docker image and force set it with command:


/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='unifi-controller' --net='host' -e TZ="America/Chicago" -e HOST_OS="Unraid" -e 'UDP_PORT_3478'='3478' -e 'TCP_PORT_8443'='8443' -e 'TCP_PORT_8880'='8880' -e 'TCP_PORT_8843'='8843' -e 'UDP_PORT_10001'='10001' -e 'TCP_PORT_8082'='8082' -e 'PUID'='99' -e 'PGID'='100' -v '/mnt/user/appdata/unifi-controller':'/config':'rw' 'linuxserver/unifi-controller' fd7e767bc1ba26be17dcf3dbb0c71262909dbbb29ca1a9f5ec73327f1c65b2da

It will not adhere to your TCP port in host mode.  Works in bridged mode but that creates other issues.  
 

There are no port mapping in host mode. If you look at the docker run command you will see that all ports mappings are turned into variables.

Link to comment
On 5/15/2020 at 5:41 PM, Singularity42 said:

I figured it out.  The problem is that even if you force the webui to a different port, it will still use 8080.  I tried about 10 different ways.  Edit, delete/recreate, delete entire docker image and force set it with command:


/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='unifi-controller' --net='host' -e TZ="America/Chicago" -e HOST_OS="Unraid" -e 'UDP_PORT_3478'='3478' -e 'TCP_PORT_8443'='8443' -e 'TCP_PORT_8880'='8880' -e 'TCP_PORT_8843'='8843' -e 'UDP_PORT_10001'='10001' -e 'TCP_PORT_8082'='8082' -e 'PUID'='99' -e 'PGID'='100' -v '/mnt/user/appdata/unifi-controller':'/config':'rw' 'linuxserver/unifi-controller' fd7e767bc1ba26be17dcf3dbb0c71262909dbbb29ca1a9f5ec73327f1c65b2da

It will not adhere to your TCP port in host mode.  Works in bridged mode but that creates other issues.  
 

I have used this docker container for years and I have always reached the WebUI via TCP 8443. I'm 100% sure of this as have a bookmark in my browser pointing towards https://v.x.y.z:8443/
Anyway, I tried to access the WebUI using 8080. But there is no answer on this port either.


I wish I could have a look at the web server configuration of the docker container. But I'm not sure even where to start looking... or if I'm able to read the configuration once I find it. Maybe I at least would be able to verify what port it is listening on.

Link to comment
4 hours ago, UnspokenDrop7 said:

I have used this docker container for years and I have always reached the WebUI via TCP 8443. I'm 100% sure of this as have a bookmark in my browser pointing towards https://v.x.y.z:8443/
Anyway, I tried to access the WebUI using 8080. But there is no answer on this port either.


I wish I could have a look at the web server configuration of the docker container. But I'm not sure even where to start looking... or if I'm able to read the configuration once I find it. Maybe I at least would be able to verify what port it is listening on.

The correct port is 8080 inside the container and I guess 8443 is for Https. You can map it to whatever you want on the host side.

The problem in the post you quoted was that the user was not aware that por mapping can't be used in host mode.

Link to comment
On 5/18/2020 at 2:05 PM, saarg said:

The correct port is 8080 inside the container and I guess 8443 is for Https. You can map it to whatever you want on the host side.

The problem in the post you quoted was that the user was not aware that por mapping can't be used in host mode.

What i was saying is that in host mode, even if manually creating the docker (-e 'TCP_PORT_8082'='8082') it does not adhere to the container port you give it, not the port mapping you give it - because as you mention, there is no port mapping in host mode.  Since there is another container using port 8080, the port will be in use and webui wont work.  
Its currently working for me, in bridged mode, with a remapped port "8082", since no matter what I attempted, the container always created itself with port 8080 in host mode.

Link to comment
1 hour ago, Singularity42 said:

What i was saying is that in host mode, even if manually creating the docker (-e 'TCP_PORT_8082'='8082') it does not adhere to the container port you give it, not the port mapping you give it - because as you mention, there is no port mapping in host mode.  Since there is another container using port 8080, the port will be in use and webui wont work.  
Its currently working for me, in bridged mode, with a remapped port "8082", since no matter what I attempted, the container always created itself with port 8080 in host mode.

Aha, I think I understand you now! You mean the container seems to be fixed or hardcoded to use TCP 8080?

That should be no problem for me. I have no other docker container using port 8080. Or any other service running on my Unraid host using this port. I never have.

On the other hand, I have never used 8080 to access the WebUI. The "instructions" (see attached image) says I should use 8443. So I have always used 8443.

 

Anyway, just to make sure. If I switch to bridged mode and maps host port 8082 to container port 8080 I get another issue. My browser gives me SSL_ERROR_RX_RECORD_TOO_LONG.


Command:
root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='unifi-controller' --net='bridge' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -e 'PUID'='99' -e 'PGID'='100' -p '3478:3478/udp' -p '8082:8080/tcp' -p '8443:8443/tcp' -p '8880:8880/tcp' -p '8843:8843/tcp' -p '10001:10001/udp' -v '/mnt/user/appdata/unifi-controller':'/config':'rw' 'linuxserver/unifi-controller:LTS'

7b17630e25bbc111b6c73049741287990777930e4ab791bdac1890762a9cbda3

The command finished successfully!

Again, if I look at the "instructions" it says port 8080 is used for "device and controller communications". So to my understanding 8080 should not be used for the WebUI.

 

Or am I missing something here?

instructions.png

Link to comment
2 minutes ago, UnspokenDrop7 said:

Or am I missing something here?

I don't think so. I can't connect in host or bridge mode with pain vanilla install and have no port conflicts on either port. Simply won't connect, the server does not respond. It used to work and then stopped working. I know this indicates some network config problem locally most likely I just don't think anything has changed. Anyway I'm running the server from my workstation mac but I would rather run it from my unraid server, but I can't get the server to respond on any of these ports to the web gui. This is all on LAN and there are no firewalls.

  • Like 1
Link to comment

Trying to connect to my controller. I do see this error in my logs. can anyone guide me?

 

2020-05-22 11:02:12,467 localhost-startStop-1 ERROR Recovering from StringBuilderEncoder.encode('[2020-05-22T06:02:12,451] <localhost-startStop-1> INFO system - Current System IP: 192.168.1.11
') error: org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to stream logs/server.log org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to stream logs/server.log

 

I have deleted the image and reinstalled from the CA. still same result.

Link to comment
1 hour ago, itskamel said:

Trying to connect to my controller. I do see this error in my logs. can anyone guide me?

 

2020-05-22 11:02:12,467 localhost-startStop-1 ERROR Recovering from StringBuilderEncoder.encode('[2020-05-22T06:02:12,451] <localhost-startStop-1> INFO system - Current System IP: 192.168.1.11
') error: org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to stream logs/server.log org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to stream logs/server.log

 

I have deleted the image and reinstalled from the CA. still same result.

When I have deleted the image in the past, it leaves behind files in the appdata directory so I had to rename the docker folder to unifi-controllerold after deleting it before reinstalling a fresh one. Hopefully you saved your SSH key or adopting all the AP's again will be a pain (ie require a reset).

Link to comment
On 5/2/2020 at 11:24 AM, johnieutah said:

...

 

One final thing, sorry it’s a lot of questions but it’s a lot to take in, but I’ve noticed I seem to be on the latest branch which by all accounts is not super stable. Is there an easy way to recreate the docker with the 5.9 branch enabled without having to redo everything?

 

thanks!

Any ideas here guys? I just want a stable WiFi platform so would mich rather be on the 5.9 branch or similar. Best way to downgrade? I presume I can’t export the site or settings to an earlier version?!?

 

Thanks.

Link to comment
1 hour ago, johnieutah said:

Any ideas here guys? I just want a stable WiFi platform so would mich rather be on the 5.9 branch or similar. Best way to downgrade? I presume I can’t export the site or settings to an earlier version?!?

 

Thanks.

Its not possible. Upgrading is one way. You would have to save your ssh key and redo everything with a new docker, or find/wait for a stable version and then change the tag of your docker to that specific version so it doesnt auto upgrade from that point onward.

Link to comment
9 hours ago, johnieutah said:

Any ideas here guys? I just want a stable WiFi platform so would mich rather be on the 5.9 branch or similar. Best way to downgrade? I presume I can’t export the site or settings to an earlier version?!?

 

Thanks.

5.9 is getting pretty old. The memory leak is annoying, yes, but manageable. So many features you're missing out on in 5.12.

Link to comment
4 hours ago, snowboardjoe said:

5.9 is getting pretty old. The memory leak is annoying, yes, but manageable. So many features you're missing out on in 5.12.

which memory leak? I'm completely new to Unifi and still in the process of setting everything up.

I just need a neat solution with some cool things for me to play with but more importantly not to get shouted at from the wife because the wifi isn't working 😆

Link to comment

Hey all, I'm experiencing what seems to be the memory leak issue with the virtual space taken up by Unifi Controller is over 10 GBs (Found through cAdvisor) while the only appdata space used is 670 MBs. I ran into an issue over the weekend that took up the remaining space of my docker image (15GB) and had to reinstall the image to get back down to 65% utilization.

 

I know I have extensive logging being kept, but I don't want to change that. Please let me know what data would be helpful to get to the root of this while keeping my network details private.

 

I also really want an option in the template to move the log folder, if possible so they don't take up tons of space as the logs grow while I data hoard all of that data I'll probably never use, but would be nice to query in the controller at any time.

 

Controller version: 5.12.72

Edited by TheInfamousWaffles
Link to comment
10 hours ago, TheInfamousWaffles said:

Hey all, I'm experiencing what seems to be the memory leak issue with the virtual space taken up by Unifi Controller is over 10 GBs (Found through cAdvisor) while the only appdata space used is 670 MBs. I ran into an issue over the weekend that took up the remaining space of my docker image (15GB) and had to reinstall the image to get back down to 65% utilization.

 

I know I have extensive logging being kept, but I don't want to change that. Please let me know what data would be helpful to get to the root of this while keeping my network details private.

 

I also really want an option in the template to move the log folder, if possible so they don't take up tons of space as the logs grow while I data hoard all of that data I'll probably never use, but would be nice to query in the controller at any time.

 

Controller version: 5.12.72

I think you have to ask unifi about that. We don't make the app, only the container.

Link to comment
11 hours ago, TheInfamousWaffles said:

Hey all, I'm experiencing what seems to be the memory leak issue with the virtual space taken up by Unifi Controller is over 10 GBs (Found through cAdvisor) while the only appdata space used is 670 MBs. I ran into an issue over the weekend that took up the remaining space of my docker image (15GB) and had to reinstall the image to get back down to 65% utilization.

 

I know I have extensive logging being kept, but I don't want to change that. Please let me know what data would be helpful to get to the root of this while keeping my network details private.

 

I also really want an option in the template to move the log folder, if possible so they don't take up tons of space as the logs grow while I data hoard all of that data I'll probably never use, but would be nice to query in the controller at any time.

 

Controller version: 5.12.72

I've just noticed the same. I was wondering why I couldn't start a VM then noticed this docker was using 15GB ram. Applied the update that was pending and we're already back over a GB ram used in a minute.

Any luck on the unifi pages?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.