Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoDB not supported by CPU #4

Closed
1 task done
ScumbagSteve opened this issue Sep 7, 2023 · 8 comments
Closed
1 task done

MongoDB not supported by CPU #4

ScumbagSteve opened this issue Sep 7, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@ScumbagSteve
Copy link

Is this a new feature request?

  • I have searched the existing issues

Wanted change

I tried switching to Unifi Network Application, and tried to set up MongoDB.
Unfortunately at bootup I get the message, that MongoDB is not supported by my CPU:

WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!
  see https://jira.mongodb.org/browse/SERVER-54407
  see also https://www.mongodb.com/community/forums/t/mongodb-5-0-cpu-intel-g4650-compatibility/116610/2
  see also https://github.com/docker-library/mongo/issues/485#issuecomment-891991814

Are there any other way to use the new controller docker?

My server is around 3-4 years old.
I think there must be more people unable to run MongoDB. Maybe consider supporting other databases.

Reason for change

I can't be the only one with this issue.

Proposed code change

No response

@ScumbagSteve ScumbagSteve added the enhancement New feature or request label Sep 7, 2023
@github-actions
Copy link

github-actions bot commented Sep 7, 2023

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

@aptalca
Copy link
Member

aptalca commented Sep 7, 2023

You're not the only one but it is what it is. It's a mongodb restriction and the links provided in the log entry explain what it is. Nothing we can do.

@aptalca aptalca closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2023
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Sep 7, 2023
@drizuid drizuid pinned this issue Sep 8, 2023
@5p4k
Copy link

5p4k commented Sep 14, 2023

For anyone else encountering this issue on ARM (specifically I am running on a Raspberry Pi 4), the version 4.4.18 of MongoDB still runs and seems to be compatible with UniFi Network Application. The message on ARM is the following

WARNING: MongoDB requires ARMv8.2-A or higher, and your current system does not appear to implement any of the common features for that!
  applies to all versions ≥5.0, any of 4.4 ≥4.4.19
  see https://jira.mongodb.org/browse/SERVER-71772
  see https://jira.mongodb.org/browse/SERVER-55178
  see also https://en.wikichip.org/wiki/arm/armv8#ARMv8_Extensions_and_Processor_Features
  see also https://github.com/docker-library/mongo/issues/485#issuecomment-970864306

It seems that arm64v8/mongo:4.4.18 works fine. Here's my full docker compose for the stack (with omitted password and init-mongo.js):

version: "3"

services:
  db:
    # 4.4.18 is the last version that runs on RPi's ARM.
    # Also, we can't use more than 4.4 for Unifi
    image: arm64v8/mongo:4.4.18
    volumes:
      - unifi-db:/data/db
    secrets:
      - source: init-js
        target: /docker-entrypoint-initdb.d/init-mongo.js

  network-application:
    image: lscr.io/linuxserver/unifi-network-application:latest
    environment:
      PUID: 1000
      PGID: 1000
      TZ: Europe/Rome
      MONGO_USER: unifi
      MONGO_PASS: ${DB_PASSWORD}
      MONGO_HOST: db
      MONGO_PORT: 27017
      MONGO_DBNAME: unifi
      # Optional
      # MEM_LIMIT: 1024
      # MEM_STARTUP: 1024
    volumes:
      - unifi-data:/config
    ports:
      - 8443:8443
      - 3478:3478/udp
      - 10001:10001/udp
      - 8080:8080
      # Optional
      - 1900:1900/udp
      - 8843:8843
      - 8880:8880
      - 6789:6789
      - 5514:5514/udp

volumes:
  unifi-data: {}
  unifi-db: {}

secrets:
  init-js:
    file: "${INIT_MONGO_JS}"

@ScumbagSteve
Copy link
Author

On my X64 machine I used docker tag mongo:4.4.6 to make it work in the end. This seems to be the last version without required AVX support as far as I heard.

@poseidogithub
Copy link

poseidogithub commented Mar 25, 2024

For anyone else encountering this issue on ARM (specifically I am running on a Raspberry Pi 4), the version 4.4.18 of MongoDB still runs and seems to be compatible with UniFi Network Application. The message on ARM is the following

WARNING: MongoDB requires ARMv8.2-A or higher, and your current system does not appear to implement any of the common features for that!
  applies to all versions ≥5.0, any of 4.4 ≥4.4.19
  see https://jira.mongodb.org/browse/SERVER-71772
  see https://jira.mongodb.org/browse/SERVER-55178
  see also https://en.wikichip.org/wiki/arm/armv8#ARMv8_Extensions_and_Processor_Features
  see also https://github.com/docker-library/mongo/issues/485#issuecomment-970864306

It seems that arm64v8/mongo:4.4.18 works fine. Here's my full docker compose for the stack (with omitted password and init-mongo.js):

version: "3"

services:
  db:
    # 4.4.18 is the last version that runs on RPi's ARM.
    # Also, we can't use more than 4.4 for Unifi
    image: arm64v8/mongo:4.4.18
    volumes:
      - unifi-db:/data/db
    secrets:
      - source: init-js
        target: /docker-entrypoint-initdb.d/init-mongo.js

  network-application:
    image: lscr.io/linuxserver/unifi-network-application:latest
    environment:
      PUID: 1000
      PGID: 1000
      TZ: Europe/Rome
      MONGO_USER: unifi
      MONGO_PASS: ${DB_PASSWORD}
      MONGO_HOST: db
      MONGO_PORT: 27017
      MONGO_DBNAME: unifi
      # Optional
      # MEM_LIMIT: 1024
      # MEM_STARTUP: 1024
    volumes:
      - unifi-data:/config
    ports:
      - 8443:8443
      - 3478:3478/udp
      - 10001:10001/udp
      - 8080:8080
      # Optional
      - 1900:1900/udp
      - 8843:8843
      - 8880:8880
      - 6789:6789
      - 5514:5514/udp

volumes:
  unifi-data: {}
  unifi-db: {}

secrets:
  init-js:
    file: "${INIT_MONGO_JS}"

WOW thanks,m this worked on my Raspberry Pi 4 2gb running Raspberry Pi OS 64 bit,

@ramonpaolo
Copy link

The MongoDB now can be run in the Raspberry Pi 5(with 4GB or 8GB), because the processor of Raspberry Pi 5 is the ARM Cortex-76, that are the ArmV8.2 that supports the AVX

@educatedCaveman
Copy link

Regarding the error message, if you're running this one vm hosted on proxmox, you would need to set the CPU type to "host". I had a similar issue, but my server and it's CPUs are much older than you make yours out to be. On the off chance that maybe you have a similar setup, maybe try the proposed change?

@clebemachado
Copy link

clebemachado commented Sep 8, 2024

My simplest settings in docker compose:

version: "3"

services:
  mongo:
    image: arm64v8/mongo:4.4.18
    restart: always
    container_name: mongodb
    ports:
      - 27017:27017
    environment:
      MONGO_INITDB_ROOT_USERNAME: orangepi
      MONGO_INITDB_ROOT_PASSWORD: orangepi1234

String connection: mongodb://orangepi:[email protected]:27017/

[lscpu]
My orangepi Architecture: aarch64
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid (does not have fp16)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

7 participants