Could not start MongoDB 5.0 running Oracle Linux on VirtualBox

Hi All,

I am new to MongoDB. What I do I follow the installation guide to install MongoDB

Using tarball. My OS is Oracle Linux 8.4

After completed installation

I started
mongod --dbpath /var/lib/mongo --logpath /var/log/mongodb/mongod.log

and always got “illegal instruction (core dumped)”

I dont know how to check it, and there is no log too and not sure why coredump.

Can you advise where to check and how to fix it?

Appreciated . Thanks

1 Like

May be it is a permissions issue
mongodb is unable to access dbpath & logpath directories
Does the owner of mongod have read/write privs on these dirs

For test purpse you can change db & log path to some other dir like your home dir and check

1 Like

Welcome to the MongoDB Community Forums @Dinh_Hoang !

An illegal instruction error suggests that you are running a binary which is not supported by your CPU.

Can you confirm:

  • Your CPU details
  • Version of MongoDB server you have installed

Regards,
Stennie

1 Like

Thanks for reply.

I change dir again and start it but it is still the same

[mongod@localhost ~]$ ls -lrt
total 0
drwxrwxr-x. 2 mongod mongod  6 Aug 21 09:03 mongo
drwxrwxr-x. 3 mongod mongod 21 Aug 21 09:03 log
[mongod@localhost ~]$ ls -lrt /home/mongod/log/mongodb/
total 0
[mongod@localhost ~]$ ls -lrt /home/mongod/mongo
total 0
[mongod@localhost ~]$ mongod --dbpath /home/mongod/mongo --logpath /home/mongod/log/mongodb/mongod.log
Illegal instruction (core dumped)
[mongod@localhost ~]$

I am using Oracle Linux 8.4 on Virtual Box, It is x86-64 bits

I downloaded Linux redhat/CentOS 8.0. Is it correct bin?

Thanks for your help

1 Like

Just add in more detail for OS

   Static hostname: localhost.localdomain
         Icon name: computer-vm
           Chassis: vm
        Machine ID: ff3df1686a26409199f9686b0646ca6a
           Boot ID: 88496d361dad421e9d1e11113f9559f6
    Virtualization: oracle
  Operating System: Oracle Linux Server 8.4
       CPE OS Name: cpe:/o:oracle:linux:8:4:server
            Kernel: Linux 5.4.17-2102.201.3.el8uek.x86_64
      Architecture: x86-64

Hi All,

I downloaded 4.4 and it works, I am not sure why latest version 5.0.2 did not work for Oracle Linux 8.4

Have a nice day!

Thanks

2 Likes

Hi @Dinh_Hoang,

This is likely related to changes in 5.0.

cat /proc/cpuinfo has many of the details to look this up.

2 Likes

Hi @Dinh_Hoang ,

Can you provide the output of /proc/cpuinfo as @chris suggested?

The likely reason for encountering an illegal instruction is that your CPU does not meet the x86_64 microarchitecture requirements for MongoDB 5.0.

Regards,
Stennie

1 Like

Hi Chris and Stennie,

Here is my info

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 142
model name      : Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
stepping        : 10
microcode       : 0xffffffff
cpu MHz         : 1895.999
cache size      : 6144 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 4
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 22
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni ssse3 cx16 pcid sse4_1 sse4_2 hypervisor lahf_lm invpcid_single pti fsgsbase invpcid md_clear flush_l1d arch_capabilities
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 3791.99
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

There is 4 cores , So it should be a “Sandy Bridge* or later Core processor”
therefore I am confusing why It did not work for MongoDB 5

Thanks

I found the note

MongoDB only supports Oracle Linux running the Red Hat Compatible Kernel (RHCK). MongoDB does not support the Unbreakable Enterprise Kernel (UEK).

It could be I am using kernel UEK, but how to check and confirm it?

1 Like

#uname -a
Linux localhost.localdomain 5.4.17-2102.201.3.el8uek.x86_64 #2 SMP Fri Apr 23 09:05:57 PDT 2021 x86_64 x86_64 x86_64 GNU/Linux

It is EUK kernel but it works for 4.4 not 5.0.2, It is strange

1 Like

Hi @Dinh_Hoang,

Your Core i5-8350U CPU looks like it should have the right feature support, but your /proc/cpuinfo output is missing AVX extensions.

Can you confirm:

  • version of VirtualBox used
  • host O/S

It looks like there are a few conditions for AVX support in VirtualBox:

Regards,
Stennie

2 Likes

Hi Stennie,

My Virtual box version is 6.1.26 (latest version) and on Win10 OS.

I tried 5.0.2 on Red hat OS 7.8, it works perfectly. Therefore it could be something with Oracle Linux kernel

Thanks
Dinh

1 Like