Unifi container fails to install

Hi Guys

A Unifi container fails to install on a Docker host that previously hosted the same container image.
If someone can advise on the error below related to Java permissions, I will be grateful.

[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] 01-envfile: executing…
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing…

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

Brought to you by linuxserver(.)io

To support LSIO projects visit:


User uid: 1000
User gid: 1000

[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] 90-custom-folders: executing…
[cont-init.d] 90-custom-folders: 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.
2021-10-16 14:02:35,584 main ERROR Could not reconfigure JMX java.lang.ExceptionInInitializerError
at sun.nio.ch.FileChannelImpl.(FileChannelImpl.java:89)
at sun.nio.ch.FileChannelImpl.open(FileChannelImpl.java:105)
at sun.nio.fs.UnixChannelFactory.newFileChannel(UnixChannelFactory.java:137)
at sun.nio.fs.UnixChannelFactory.newFileChannel(UnixChannelFactory.java:148)
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:212)
at java.nio.file.Files.newByteChannel(Files.java:361)
at java.nio.file.Files.newByteChannel(Files.java:407)
at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
at java.nio.file.Files.newInputStream(Files.java:152)
at java.nio.file.Files.newBufferedReader(Files.java:2784)
at java.nio.file.Files.lines(Files.java:3744)
at java.nio.file.Files.lines(Files.java:3785)
at jdk.internal.platform.cgroupv1.Metrics.lambda$readFilePrivileged$6(Metrics.java:139)
at java.security.AccessController.doPrivileged(Native Method)
at jdk.internal.platform.cgroupv1.Metrics.readFilePrivileged(Metrics.java:140)
at jdk.internal.platform.cgroupv1.Metrics.initContainerSubSystems(Metrics.java:81)
at jdk.internal.platform.cgroupv1.Metrics.(Metrics.java:52)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at jdk.internal.platform.Metrics.systemMetrics(Metrics.java:59)
at jdk.internal.platform.Container.metrics(Container.java:41)
at sun.management.OperatingSystemImpl.(OperatingSystemImpl.java:46)
at sun.management.ManagementFactoryHelper.getOperatingSystemMXBean(ManagementFactoryHelper.java:106)
at java.lang.management.PlatformComponent$7.getMXBeans(PlatformComponent.java:157)
at java.lang.management.PlatformComponent.getMXBeans(PlatformComponent.java:377)
at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:472)
at org.apache.logging.log4j.core.jmx.Server.reregisterMBeansAfterReconfigure(Server.java:140)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:629)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:691)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:708)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:263)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:138)
at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:45)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:48)
at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:30)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)
at com.ubnt.service.system.for.o00000(Unknown Source)
at com.ubnt.service.system.for.(Unknown Source)
at com.ubnt.ace.Launcher.(Unknown Source)
Caused by: java.io.IOException: Permission denied
at sun.nio.ch.FileDispatcherImpl.init(Native Method)
at sun.nio.ch.FileDispatcherImpl.(FileDispatcherImpl.java:35)
… 42 more

here is my docker-compose file:

version: “2.1”
image: lscr.io/linuxserver/unifi-controller
container_name: Unifi
- PUID=1000
- PGID=1000
- MEM_LIMIT=1024M #optional
- MEM_STARTUP=1024M #optional
- /$localdir/
- /$localdir/
- 3478:3478/udp
- 10001:10001/udp
- 8080:8080
- 8443:8443
- 1900:1900/udp #optional
- 8843:8843 #optional
- 8880:8880 #optional
- 6789:6789 #optional
- 5514:5514/udp #optional
restart: unless-stopped


Are those the actual volume paths your using? Or have you removed what you actually use to make it harder for us to provide help?

I omitted them as I thought they wont add value :slight_smile:
Just wanted to point that the path is local not remote.

Well, all I can say is it’s a permissions issue. If you aren’t going to provide volume info, it’s hard to work out why you’re getting the permissions issue.

What’s the host os?

“Ubuntu 20.04.2 LTS”

So couple things to check, Definately the correct PUID/PGID? and could you try your volume mounts as full paths rather than using a ~ ?

yes both IDs are correct, I have tried the full path and made no difference.
The permissions that Java is crying about are on the container not the host, I think.
I had a container running on the same host with same compose file pointing to the same mounts volumes, but not sure why I cannot recreate :disappointed:

Yea it’s in the container. If you remove the volumes completely. Does it start?

nope, tried without any mounts but still fails.

Ok, how did you install docker?

from Docker repo in my sources list
http$://download.docker.com/linux/ubuntu focal stable

Just to note, I had to remove Java lib from the host as it was eating up loads of memory, but re-installed
will that have an effect on container Java lib?

nope should have zero affect.

Though had noticed you don’t need the /controller mount, it’s not one we suggest but that shouldn’t cause an issue.

I would expect it to boot fine without the volumes. It seems to me that there is something else causing an issue here but it’s hard to pin point what.

I will keep looking, Thanks for your time,