このチュートリアルを完了し、3 ノードのレプリカ セットを正常にデプロイしました。他のホストから接続でき、すべて問題ありません。私が持っている質問は、チュートリアルでそれが述べているということです
Start MongoDB
Once the configuration files have been edited, start the database process manual:mongod on each instance by:
Log on onto the instance
Run the following command to start the process:
mongod --config /etc/mongod.conf
This should start the manual:mongod process
私には、レプリカ セットがコマンドのようにシステム サービスとしてではなく、ユーザー プロセスとして実行されているように見えます。
sudo service mongodb start
では、マシンの 1 つが再起動したらどうなるでしょうか。そのプロセスは死んでいますか?レプリカ セット全体をサービスとして実行するように構成するにはどうすればよいですか?