Warning: The magic method InvisibleReCaptcha\MchLib\Plugin\MchBasePublicPlugin::__wakeup() must have public visibility in /home/xs143420/karst459.com/public_html/wp-content/plugins/invisible-recaptcha/includes/plugin/MchBasePublicPlugin.php on line 37
VirtualBox上のcentosにインストールしたmongodbが起動しない | やってみた

VirtualBox上のcentosにインストールしたmongodbが起動しない

IT
スポンサーリンク

以下環境でMongoDBのインストールを行い、MongoDBを起動すると、以下メッセージを出力し、
Mongodが起動しない。このエラーの対応を記載する。

環境:

  • OS:Windows10home(22H2 Build:19045.2486)
  • VirtualBox:7.0.6
  • guetsOS:CentOS stream9

CentOSにMongoDBをインストールした後に、systemctl start mongodコマンドを実行した際のエラーメッセージ:

Job for mongod.service failed because a fatal signal was delivered causing the control process to dump core.

See "systemctl status mongod.service" and "journalctl -xeu mongod.service" for details.

journalctl -xeu mongod.serviceコマンドで確認した詳細メッセージ:

2月 05 14:41:04 localhost.localdomain systemd[1]: mongod.service: Control process exited, code=dumped, status=4/ILL

░░ Subject: Unit process exited

░░ Defined-By: systemd

░░ Support: https://access.redhat.com/support

░░ 

░░ An ExecStart= process belonging to unit mongod.service has exited.

░░ 

░░ The process' exit code is 'dumped' and its exit status is 4.

2月 05 14:41:04 localhost.localdomain systemd[1]: mongod.service: Failed with result 'core-dump'.

░░ Subject: Unit failed

░░ Defined-By: systemd

░░ Support: https://access.redhat.com/support

░░ 

░░ The unit mongod.service has entered the 'failed' state with result 'core-dump'.
2月 05 14:41:04 localhost.localdomain systemd[1]: Failed to start MongoDB Database Server.

░░ Subject: A start job for unit mongod.service has failed

░░ Defined-By: systemd

░░ Support: https://access.redhat.com/support

░░ 

░░ A start job for unit mongod.service has finished with a failure.

░░ 

░░ The job identifier is 2372 and the job result is failed.

結論

原因:Hyper-VとVirtualBoxの共存

通常、Hyper-V は Virtualbox をブロックします。Hyper-V はタイプ 1 ハイパーバイザーであり、OS が実行される前に最初にハードウェアにアクセスするため、タイプ 2 ハイパーバイザーである Virtualbox のような「仮想化テクノロジ」を必要とする他のプログラムに干渉します。WSL2を使用する際に有効にすることがある。

対策:Hyper-Vを無効にする

以下コマンドをPowershellで実行し、Hyper-Vを無効にし、VirtualBox上のCentOSにてmongodbを起動する。

dism.exe /online /diable-feature /featurename:VirtualMachinePlatform /all /norestart
dism.exe /online /diable-feature /featurename:VirtualMachinePlatform /all /norestart

補足:GUIでは[プログラムと機能]から[Windowsの機能の有効化または無効化]から[仮想マシンプラットフォーム]、[Windowsハイパーバイザープラットフォーム]のチェックを外す。

本件にかかわるトラブルシュート記事

Could not start MongoDB 5.0 running Oracle Linux on VirtualBox
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 st...

・Could not start MongoDB 5.0 running Oracle Linux on VirtualBoxというスレッドにて、以下回答あり。

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

・トラブルシュートのために /proc/cpuinfoコマンドでCPUが対応しているか確認すると、output is missing AVX extensions 64.と記載があるため、Hyper-Vとの競合であると述べられている。

コメント

タイトルとURLをコピーしました