Error start mongodb centos7

good morning

I installed mongodb on a virtual machine with centos 7 operating system.
I followed the guide on the mongodb site
Install MongoDB Community Edition on Red Hat or CentOS

When I run the command systemctl start mongod
gives me the following error
Job for mongod.service failed because a fatal signal was delivered to the control process. See “systemctl status mongod.service” and “journalctl -xe” for details.

The following command systemctl status mongod.service returns

  Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
   Active: failed (Result: signal) since Wed 2022-03-30 13:58:28 CEST; 5min ago
     Docs: https://docs.mongodb.org/manual
  Process: 52061 ExecStart = / usr / bin / mongod $ OPTIONS (code = killed, signal = ILL)
  Process: 52058 ExecStartPre = / usr / bin / chmod 0755 / var / run / mongodb (code = exited, status = 0 / SUCCESS)
  Process: 52055 ExecStartPre = / usr / bin / chown mongod: mongod / var / run / mongodb (code = exited, status = 0 / SUCCESS)
  Process: 52053 ExecStartPre = / usr / bin / mkdir -p / var / run / mongodb (code = exited, status = 0 / SUCCESS)

Tue 30 13:58:28 mongodba systemd [1]: Starting MongoDB Database Server ...
Tue 30 13:58:28 mongodba systemd [1]: mongod.service: control process exited, code = killed status = 4
Tue 30 13:58:28 mongodba systemd [1]: Failed to start MongoDB Database Server.
Tue 30 13:58:28 mongodba systemd [1]: Unit mongod.service entered failed state.
Tue 30 13:58:28 mongodba systemd [1]: mongod.service failed.

while the journalctl -xe

