From the course: MongoDB Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Debug

Debug

- [Instructor] If you encounter any issues while setting up your MongoDB deployment or later on while using it, there are few common things you can do to debug your issue. If your database is failing to start, first, check the log files at the location that we specified, in our case m1/mongod.log, et cetera. So I could do that here right now in VS Code. And this is what this log file would look like. And this is where, then scroll towards the end and see whether there are any errors that I can see. The next thing that you can try if your deployment isn't even starting is to disable the fork option. So remember when we said fork true in the configuration file, here. If you set that to false it will give the error that occurs when you start the MongoD. The next thing that you can do is to check the oplog. The way you do that is with this command. So let me briefly show you what that looks like. So on here, I would now…

Contents