Unifi-Controller MongoDB crash on startup with Signal 7 (Bus Error)

Hi, i’m deploying the Unifi-Controller to my RPi 4 4GB via docker-compose.
The docker-compose.yml is this:

---
version: "2.1"
services:
  unifi-controller:
    image: linuxserver/unifi-controller:LTS
    container_name: unifi-controller
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Rome
    volumes:
      - /media/ssd/my-docker/unifi/config:/config
    ports:
      - 3478:3478/udp
      - 10001:10001/udp
      - 8080:8080
      - 8443:8443
      - 6789:6789
    restart: unless-stopped
    networks:
      - traefik_default
    
networks:
  traefik_default:
    external:
      name: traefik_default

After the deployment, the docker log say this:

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


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

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...
Warning:
The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using "keytool -importkeystore -srckeystore /config/data/keystore -destkeystore /config/data/keystore -deststoretype pkcs12".
[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.

After that the web console does not come up, and inspecting the logs i see:

server.log

tail -f server.log
[2020-08-06 11:02:45,657] <db-server> ERROR system - [exec] error, rc=14
[2020-08-06 11:02:45,658] <db-server> INFO  db     - DbServer stopped
[2020-08-06 11:02:49,732] <db-server> ERROR system - [exec] error, rc=14
[2020-08-06 11:02:49,733] <db-server> INFO  db     - DbServer stopped
[2020-08-06 11:02:53,805] <db-server> ERROR system - [exec] error, rc=14
[2020-08-06 11:02:53,805] <db-server> INFO  db     - DbServer stopped
[2020-08-06 11:02:57,879] <db-server> ERROR system - [exec] error, rc=14
[2020-08-06 11:02:57,880] <db-server> INFO  db     - DbServer stopped
[2020-08-06 11:03:01,951] <db-server> ERROR system - [exec] error, rc=14
[2020-08-06 11:03:01,951] <db-server> INFO  db     - DbServer stopped
[2020-08-06 11:03:06,022] <db-server> ERROR system - [exec] error, rc=14
[2020-08-06 11:03:06,022] <db-server> INFO  db     - DbServer stopped
[2020-08-06 11:03:10,098] <db-server> ERROR system - [exec] error, rc=14
[2020-08-06 11:03:10,098] <db-server> INFO  db     - DbServer stopped

mongodb.log

tail -f mongod.log
Backtrace:0x7639be 0x762f6e 0x76300a 0xf7784270 0x42bbf6 0x42cf24 0x763c72 0x1c4f80 0xf77758aa
 bin/mongod(_ZN5mongo15printStackTraceERSo+0x25) [0x7639be]
 bin/mongod() [0x762f6e]
 bin/mongod() [0x76300a]
 /lib/arm-linux-gnueabihf/libc.so.6(+0x25270) [0xf7784270]
 bin/mongod(_ZN5mongo12BsonUnitTest10testboundsEv+0x71) [0x42bbf6]
 bin/mongod(_ZN5mongo12BsonUnitTest3runEv+0x2c7) [0x42cf24]
 bin/mongod(_ZN5mongo11StartupTest8runTestsEv+0x25) [0x763c72]
 bin/mongod(main+0x18b) [0x1c4f80]
 /lib/arm-linux-gnueabihf/libc.so.6(__libc_start_main+0x9d) [0xf77758aa]
2020-08-06T11:00:18.658+0200 ***** SERVER RESTARTED *****
2020-08-06T11:00:18.663+0200 SEVERE: Invalid access at address: 0x478a6cb
2020-08-06T11:00:18.666+0200 SEVERE: Got signal: 7 (Bus error).
Backtrace:0x7639be 0x762f6e 0x76300a 0xf714a270 0x42bbf6 0x42cf24 0x763c72 0x1c4f80 0xf713b8aa
 bin/mongod(_ZN5mongo15printStackTraceERSo+0x25) [0x7639be]
 bin/mongod() [0x762f6e]
 bin/mongod() [0x76300a]
 /lib/arm-linux-gnueabihf/libc.so.6(+0x25270) [0xf714a270]
 bin/mongod(_ZN5mongo12BsonUnitTest10testboundsEv+0x71) [0x42bbf6]
 bin/mongod(_ZN5mongo12BsonUnitTest3runEv+0x2c7) [0x42cf24]
 bin/mongod(_ZN5mongo11StartupTest8runTestsEv+0x25) [0x763c72]
 bin/mongod(main+0x18b) [0x1c4f80]
 /lib/arm-linux-gnueabihf/libc.so.6(__libc_start_main+0x9d) [0xf713b8aa]
2020-08-06T11:00:22.742+0200 ***** SERVER RESTARTED *****
2020-08-06T11:00:22.751+0200 SEVERE: Invalid access at address: 0x2efe6cb
2020-08-06T11:00:22.759+0200 SEVERE: Got signal: 7 (Bus error).
Backtrace:0x7639be 0x762f6e 0x76300a 0xf7257270 0x42bbf6 0x42cf24 0x763c72 0x1c4f80 0xf72488aa
 bin/mongod(_ZN5mongo15printStackTraceERSo+0x25) [0x7639be]
 bin/mongod() [0x762f6e]
 bin/mongod() [0x76300a]
 /lib/arm-linux-gnueabihf/libc.so.6(+0x25270) [0xf7257270]
 bin/mongod(_ZN5mongo12BsonUnitTest10testboundsEv+0x71) [0x42bbf6]
 bin/mongod(_ZN5mongo12BsonUnitTest3runEv+0x2c7) [0x42cf24]
 bin/mongod(_ZN5mongo11StartupTest8runTestsEv+0x25) [0x763c72]
 bin/mongod(main+0x18b) [0x1c4f80]
 /lib/arm-linux-gnueabihf/libc.so.6(__libc_start_main+0x9d) [0xf72488aa]

Seems mondodb crash on startup.
Same behaviour using label “latest” for the unifi image version.

Could you try mapping the /config folder to /home/usernamehere/unifi as a test? I think it might be a permissions issue.

1 Like

Hi j0nnymoe,
sorry for delay, i was on summer holydays :slight_smile: !
i changed the mapping of /config to /home/pi/unifi-test (i leaved the creation of the folder test-unifi to docker-compose), but i’ve got the same error from mongodb.
For test i even changed permission to 777 of the folder test-unifi, same issue.

Here the mongodb.log latest lines:

2020-08-24T10:10:55.857+0200 ***** SERVER RESTARTED *****
2020-08-24T10:10:55.859+0200 SEVERE: Invalid access at address: 0x4c3731b
2020-08-24T10:10:55.869+0200 SEVERE: Got signal: 7 (Bus error).
Backtrace:0x7639be 0x762f6e 0x76300a 0xf748d270 0x75ece4 0x75cd7e 0x75cdf4 0x1f0300 0x1fc81a 0x1fcb7e 0x1fcdc8 0x1c4e64 0xf747e8aa
 bin/mongod(_ZN5mongo15printStackTraceERSo+0x25) [0x7639be]
 bin/mongod() [0x762f6e]
 bin/mongod() [0x76300a]
 /lib/arm-linux-gnueabihf/libc.so.6(+0x25270) [0xf748d270]
 bin/mongod(_ZN5mongo11ProcessInfo10SystemInfo17collectSystemInfoEv+0x87f) [0x75ece4]
 bin/mongod(_ZN5mongo11ProcessInfo20initializeSystemInfoEv+0x7d) [0x75cd7e]
 bin/mongod(_ZN5mongo36_mongoInitializerFunction_SystemInfoEPNS_18InitializerContextE+0x7) [0x75cdf4]
 bin/mongod(_ZN5boost6detail8function17function_invoker1IPFN5mongo6StatusEPNS3_18InitializerContextEES4_S6_E6invokeERNS1_15function_bufferES6_+0x17) [0x1f0300]
 bin/mongod(_ZNK5mongo11Initializer7executeERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKSt3mapIS7_S7_St4lessIS7_ESaISt4pairIKS7_S7_EEE+0x15d) [0x1fc81a]
 bin/mongod(_ZN5mongo21runGlobalInitializersERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EERKSt3mapIS6_S6_St4lessIS6_ESaISt4pairIKS6_S6_EEE+0x29) [0x1fcb7e]
 bin/mongod(_ZN5mongo21runGlobalInitializersEiPKPKcS3_+0x22b) [0x1fcdc8]
 bin/mongod(main+0x6f) [0x1c4e64]
 /lib/arm-linux-gnueabihf/libc.so.6(__libc_start_main+0x9d) [0xf747e8aa]
2020-08-24T10:10:59.940+0200 ***** SERVER RESTARTED *****
2020-08-24T10:10:59.942+0200 SEVERE: Invalid access at address: 0x4a2931b
2020-08-24T10:10:59.947+0200 SEVERE: Got signal: 7 (Bus error).
Backtrace:0x7639be 0x762f6e 0x76300a 0xf75fe270 0x75ece4 0x75cd7e 0x75cdf4 0x1f0300 0x1fc81a 0x1fcb7e 0x1fcdc8 0x1c4e64 0xf75ef8aa
 bin/mongod(_ZN5mongo15printStackTraceERSo+0x25) [0x7639be]
 bin/mongod() [0x762f6e]
 bin/mongod() [0x76300a]
 /lib/arm-linux-gnueabihf/libc.so.6(+0x25270) [0xf75fe270]
 bin/mongod(_ZN5mongo11ProcessInfo10SystemInfo17collectSystemInfoEv+0x87f) [0x75ece4]
 bin/mongod(_ZN5mongo11ProcessInfo20initializeSystemInfoEv+0x7d) [0x75cd7e]
 bin/mongod(_ZN5mongo36_mongoInitializerFunction_SystemInfoEPNS_18InitializerContextE+0x7) [0x75cdf4]
 bin/mongod(_ZN5boost6detail8function17function_invoker1IPFN5mongo6StatusEPNS3_18InitializerContextEES4_S6_E6invokeERNS1_15function_bufferES6_+0x17) [0x1f0300]
 bin/mongod(_ZNK5mongo11Initializer7executeERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKSt3mapIS7_S7_St4lessIS7_ESaISt4pairIKS7_S7_EEE+0x15d) [0x1fc81a]
 bin/mongod(_ZN5mongo21runGlobalInitializersERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EERKSt3mapIS6_S6_St4lessIS6_ESaISt4pairIKS6_S6_EEE+0x29) [0x1fcb7e]
 bin/mongod(_ZN5mongo21runGlobalInitializersEiPKPKcS3_+0x22b) [0x1fcdc8]
 bin/mongod(main+0x6f) [0x1c4e64]
 /lib/arm-linux-gnueabihf/libc.so.6(__libc_start_main+0x9d) [0xf75ef8aa]

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.