Tue 30 13:58:12 mongodba crond [51736]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 25% if used.)
Tue 30 13:58:12 mongodba crond [51736]: (CRON) INFO (running with inotify support)
Tue 30 13:58:12 mongodba crond [51736]: (CRON) INFO (@reboot jobs will be run at computer's startup.)
Tue 30 13:58:12 mongodba systemd [1]: Reloading.
Tue 30 13:58:12 mongodba systemd [1]: Reloading.
Tue 30 13:58:12 mongodba systemd [1]: Stopped Dynamic System Tuning Daemon.
- Subject: Unit tuned.service has finished shutting down
- Defined-By: systemd
- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
- Unit tuned.service has finished shutting down.
Tue 30 13:58:12 mongodba systemd [1]: Starting Dynamic System Tuning Daemon ...
- Subject: Unit tuned.service has begun start-up
- Defined-By: systemd
- Support: http:// lists.freedesktop . org /mailman/listinfo/systemd-devel
-
- Unit tuned.service has begun starting up.
Tue 30 13:58:13 mongodba systemd [1]: Started Dynamic System Tuning Daemon.
- Subject: Unit tuned.service has finished start-up
- Defined-By: systemd
- Support: http:/ / lists. freedesktop .org /mailman/listinfo/systemd-devel
-
- Unit tuned.service has finished starting up.
-
- The start-up result is done.
Mar 30 13:58:28 mongodba polkitd [51710]: Registered Authentication Agent for unix-process: 52047: 9623813 (system bus name: 1.100 [/ usr / bin / pkttyagent --notify-fd 5 --fallback], object path / org / freedesktop / P
Tue 30 13:58:28 mongodba systemd [1]: Starting MongoDB Database Server ...
- Subject: Unit mongod.service has begun start-up
- Defined-By: systemd
- Support: http: // lists .freedesktop . org/mailman/listinfo/systemd-devel
-
- Unit mongod.service has begun starting up.
Mar 30 13:58:28 mongodba kernel: traps: mongod [52061] trap invalid opcode ip: 55e8bac4e48a sp: 7ffd62f3cf30 error: 0 in mongod [55e8b6c5d000 + 513a000]
Tue 30 13:58:28 mongodba systemd [1]: mongod.service: control process exited, code = killed status = 4
Tue 30 13:58:28 mongodba systemd [1]: Failed to start MongoDB Database Server.
- Subject: Unit mongod.service has failed
- Defined-By: systemd
- Support: http: // lists .freedesktop .org/  mailman/listinfo/systemd-devel
-
- Unit mongod.service has failed.
-
- The result is failed.
Tue 30 13:58:28 mongodba systemd [1]: Unit mongod.service entered failed state.
Tue 30 13:58:28 mongodba systemd [1]: mongod.service failed.
Tue 30 13:58:28 mongodba polkitd [51710]: Unregistered Authentication Agent for unix-process: 52047: 9623813 (system bus name: 1.100, object path / org / freedesktop / PolicyKit1 / AuthenticationAgent, local en_US.U
Tue 30 14:01:01 mongodba systemd [1]: Started Session 31 of user root.
- Subject: Unit session-31.scope has finished start-up
- Defined-By: systemd
- Support: http :// lists. freedesktop .org/mailman/listinfo/systemd-devel
-
- Unit session-31.scope has finished starting up.
-
- The start-up result is done.
Tue 30 14:01:01 mongodba CROND [52972]: (root) CMD (run-parts /etc/cron.hourly)
Tue 30 14:01:01 mongodba run-parts (/etc/cron.hourly) [52975]: starting 0anacron
Mar 30 14:01:01 mongodba run-parts (/etc/cron.hourly) [52981]: finished 0anacron

the folders for the data are

/ var / lib / mongo (the data directory)
/ var / log / mongodb (the log directory)
and the permissions are correct

What could be causing the problem? How can I solve?

Thanks Alessio

Your dir paths showing spaces?
Can you cd to your dirpath & logpath?
Are they existing with correct permissions and ownership

the directory have spaces

cd /var/lib/
drwxr-xr-x 2 mongod mongod 27 Mar 30 08:12 mongo

cd /var/log/
drwxr-xr-x 2 mongod mongod 24 Mar 28 15:02 mongodb

df -h
/dev/sdb 100G 33M 100G 1% /var/lib/mongo

mount
/dev/sdb on /var/lib/mongo type xfs (rw,relatime,attr2,inode64,noquota)

cat /etc/passwd
mongod:x:997:996:mongod:/var/lib/mongo:/bin/false

these are the characteristics of the configuration. if you need others to help me let me know

ILL is Illegal operation. This is likely due to using an incompatible CPU(old) with later versions of mongod.

Check your CPU meets the requirements.

x86_64

MongoDB requires the following minimum x86_64 microarchitectures: [2]

  • For Intel x86_64 , MongoDB requires one of:
    • a Sandy Bridge or later Core processor, or
    • a Tiger Lake or later Celeron or Pentium processor.
  • For AMD x86_64 , MongoDB requires:
    • a Bulldozer or later processor.

MongoDB 5.0 requires use of the AVX instruction set, available on select Intel and AMD processors.

2 Likes

Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 1
Core(s) per socket: 2
Socket(s): 4
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 23
Model name: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
Stepping: 6
CPU MHz: 2197.455
BogoMIPS: 4394.91
Hypervisor vendor: VMware
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 30720K
NUMA node0 CPU(s): 0-7

VMware, check EVC mode too.

1 Like

I was unable to resolve. Are there any other ideas? Do you need more info?

What did you try?

Provide the output of /proc/cpuinfo

1 Like

processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
stepping : 6
microcode : 0xb000038
cpu MHz : 2197.455
cache size : 30720 KB
physical id : 3
siblings : 2
core id : 1
cpu cores : 2
apicid : 7
initial apicid : 7
fpu : yes
fpu_exception : yes
cpuid level : 10
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 ss ht syscall nx lm constant_tsc arch_perfmon nopl tsc_reliable nonstop_tsc eagerfpu pni ssse3 cx16 sse4_1 tsc_deadline_timer hypervisor lahf_lm ssbd ibrs ibpb stibp tsc_adjust arat spec_ctrl intel_stibp flush_l1d arch_capabilities
bogomips : 4394.91
clflush size : 64
cache_alignment : 64
address sizes : 43 bits physical, 48 bits virtual
power management:

You’re missing AVX in the flags.

The CPU does support them so you need to go back and look at the VMWare EVC modes.

Alternatively go to mongo 4.4 or compile from source.

1 Like

many thanks, it works installing mongo 4.4 in my vmware centos , at this moment I can’t check my vmware EVC mode.