1

I need help with MongoDB. I am running Ubuntu Server 22.04.3 LTS (Jammy). When I run systemctl status mongod, I get this:

× mongod.service - MongoDB Database Server
     Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
     Active: failed (Result: core-dump) since Sat 2023-10-28 09:41:21 NZDT; 1s ago
       Docs: https://docs.mongodb.org/manual
    Process: 186542 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=dumped, signal=ILL)
   Main PID: 186542 (code=dumped, signal=ILL)
        CPU: 13ms

Oct 28 09:41:20 theserver systemd[1]: Started MongoDB Database Server.
Oct 28 09:41:21 theserver systemd[1]: mongod.service: Main process exited, code=dumped, status=4/ILL
Oct 28 09:41:21 theserver systemd[1]: mongod.service: Failed with result 'core-dump'.

All I am trying to do is run Filecloud community edition.

I have tried everything. Changing the config file, reinstalling it, reinstalling ubuntu, installing other packages, asking multiple AI to help, looking through all the documentaion, and after doing all of that nothing has changed. Here is my config file:

# mongod.conf

# Where and how to store data.
storage:
  dbPath: /var/lib/mongodb
  journal:
    enabled: true

# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log

# network interfaces
net:
  port: 27017
  bindIp: 127.0.0.1

2 Answers 2

2

The "signal=ILL" part of the systemctl output means that MongoDB failed to start because of an illegal instruction.
This is caused by MongoDB 5 and later requiring AVX to run.
You can check if your CPU supports AVX by doing:

cat /proc/cpuinfo | grep avx

If you get any kind of output your CPU should support AVX, if not its either too old or if you are running Linux inside a VM and your hypervisor isn't passing through your physical CPU flags.
For a list of CPUs that support AVX see: https://en.wikipedia.org/wiki/Advanced_Vector_Extensions (basically CPUs started supporting AVX at around 2011)

If your physical CPU is indeed too old your options are:

  • Downgrade to MongoDB 4 which still runs without AVX but will be end of life next year
  • Compile your own version of MongoDB without AVX or look around for community made version without AVX (there are some unoffical containers out there for example)
  • If you are using virtualization make sure your hypervisor isn't hiding your physical CPU flags for compability or other reasons
  • If your hardware is indeed too old to support AVX upgrade to a newer CPU
1
  • 1
    thanks! I guess I am using Nextcloud instead....
    – Creeper39x
    Commented Oct 28, 2023 at 23:33
1

Same thing happened on my end when installing the mongodb current 7.00 version on ubuntu 22.04 using virtual box. Issue Tittle as "mongodb illegal instruction (core dumped)". I have tried many ways. But the problem was not resloved at all. And finally i find out the solution.

Solution:

  1. Just Uninstall the virtual box and then download and install the vmware.
  2. Now install the ubuntu 22.04 inside your vmware machine
  3. Then install the mongodb 7.0v

Or You may just follow the full process to resolve core-dump issue on mongodb by the following link...

https://www.youtube.com/watch?v=8XdK6wN_XVQ&ab_channel=ArtTVGallery

Thanks.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .