linuxserver / docker-unifi-network-application

GNU General Public License v3.0
553 stars 41 forks source link

[BUG] 404 Exception in thread "launcher" #12

Closed denis-ev closed 9 months ago

denis-ev commented 9 months ago

Is there an existing issue for this?

Current Behavior

unifi-network-application  | [migrations] started
unifi-network-application  | [migrations] no migrations found
unifi-network-application  | ───────────────────────────────────────
unifi-network-application  |       ██╗     ███████╗██╗ ██████╗
unifi-network-application  |       ██║     ██╔════╝██║██╔═══██╗
unifi-network-application  |       ██║     ███████╗██║██║   ██║
unifi-network-application  |       ██║     ╚════██║██║██║   ██║
unifi-network-application  |       ███████╗███████║██║╚██████╔╝
unifi-network-application  |       ╚══════╝╚══════╝╚═╝ ╚═════╝
unifi-network-application  |    Brought to you by linuxserver.io
unifi-network-application  | ───────────────────────────────────────
unifi-network-application  | To support LSIO projects visit:
unifi-network-application  | https://www.linuxserver.io/donate/
unifi-network-application  | ───────────────────────────────────────
unifi-network-application  | GID/UID
unifi-network-application  | ───────────────────────────────────────
unifi-network-application  | User UID:    1000
unifi-network-application  | User GID:    100
unifi-network-application  | ───────────────────────────────────────
unifi-network-application  | [custom-init] No custom files found, skipping...
unifi-network-application  | 21:39:38,510 |-INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Could NOT configuration file [/usr/lib/unifi/logback-access.xml] using property "catalina.base"
unifi-network-application  | 21:39:38,510 |-INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Could NOT configuration file [/usr/lib/unifi/logback-access.xml] using property "catalina.home"
unifi-network-application  | 21:39:38,510 |-INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Found [logback-access.xml] as a resource.
unifi-network-application  | 21:39:38,511 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@327ed9f5 - URL [jar:file:/usr/lib/unifi/lib/ace.jar!/logback-access.xml] is not of type file
unifi-network-application  | 21:39:38,520 |-INFO in ch.qos.logback.access.joran.action.ConfigurationAction - debug attribute not set
unifi-network-application  | 21:39:38,520 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
unifi-network-application  | 21:39:38,520 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [access_log]
unifi-network-application  | 21:39:38,521 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@67594471 - No compression will be used
unifi-network-application  | 21:39:38,522 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.access.PatternLayoutEncoder] for [encoder] property
unifi-network-application  | 21:39:38,528 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[access_log] - Active log file name: logs/access.log
unifi-network-application  | 21:39:38,528 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[access_log] - File property is set to [logs/access.log]
unifi-network-application  | 21:39:38,528 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [access_log] to ch.qos.logback.access.tomcat.LogbackValve[null]
unifi-network-application  | 21:39:38,528 |-INFO in ch.qos.logback.access.joran.action.ConfigurationAction - End of configuration.
unifi-network-application  | 21:39:38,528 |-INFO in ch.qos.logback.access.joran.JoranConfigurator@756b58a7 - Registering current configuration as safe fallback point
unifi-network-application  | 21:39:38,528 |-INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Done configuring
unifi-network-application  | Exception in thread "launcher" java.lang.NullPointerException: Web context failed to initialize
unifi-network-application  |    at java.base/java.util.Objects.requireNonNull(Objects.java:235)
unifi-network-application  |    at com.ubnt.net.OoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.ÖÒ0000(Unknown Source)
unifi-network-application  |    at com.ubnt.net.OoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Òo0000(Unknown Source)
unifi-network-application  |    at com.ubnt.service.Object.øÓ0000(Unknown Source)
unifi-network-application  |    at com.ubnt.ace.Launcher.Object(Unknown Source)
unifi-network-application  |    at com.ubnt.ace.Launcher.main(Unknown Source)

Expected Behavior

No response

Steps To Reproduce

new folder, trying to run docker-compose up this error comes up every single time.

Environment

- OS: NixOS
- How docker service was installed: nix configuration

  # List packages installed in system profile. To search, run:
  # $ nix search wget
  environment.systemPackages = with pkgs; [
    docker-compose
  ];

  virtualisation = {
    docker = {
      enable = true;
      autoPrune = {
        enable = true;
        dates = "weekly";
      };
    };
  };

### CPU architecture

x86-64

### Docker creation

