vaamonde / ubuntu-2204

:large_blue_circle: Curso GRÁTIS de GNU/Linux Ubuntu Server 22.04.x LTS (Jammy Jellyfish) Essentials
https://www.youtube.com/playlist?list=PLozhsZB1lLUM1-yu4qP9RZxoejgIfCxdI
MIT License
355 stars 101 forks source link

Ao verificar o serviço do MongoDB Server, apresentado na aula "🤩🤩 Configuração do MongoDB Server no Ubuntu Server 22.04.x LTS Projeto Bora para Prática 🤩🤩" o mesmo relata o erro apresentado na descrição, poderia me ajudar, por favor? #7

Open danielselbachtechofc opened 3 months ago

danielselbachtechofc commented 3 months ago

systemctl status mongod.service × mongod.service - MongoDB Database Server Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled) Active: failed (Result: core-dump) since Fri 2024-08-02 19:21:20 -03; 5min ago Docs: https://docs.mongodb.org/manual Process: 5415 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=dumped, signal=ILL) Main PID: 5415 (code=dumped, signal=ILL) CPU: 7ms

sudo journalctl -t mongod.service -- No entries --

sudo cat /var/log/syslog | grep mongod.service Aug 2 19:16:21 headoffice systemd[1]: mongod.service: Main process exited, code=dumped, status=4/ILL Aug 2 19:16:21 headoffice systemd[1]: mongod.service: Failed with result 'core-dump'. Aug 2 19:16:29 headoffice systemd[1]: mongod.service: Main process exited, code=dumped, status=4/ILL Aug 2 19:16:29 headoffice systemd[1]: mongod.service: Failed with result 'core-dump'. Aug 2 19:16:32 headoffice systemd[1]: mongod.service: Main process exited, code=dumped, status=4/ILL Aug 2 19:16:32 headoffice systemd[1]: mongod.service: Failed with result 'core-dump'. Aug 2 19:16:32 headoffice systemd[1]: mongod.service: Main process exited, code=dumped, status=4/ILL Aug 2 19:16:32 headoffice systemd[1]: mongod.service: Failed with result 'core-dump'. Aug 2 19:19:13 headoffice systemd[1]: mongod.service: Main process exited, code=dumped, status=4/ILL Aug 2 19:19:13 headoffice systemd[1]: mongod.service: Failed with result 'core-dump'. Aug 2 19:19:17 headoffice systemd[1]: mongod.service: Main process exited, code=dumped, status=4/ILL Aug 2 19:19:17 headoffice systemd[1]: mongod.service: Failed with result 'core-dump'. Aug 2 19:19:17 headoffice systemd[1]: mongod.service: Main process exited, code=dumped, status=4/ILL Aug 2 19:19:17 headoffice systemd[1]: mongod.service: Failed with result 'core-dump'. Aug 2 19:21:20 headoffice systemd[1]: mongod.service: Main process exited, code=dumped, status=4/ILL Aug 2 19:21:20 headoffice systemd[1]: mongod.service: Failed with result 'core-dump'.

sudo cat /var/log/mongodb/mongod.log cat: /var/log/mongodb/mongod.log: No such file or directory

