unifi
unifi copied to clipboard
goofball222/unifi:latest-beta 7.2.92 - "DBServer stopped"
Reporting bugs/issues
-
When reporting a bug/issue:
- Ensure that you are using the latest release.
- Revert any custom modifications or environment varibles to insure they're not the cause.
-
Please provide the following information:
- OS/distribution version (command for your OS may differ): IE:
user@host:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.3 LTS Release: 16.04 Codename: xenial
- Docker version: IE:
user@host:~$ docker --version Docker version 17.05.0-ce, build 89658be
- Labels from container: IE:
user@host:~$ docker inspect goofball222/unifi:<tagname> ... "Labels": { "org.label-schema.build-date": "2017-10-23T18:06:18Z", "org.label-schema.license": "Apache-2.0", "org.label-schema.name": "UniFi Controller", "org.label-schema.schema-version": "1.0", "org.label-schema.url": "https://github.com/goofball222/unifi", "org.label-schema.vcs-ref": "dc9ca9c", "org.label-schema.vcs-url": "https://github.com/goofball222/unifi.git", "org.label-schema.vendor": "goofball222", "org.label-schema.version": "5.6.19" } ...
- Details on how to reproduce the trouble, if available:
Sorry - just quickly - using image goofball222/unifi:latest-beta
get constant repeating DBServer stopped after update to 7.2.92.
[2022-08-10T02:02:11,937] XXX <db-server> INFO db - 2022-08-10T02:02:11.936+0000 I STORAGE [main] Engine custom option: cache_size=256M [2022-08-10T02:02:11,951] XXX <db-server> INFO db - DbServer stopped
I did some poking around, and I found a workaround for my install. I don't actually know what's changed between these two versions, though. It seems to be a permission issue with /var/run/unifi
.
From /usr/lib/unifi/logs/mongodb.log
:
...
2022-08-12T05:32:03.033+0000 I CONTROL [main] ***** SERVER RESTARTED *****
2022-08-12T05:32:03.038+0000 I CONTROL [main] ERROR: Cannot write pid file to /usr/lib/unifi/run/mongod.pid: Permission denied
...
Going into the container:
docker exec -it unifi /bin/bash
Checking permissions. Everything seems fine here:
root@docker:/usr/lib/unifi# ls -nsah
total 68K
8.0K drwxr-xr-x 1 1000 1004 4.0K Aug 12 04:02 .
8.0K drwxr-xr-x 1 0 0 4.0K Aug 8 19:03 ..
8.0K drwxr-xr-x 1 1000 1004 4.0K Aug 8 19:03 bin
4.0K drwxr-xr-x 2 1000 1004 4.0K Sep 2 2018 cert
0 lrwxrwxrwx 1 1000 1004 14 Aug 8 19:03 data -> /var/lib/unifi
8.0K drwxr-xr-x 1 1000 1004 4.0K Aug 8 19:03 dl
16K drwxr-xr-x 1 1000 1004 12K Aug 8 19:03 lib
0 lrwxrwxrwx 1 1000 1004 14 Aug 8 19:03 logs -> /var/log/unifi
0 lrwxrwxrwx 1 1000 1004 14 Aug 8 19:03 run -> /var/run/unifi
4.0K -rw-r--r-- 1 1000 1004 1.2K Aug 8 19:00 system.properties.default
8.0K drwxr-xr-x 1 1000 1004 4.0K Aug 8 19:03 webapps
4.0K drwxr-xr-x 3 1000 1004 4.0K Aug 12 04:02 work
Following the symlink:
root@docker:/usr/lib/unifi# cd /var/run
root@docker:/var/run# ls -nsah
total 16K
4.0K drwxr-xr-x 1 0 0 4.0K Aug 8 19:03 .
4.0K drwxr-xr-x 1 0 0 4.0K Aug 12 05:31 ..
4.0K drwxrwxrwt 2 0 0 4.0K Aug 1 00:00 lock
4.0K drwxr-x--- 2 999 999 4.0K Aug 8 19:03 unifi
0 -rw-rw-r-- 1 0 43 0 Aug 1 00:00 utmp
Notice how the unifi
directory wasn't fixed by chown at startup. We can fix it manually, at least for this instance:
root@docker:/var/run# chown 1000:1004 -R unifi
root@docker:/var/run# exit
Checking mongod.log
again:
tail -f mongod.log
2022-08-12T05:32:47.632+0000 I CONTROL [initandlisten] build environment:
2022-08-12T05:32:47.632+0000 I CONTROL [initandlisten] distmod: debian92
2022-08-12T05:32:47.632+0000 I CONTROL [initandlisten] distarch: x86_64
2022-08-12T05:32:47.632+0000 I CONTROL [initandlisten] target_arch: x86_64
...
There's a couple of comments about the directories in the release forum: https://community.ui.com/releases/UniFi-Network-Application-7-2-92/f1903cbc-4daa-4695-ac8c-7324bcff529a
I'm pretty new at contributing on Github, but I figured I'd try to fix this myself. Sent out #104. Hopefully it's done correctly :)