```bash
---
version: "2.1"

networks:
  default:
    name: unifi_net

services:
  unifi-network-application:
    image: ghcr.io/linuxserver/unifi-network-application:7.5.174-ls4
    container_name: unifi-network-application
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Australia/Perth
      - MONGO_USER=unifi
      - MONGO_PASS=unifi-pass
      - MONGO_HOST=unifi-db
      - MONGO_PORT=27017
      - MONGO_DBNAME=unifidb
      - MEM_LIMIT=1024 #optional
      - MEM_STARTUP=1024 #optional
    volumes:
      - ./config:/config
    ports:
      - 8443:8443
      - 3478:3478/udp
      - 10001:10001/udp
      - 8080:8080
      #- 1900:1900/udp #optional
      #- 8843:8843 #optional
      #- 8880:8880 #optional
      #- 6789:6789 #optional
      #- 5514:5514/udp #optional
    restart: unless-stopped
    depends_on:
      - unifi-db

  unifi-db:
    image: mongo:4
    restart: always
    environment:
      - MONGO_INITDB_DATABASE=unifidb
      - MONGO_INITDB_ROOT_USERNAME=unifi
      - MONGO_INITDB_ROOT_PASSWORD=unifi-pass
    volumes:
      - ./db:/data/db
      - ./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro

### Container logs

```bash
[denis@nixos:~/docker/unifi]$ docker-compose logs -f
unifi-network-application  | [migrations] started
unifi-network-application  | [migrations] no migrations found
unifi-network-application  | ───────────────────────────────────────
unifi-network-application  |       ██╗     ███████╗██╗ ██████╗
unifi-network-application  |       ██║     ██╔════╝██║██╔═══██╗
unifi-network-application  |       ██║     ███████╗██║██║   ██║
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:40.867+00:00"},"s":"I",  "c":"CONTROL",  "id":23285,   "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:40.869+00:00"},"s":"I",  "c":"NETWORK",  "id":4648601, "ctx":"main","msg":"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize."}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:40.870+00:00"},"s":"I",  "c":"STORAGE",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":1,"port":27017,"dbPath":"/data/db","architecture":"64-bit","host":"6e8d5700d3b6"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:40.870+00:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"4.4.24","gitVersion":"0b86b9b7b42ad9970c5f818c527dd86c0634243a","openSSLVersion":"OpenSSL 1.1.1f  31 Mar 2020","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu2004","distarch":"x86_64","target_arch":"x86_64"}}}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:40.870+00:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Ubuntu","version":"20.04"}}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:40.870+00:00"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"bindIp":"*"},"security":{"authorization":"enabled"}}}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:40.870+00:00"},"s":"I",  "c":"STORAGE",  "id":22270,   "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/data/db","storageEngine":"wiredTiger"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:40.870+00:00"},"s":"I",  "c":"STORAGE",  "id":22297,   "ctx":"initandlisten","msg":"Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem","tags":["startupWarnings"]}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:40.870+00:00"},"s":"I",  "c":"STORAGE",  "id":22315,   "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=7435M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress,compact_progress],"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:41.365+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1694871461:365964][1:0x7f7c3b92ecc0], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 2 through 3"}}
unifi-network-application  |       ██║     ╚════██║██║██║   ██║
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:41.401+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1694871461:401506][1:0x7f7c3b92ecc0], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 3 through 3"}}
unifi-network-application  |       ███████╗███████║██║╚██████╔╝
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:41.459+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1694871461:459394][1:0x7f7c3b92ecc0], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Main recovery loop: starting at 2/474752 to 3/256"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:41.525+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1694871461:525466][1:0x7f7c3b92ecc0], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 2 through 3"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:41.571+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1694871461:571404][1:0x7f7c3b92ecc0], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 3 through 3"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:41.604+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1694871461:604942][1:0x7f7c3b92ecc0], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Set global recovery timestamp: (0, 0)"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:41.604+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1694871461:604987][1:0x7f7c3b92ecc0], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Set global oldest timestamp: (0, 0)"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:41.615+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1694871461:615693][1:0x7f7c3b92ecc0], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 1, snapshot max: 1 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 66"}}
unifi-network-application  |       ╚══════╝╚══════╝╚═╝ ╚═════╝
unifi-network-application  |    Brought to you by linuxserver.io
unifi-network-application  | ───────────────────────────────────────
unifi-network-application  | To support LSIO projects visit:
unifi-network-application  | https://www.linuxserver.io/donate/
unifi-network-application  | ───────────────────────────────────────
unifi-network-application  | GID/UID
unifi-network-application  | ───────────────────────────────────────
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:41.636+00:00"},"s":"I",  "c":"STORAGE",  "id":4795906, "ctx":"initandlisten","msg":"WiredTiger opened","attr":{"durationMillis":766}}
unifi-network-application  | User UID:    1000
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:41.636+00:00"},"s":"I",  "c":"RECOVERY", "id":23987,   "ctx":"initandlisten","msg":"WiredTiger recoveryTimestamp","attr":{"recoveryTimestamp":{"$timestamp":{"t":0,"i":0}}}}
unifi-network-application  | User GID:    100
unifi-network-application  | ───────────────────────────────────────
unifi-network-application  | [custom-init] No custom files found, skipping...
unifi-network-application  | 21:39:38,510 |-INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Could NOT configuration file [/usr/lib/unifi/logback-access.xml] using property "catalina.base"
unifi-network-application  | 21:39:38,510 |-INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Could NOT configuration file [/usr/lib/unifi/logback-access.xml] using property "catalina.home"
unifi-network-application  | 21:39:38,510 |-INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Found [logback-access.xml] as a resource.
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:41.664+00:00"},"s":"I",  "c":"STORAGE",  "id":22262,   "ctx":"initandlisten","msg":"Timestamp monitor starting"}
unifi-network-application  | 21:39:38,511 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@327ed9f5 - URL [jar:file:/usr/lib/unifi/lib/ace.jar!/logback-access.xml] is not of type file
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:41.739+00:00"},"s":"I",  "c":"STORAGE",  "id":20536,   "ctx":"initandlisten","msg":"Flow Control is enabled on this deployment"}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:41.742+00:00"},"s":"I",  "c":"FTDC",     "id":20625,   "ctx":"initandlisten","msg":"Initializing full-time diagnostic data capture","attr":{"dataDirectory":"/data/db/diagnostic.data"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:41.743+00:00"},"s":"I",  "c":"REPL",     "id":6015317, "ctx":"initandlisten","msg":"Setting new configuration state","attr":{"newState":"ConfigReplicationDisabled","oldState":"ConfigPreStart"}}
unifi-network-application  | 21:39:38,520 |-INFO in ch.qos.logback.access.joran.action.ConfigurationAction - debug attribute not set
unifi-network-application  | 21:39:38,520 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
unifi-network-application  | 21:39:38,520 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [access_log]
unifi-network-application  | 21:39:38,521 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@67594471 - No compression will be used
unifi-network-application  | 21:39:38,522 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.access.PatternLayoutEncoder] for [encoder] property
unifi-network-application  | 21:39:38,528 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[access_log] - Active log file name: logs/access.log
unifi-network-application  | 21:39:38,528 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[access_log] - File property is set to [logs/access.log]
unifi-network-application  | 21:39:38,528 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [access_log] to ch.qos.logback.access.tomcat.LogbackValve[null]
unifi-network-application  | 21:39:38,528 |-INFO in ch.qos.logback.access.joran.action.ConfigurationAction - End of configuration.
unifi-network-application  | 21:39:38,528 |-INFO in ch.qos.logback.access.joran.JoranConfigurator@756b58a7 - Registering current configuration as safe fallback point
unifi-network-application  | 21:39:38,528 |-INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Done configuring
unifi-network-application  | Exception in thread "launcher" java.lang.NullPointerException: Web context failed to initialize
unifi-network-application  |    at java.base/java.util.Objects.requireNonNull(Objects.java:235)
unifi-network-application  |    at com.ubnt.net.OoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.ÖÒ0000(Unknown Source)
unifi-network-application  |    at com.ubnt.net.OoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Òo0000(Unknown Source)
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:41.744+00:00"},"s":"I",  "c":"NETWORK",  "id":23015,   "ctx":"listener","msg":"Listening on","attr":{"address":"/tmp/mongodb-27017.sock"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:41.744+00:00"},"s":"I",  "c":"NETWORK",  "id":23015,   "ctx":"listener","msg":"Listening on","attr":{"address":"0.0.0.0"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:37:41.744+00:00"},"s":"I",  "c":"NETWORK",  "id":23016,   "ctx":"listener","msg":"Waiting for connections","attr":{"port":27017,"ssl":"off"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:38:41.668+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"WTCheckpointThread","msg":"WiredTiger message","attr":{"message":"[1694871521:668736][1:0x7f7c3491f700], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 3, snapshot max: 3 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 66"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:41.706+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"WTCheckpointThread","msg":"WiredTiger message","attr":{"message":"[1694871581:706644][1:0x7f7c3491f700], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 6, snapshot max: 6 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 66"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:43.780+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"172.29.0.3:42774","connectionId":1,"connectionCount":1}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:43.780+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"172.29.0.3:42776","connectionId":2,"connectionCount":2}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:43.813+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn1","msg":"client metadata","attr":{"remote":"172.29.0.3:42774","client":"conn1","doc":{"driver":{"name":"mongo-java-driver|sync","version":"4.6.1"},"os":{"type":"Linux","name":"Linux","architecture":"amd64","version":"6.1.52"},"platform":"Java/Private Build/17.0.8.1+1-Ubuntu-0ubuntu122.04"}}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:43.813+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn2","msg":"client metadata","attr":{"remote":"172.29.0.3:42776","client":"conn2","doc":{"driver":{"name":"mongo-java-driver|sync","version":"4.6.1"},"os":{"type":"Linux","name":"Linux","architecture":"amd64","version":"6.1.52"},"platform":"Java/Private Build/17.0.8.1+1-Ubuntu-0ubuntu122.04"}}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:43.842+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"172.29.0.3:42784","connectionId":3,"connectionCount":3}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:43.844+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn3","msg":"client metadata","attr":{"remote":"172.29.0.3:42784","client":"conn3","doc":{"driver":{"name":"mongo-java-driver|sync","version":"4.6.1"},"os":{"type":"Linux","name":"Linux","architecture":"amd64","version":"6.1.52"},"platform":"Java/Private Build/17.0.8.1+1-Ubuntu-0ubuntu122.04"}}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:43.882+00:00"},"s":"I",  "c":"ACCESS",   "id":20250,   "ctx":"conn3","msg":"Authentication succeeded","attr":{"mechanism":"SCRAM-SHA-256","speculative":true,"principalName":"unifi","authenticationDatabase":"unifidb","remote":"172.29.0.3:42784","extraInfo":{}}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:43.888+00:00"},"s":"I",  "c":"ACCESS",   "id":20436,   "ctx":"conn3","msg":"Checking authorization failed","attr":{"error":{"code":13,"codeName":"Unauthorized","errmsg":"not authorized on unifidb to execute command { serverStatus: 1, $db: \"unifidb\", lsid: { id: UUID(\"38d84c8d-d4f9-4f53-9311-87e8f92dbc87\") } }"}}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:46.897+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"172.29.0.3:42798","connectionId":4,"connectionCount":4}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:46.897+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"172.29.0.3:42814","connectionId":5,"connectionCount":5}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:46.897+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn4","msg":"client metadata","attr":{"remote":"172.29.0.3:42798","client":"conn4","doc":{"driver":{"name":"mongo-java-driver|sync","version":"4.6.1"},"os":{"type":"Linux","name":"Linux","architecture":"amd64","version":"6.1.52"},"platform":"Java/Private Build/17.0.8.1+1-Ubuntu-0ubuntu122.04"}}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:46.898+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn5","msg":"client metadata","attr":{"remote":"172.29.0.3:42814","client":"conn5","doc":{"driver":{"name":"mongo-java-driver|sync","version":"4.6.1"},"os":{"type":"Linux","name":"Linux","architecture":"amd64","version":"6.1.52"},"platform":"Java/Private Build/17.0.8.1+1-Ubuntu-0ubuntu122.04"}}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:47.403+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"172.29.0.3:42816","connectionId":6,"connectionCount":6}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:47.404+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn6","msg":"client metadata","attr":{"remote":"172.29.0.3:42816","client":"conn6","doc":{"driver":{"name":"mongo-java-driver|sync","version":"4.6.1"},"os":{"type":"Linux","name":"Linux","architecture":"amd64","version":"6.1.52"},"platform":"Java/Private Build/17.0.8.1+1-Ubuntu-0ubuntu122.04"}}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:47.430+00:00"},"s":"I",  "c":"ACCESS",   "id":20250,   "ctx":"conn6","msg":"Authentication succeeded","attr":{"mechanism":"SCRAM-SHA-256","speculative":true,"principalName":"unifi","authenticationDatabase":"unifidb","remote":"172.29.0.3:42816","extraInfo":{}}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:47.430+00:00"},"s":"I",  "c":"ACCESS",   "id":20436,   "ctx":"conn6","msg":"Checking authorization failed","attr":{"error":{"code":13,"codeName":"Unauthorized","errmsg":"not authorized on unifidb_stat to execute command { listCollections: 1, cursor: {}, nameOnly: true, $db: \"unifidb_stat\", lsid: { id: UUID(\"a815e1e6-9694-4f83-bea4-4f8d32374b77\") } }"}}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:47.434+00:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn6","msg":"Connection ended","attr":{"remote":"172.29.0.3:42816","connectionId":6,"connectionCount":5}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:47.434+00:00"},"s":"I",  "c":"-",        "id":20883,   "ctx":"conn4","msg":"Interrupted operation as its client disconnected","attr":{"opId":1749}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:47.434+00:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn5","msg":"Connection ended","attr":{"remote":"172.29.0.3:42814","connectionId":5,"connectionCount":4}}
unifi-network-application  |    at com.ubnt.service.Object.øÓ0000(Unknown Source)
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:47.434+00:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn4","msg":"Connection ended","attr":{"remote":"172.29.0.3:42798","connectionId":4,"connectionCount":3}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:47.436+00:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn3","msg":"Connection ended","attr":{"remote":"172.29.0.3:42784","connectionId":3,"connectionCount":2}}
unifi-network-application  |    at com.ubnt.ace.Launcher.Object(Unknown Source)
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:47.436+00:00"},"s":"I",  "c":"-",        "id":20883,   "ctx":"conn1","msg":"Interrupted operation as its client disconnected","attr":{"opId":1546}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:47.436+00:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn2","msg":"Connection ended","attr":{"remote":"172.29.0.3:42776","connectionId":2,"connectionCount":1}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:39:47.436+00:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn1","msg":"Connection ended","attr":{"remote":"172.29.0.3:42774","connectionId":1,"connectionCount":0}}
unifi-network-application  |    at com.ubnt.ace.Launcher.main(Unknown Source)
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:40:41.734+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"WTCheckpointThread","msg":"WiredTiger message","attr":{"message":"[1694871641:734046][1:0x7f7c3491f700], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 14, snapshot max: 14 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 66"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:41:41.777+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"WTCheckpointThread","msg":"WiredTiger message","attr":{"message":"[1694871701:777193][1:0x7f7c3491f700], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 17, snapshot max: 17 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 66"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:42:41.802+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"WTCheckpointThread","msg":"WiredTiger message","attr":{"message":"[1694871761:802365][1:0x7f7c3491f700], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 19, snapshot max: 19 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 66"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:43:41.821+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"WTCheckpointThread","msg":"WiredTiger message","attr":{"message":"[1694871821:821462][1:0x7f7c3491f700], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 21, snapshot max: 21 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 66"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:44:41.846+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"WTCheckpointThread","msg":"WiredTiger message","attr":{"message":"[1694871881:846033][1:0x7f7c3491f700], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 23, snapshot max: 23 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 66"}}
unifi-unifi-db-1           | {"t":{"$date":"2023-09-16T13:45:41.866+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"WTCheckpointThread","msg":"WiredTiger message","attr":{"message":"[1694871941:866804][1:0x7f7c3491f700], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 25, snapshot max: 25 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 66"}}
github-actions[bot] commented 9 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

Civil commented 9 months ago

I had similar problem and root cause was mentioned in the logs. It was trying to use database unifi_stat and failing.

Search for messages that have something like:

not authorized on unifi_stat to execute command { listCollections

I've fixed that by adding unifi user to unifi_stat database in my mongo. And it is actually mentioned here: https://github.com/linuxserver/docker-unifi-network-application#setting-up-your-external-database

neatherweb commented 9 months ago

I had this issue after following the instructions for mongodb init - but found the permission for both DBs needed to be provisioned under the user in primary DB - it seems as the app will establish a common session to unifi, but access both unifi and unifi_stat.
Bellow user setup fixed things for me, db.getSiblingDB("unifi").createUser({user: "unifi", pwd: "yourpassword", roles: [{role: "readWrite", db: "unifi"}, {role: "readWrite", db: "unifi_stat"}]});

I'm using mongodb 6.0.10

clee commented 9 months ago

I'll add here that readWrite does not seem to be sufficient if you're trying to restore a backup. At least, it wasn't for me using mongo 4.4. With @neatherweb's modified command, I got the unifi-network-application image to at least show the web UI, but when I tried to restore my config, I found the following error in logs/server.log: [2023-09-23 05:10:59,828] <webapi-3> ERROR system - Fail to restore com.mongodb.MongoCommandException: Command failed with error 13 (Unauthorized): 'not authorized on unifi to execute command { dropDatabase: 1, $db: "unifi", lsid: { id: UUID("e0e71c9d-2a01-49fd-b3b2-60fc7874d5ae") } }' on server mongo.database:27017. The full response is {"ok": 0.0, "errmsg": "not authorized on unifi to execute command { dropDatabase: 1, $db: \"unifi\", lsid: { id: UUID(\"e0e71c9d-2a01-49fd-b3b2-60fc7874d5ae\") } }", "code": 13, "codeName": "Unauthorized"}

Updating the role to use dbOwner seemed to do the trick. I used db.updateUser('unifi', {roles: [{'role':'dbOwner','db':'unifi'},{'role':'dbOwner','db':'unifi_stat'}]}); (edit: I mistakenly typed dbAdmin instead of dbOwner here initially, oops).