coredumpctl info PID: 12159 (mongod) UID: 116 (mongodb) GID: 123 (mongodb) Signal: 4 (ILL) Timestamp: Sat 2024-08-03 12:24:59 -03 (6s ago) Command Line: /usr/bin/mongod --config /etc/mongod.conf Executable: /usr/bin/mongod Control Group: /system.slice/mongod.service Unit: mongod.service Slice: system.slice Boot ID: 45fec4b0d5dc4b66af86bbeca41d6453 Machine ID: 22bbaaf76829466098b24855a5c9c6b8 Hostname: headoffice.pti.intra Storage: /var/lib/systemd/coredump/core.mongod.116.45fec4b0d5dc4b66af86bbeca41d6453.12159.1722698699000000.zst (> Disk Size: 557.7K Message: Process 12159 (mongod) of user 116 dumped core.

            Found module linux-vdso.so.1 with build-id: cf68e5b0f4f33dfabf8969700b3530541157a487
            Found module libffi.so.8 with build-id: 59c2a6b204f74f358ca7711d2dfd349d88711f6a
            Found module libkeyutils.so.1 with build-id: ff27227afa5eeddccab180dd29bd7fcff94aea7c
            Found module libtasn1.so.6 with build-id: 2fde6ecb43c586fe4077118f771077aa1298e7ea
            Found module libp11-kit.so.0 with build-id: a0ffe1d002de5812dc718186172efb78604ddf2c
            Found module libbrotlicommon.so.1 with build-id: 43a72967cf84155914c8b3e915926733d1e57c11
            Found module libsasl2.so.2 with build-id: b8a924f277180f8743a0c6463a379b1a4ad1aae5
            Found module libkrb5support.so.0 with build-id: 384ac9986064cbae89ac8b2e33eb3604b5ab0395
            Found module libcom_err.so.2 with build-id: ce0901f10854b3c9276066b98d9a72303206e0d5
            Found module libk5crypto.so.3 with build-id: f7765f61555fd50c7960ea84cbb9609e7062a667
            Found module libkrb5.so.3 with build-id: fa7fe8222982647202746ba1275861042f966623
            Found module libgmp.so.10 with build-id: f110719303ddbea25a5e89ff730fec520eed67b0
            Found module libnettle.so.8 with build-id: 3d9c6bf106ef53d625b7b1c8bb1300e84598a74a
            Found module libhogweed.so.6 with build-id: 3cc4a3474de72db89e9dcc93bfb95fe377f48c37
            Found module libgnutls.so.30 with build-id: 97b8f99f392f1fd37b969a7164bcea884e23649b
            Found module libunistring.so.2 with build-id: ca5149da8d5a298b8f286ffca3d6e2402ec0fe01
            Found module libz.so.1 with build-id: 30840b79ac329ecbf1dec0bb60180eed256d319f
            Found module libbrotlidec.so.1 with build-id: 4b1f390dd6e24d49684db8b2443d082379e8e977
            Found module libzstd.so.1 with build-id: 5d9d0d946a3154a748e87e17af9d14764519237b
            Found module liblber-2.5.so.0 with build-id: eb842ddeae4869aed7679cb518a427a13c397fa9
            Found module libldap-2.5.so.0 with build-id: 60e3f466b3064e2ca56d514bc770759d8ef1c1d6
            Found module libgssapi_krb5.so.2 with build-id: 0204867906c20c8d6c55fb2a7a9950fa96c34b53
            Found module libpsl.so.5 with build-id: 2b1afc1a3bc8bdb016e432c50db058632e7895b9
            Found module libssh.so.4 with build-id: b7fd78c4b3609dd386755b09bba2fb6b096d906b
            Found module librtmp.so.1 with build-id: 9517ef375cd71ea3da824b4118f1599735093d66
            Found module libidn2.so.0 with build-id: 45b73e0e1c46a76be22f572ee98c60af5768bf8f
            Found module libnghttp2.so.14 with build-id: b02e3f0f2201e893e2dc948840c6e380484c9623
            Found module ld-linux-x86-64.so.2 with build-id: 4186944c50f8a32b47d74931e3f512b811813b64
            Found module libc.so.6 with build-id: 490fef8403240c91833978d494d39e537409b92e
            Found module libgcc_s.so.1 with build-id: e3a44e0da9c6e835d293ed8fd2882b4c4a87130c
            Found module libm.so.6 with build-id: a508ec5d8bf12fb7fd08204e0f87518e5cd0b102
            Found module libssl.so.3 with build-id: aec75d8c7de0a3cd972fccdec8c9d8b9aa39ff8a
            Found module libcrypto.so.3 with build-id: 32ed21cded3d6f4f307b3e1db7b9a8adef2d2839
            Found module libresolv.so.2 with build-id: 95ebf3f0e57d22d884105b9316288167790a36fb
            Found module libcurl.so.4 with build-id: c42c0c082a9cbfa3f371e4ddeb3ddd0ebb2c16af
            Found module mongod with build-id: 9f0fabfe94dda9fa
            Stack trace of thread 12159:
            #0  0x00005647bd93655c _ZN8tcmalloc7SizeMap4InitEv (mongod + 0x7bec55c)
            #1  0x00005647bd93f303 _ZN8tcmalloc6Static14InitStaticVarsEv (mongod + 0x7bf5303)
            #2  0x00005647bd940e6c _ZN8tcmalloc11ThreadCache10InitModuleEv (mongod + 0x7bf6e6c)
            #3  0x00005647bd941105 _ZN8tcmalloc11ThreadCache22CreateCacheIfNecessaryEv (mongod + 0x7bf7105)
            #4  0x00005647bd9fd4cd _ZN8tcmalloc24allocate_full_malloc_oomEm (mongod + 0x7cb34cd)
            #5  0x00007fd2c1274120 __newlocale (libc.so.6 + 0x39120)
            #6  0x00007fd2c0888ce8 n/a (libp11-kit.so.0 + 0x29ce8)
            #7  0x00007fd2c1b2047e call_init (ld-linux-x86-64.so.2 + 0x647e)
            #8  0x00007fd2c1b20568 call_init (ld-linux-x86-64.so.2 + 0x6568)
            #9  0x00007fd2c1b3a2ca _dl_start_user (ld-linux-x86-64.so.2 + 0x202ca)
vaamonde commented 3 months ago

Olá, essa falha está relacionada a arquitetura de processador, conforme documentado no Fórum do MongoDB: https://www.mongodb.com/community/forums/t/setting-up-mongodb-v5-0-on-ubuntu-20-core-dump-status-4-ill/120705 - mande mais detalhes da saída da sua CPU: cat /proc/cpuinfo veja a documentação: https://www.mongodb.com/pt-br/docs/manual/administration/production-notes/ - (Infelizmente as versões novas do MongoDB tem várias incompatibildiade de Processadores e Máquinas Virtuais).

danielselbachtechofc commented 3 months ago

Entendi, o processador do laboratório em nuvem de uma empresa que contratei o lab, eles estão usando um processador Intel Core i7 10700k no servidor, segundo relatos deles, segue abaixo informação solicitada:

cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 2 model name : QEMU Virtual CPU version 1.0 stepping : 3 microcode : 0x1 cpu MHz : 3791.998 cache size : 4096 KB physical id : 0 siblings : 1 core id : 0 cpu cores : 1 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 4 wp : yes flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl cpuid tsc_known_freq pni cx16 popcnt hypervisor lahf_lm abm cpuid_fault pti bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit mmio_unknown bhi bogomips : 7583.99 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management:

processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 2 model name : QEMU Virtual CPU version 1.0 stepping : 3 microcode : 0x1 cpu MHz : 3791.998 cache size : 4096 KB physical id : 1 siblings : 1 core id : 0 cpu cores : 1 apicid : 1 initial apicid : 1 fpu : yes fpu_exception : yes cpuid level : 4 wp : yes flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl cpuid tsc_known_freq pni cx16 popcnt hypervisor lahf_lm abm cpuid_fault pti bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit mmio_unknown bhi bogomips : 7583.99 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management:

processor : 2 vendor_id : GenuineIntel cpu family : 6 model : 2 model name : QEMU Virtual CPU version 1.0 stepping : 3 microcode : 0x1 cpu MHz : 3791.998 cache size : 4096 KB physical id : 2 siblings : 1 core id : 0 cpu cores : 1 apicid : 2 initial apicid : 2 fpu : yes fpu_exception : yes cpuid level : 4 wp : yes flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl cpuid tsc_known_freq pni cx16 popcnt hypervisor lahf_lm abm cpuid_fault pti bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit mmio_unknown bhi bogomips : 7583.99 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management:

processor : 3 vendor_id : GenuineIntel cpu family : 6 model : 2 model name : QEMU Virtual CPU version 1.0 stepping : 3 microcode : 0x1 cpu MHz : 3791.998 cache size : 4096 KB physical id : 3 siblings : 1 core id : 0 cpu cores : 1 apicid : 3 initial apicid : 3 fpu : yes fpu_exception : yes cpuid level : 4 wp : yes flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl cpuid tsc_known_freq pni cx16 popcnt hypervisor lahf_lm abm cpuid_fault pti bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit mmio_unknown bhi bogomips : 7583.99 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management:

processor : 4 vendor_id : GenuineIntel cpu family : 6 model : 2 model name : QEMU Virtual CPU version 1.0 stepping : 3 microcode : 0x1 cpu MHz : 3791.998 cache size : 4096 KB physical id : 4 siblings : 1 core id : 0 cpu cores : 1 apicid : 4 initial apicid : 4 fpu : yes fpu_exception : yes cpuid level : 4 wp : yes flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl cpuid tsc_known_freq pni cx16 popcnt hypervisor lahf_lm abm cpuid_fault pti bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit mmio_unknown bhi bogomips : 7583.99 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management:

processor : 5 vendor_id : GenuineIntel cpu family : 6 model : 2 model name : QEMU Virtual CPU version 1.0 stepping : 3 microcode : 0x1 cpu MHz : 3791.998 cache size : 4096 KB physical id : 5 siblings : 1 core id : 0 cpu cores : 1 apicid : 5 initial apicid : 5 fpu : yes fpu_exception : yes cpuid level : 4 wp : yes flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl cpuid tsc_known_freq pni cx16 popcnt hypervisor lahf_lm abm cpuid_fault pti bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit mmio_unknown bhi bogomips : 7583.99 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management:

processor : 6 vendor_id : GenuineIntel cpu family : 6 model : 2 model name : QEMU Virtual CPU version 1.0 stepping : 3 microcode : 0x1 cpu MHz : 3791.998 cache size : 4096 KB physical id : 6 siblings : 1 core id : 0 cpu cores : 1 apicid : 6 initial apicid : 6 fpu : yes fpu_exception : yes cpuid level : 4 wp : yes flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl cpuid tsc_known_freq pni cx16 popcnt hypervisor lahf_lm abm cpuid_fault pti bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit mmio_unknown bhi bogomips : 7583.99 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management:

processor : 7 vendor_id : GenuineIntel cpu family : 6 model : 2 model name : QEMU Virtual CPU version 1.0 stepping : 3 microcode : 0x1 cpu MHz : 3791.998 cache size : 4096 KB physical id : 7 siblings : 1 core id : 0 cpu cores : 1 apicid : 7 initial apicid : 7 fpu : yes fpu_exception : yes cpuid level : 4 wp : yes flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl cpuid tsc_known_freq pni cx16 popcnt hypervisor lahf_lm abm cpuid_fault pti bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit mmio_unknown bhi bogomips : 7583.99 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management:

vaamonde commented 3 months ago

Olá olhando a saída do comando não achei a instrução (FLAG): AVX (Advanced Vector Extensions) https://pt.wikipedia.org/wiki/Advanced_Vector_Extensions que é utilizado pelo MongoDB desde a versão 5.x https://www.mongodb.com/community/forums/t/mongo-db-failed-unable-to-start-mongodb/124039 - qual o sistema de Virtualização está sendo usado, você sabe? (KVM, QEMU, ESXi, Docker, etc...) muitas vezes pode ser que essse recursos não está habilitado ou não está sendo transferidos para a VM, exemplo do meu processador com filtro de AVX (avx e avx2):

cat /proc/cpuinfo | grep -i avx processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 158 model name : Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz stepping : 10 microcode : 0xf6 cpu MHz : 1226.083 cache size : 8192 KB physical id : 0 siblings : 8 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 dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d arch_capabilities

danielselbachtechofc commented 3 months ago

O comando "cat /proc/cpuinfo | grep -i avx" não retornou nenhuma informação, conforme demonstrado abaixo. Referente ao sistema de virtualização seria o QEMU, conforme mostrado também no comando abaixo.

cat /proc/cpuinfo | grep -i avx

cat /proc/cpuinfo | grep -i qemu model name : QEMU Virtual CPU version 1.0 model name : QEMU Virtual CPU version 1.0 model name : QEMU Virtual CPU version 1.0 model name : QEMU Virtual CPU version 1.0 model name : QEMU Virtual CPU version 1.0 model name : QEMU Virtual CPU version 1.0 model name : QEMU Virtual CPU version 1.0 model name : QEMU Virtual CPU version 1.0

vaamonde commented 3 months ago

Se estão usando QEMU muito provalmente estão usando o Proxmox-VE (ou outra solução de virtualização), conforme documentação do Fórum: https://www.mongodb.com/community/forums/t/installing-mongodb-5-0-on-a-qemu-vm/166192 - como isso é um proccesso Físico/Lógico de quem fornece a VM para você seria dificil eles resolverem, nesse caso é testar a versão 4.x pois as novas versões depende de várias FLAG's de processadores para funcionar de forma correta.

danielselbachtechofc commented 3 months ago

Pelo que conversei com eles, realmente, deve ser um Proxmox-VE, VMware, ou algum outro, mas fiz um teste no meu notebook, onde subi uma vm ubuntu 24.04 LTS no virtualbox e funcionou normal, consegui até concluir os desafios... Meu processador é AMD Ryzen 5 5500U. Vou postar agora nas redes sociais a conclusão do desafio, mas vou precisar ver com o suporte do lab em nuvem, pois quero subir um servidor graylog para fins de estudo e futura implantação num servidor local que montarei futuramente.