Fix the Error “Bootstrap failed: 5: Input/output error Error: Failure while executing in”

MongoDB is one of the open-source NoSQL programs to manage the database. This is written in C++, and programmers have been using it for designing various programs. With MongoDB, programmers scalable and available internet applications. It provides flexibility to programmers to manage data, which makes it a good choice to use it. When you are working on MongoDB, you may get an error “Bootstrap failed: 5: Input/output error Error: Failure while executing in“.

The error always seems frustrating when you working on a project, and then you land up in the error. You must be wondering how you get the error or what wrong you have done to end up with the warning. We are here to help you. Go ahead with the post, you will get the solution you have been looking for.

How the error shows up

When running the command brew services start mongodb-community in the terminal, you encounterthe error. Have a look at the error

Bootstrap failed: 5: Input/output error

Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/<myUserName>/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist` exited with 5.

Ways to Fix “Bootstrap failed: 5: Input/output error Error: Failure while executing in”

We have a few options that can successfully solve the error. Check out the options to fix the error

Option 1 – Run mongodb via homebrew

To solve the issue, you just need to use homebrew to run mongodb. For this, you need two codes; one after another.

First use

launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist

Later, use the following code

launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist

Option 2 – Restart the mongodb

The simplest solution to solve the error is to just try to restart the [email protected] in your macOS. In most cases, restarting can solve the error warning. Whenever you get the error, you need to first restart.

Option 3 – Use the sudo chown

To fix the error “Bootstrap failed: 5: Input/output error Error: Failure while executing in”, you need to use sudo chown. Chown stands for change owner, which is used on the Unix operating system and other operating systems like Uni to change the directories and files of the file system.  In order to fix the error, use the below sudo chown code

sudo chown -R $(whoami) $(brew --prefix)/*

Option 4 – Restart macOS

Sometimes, you may witness that the error is not going away. Well, in that case, you need to restart your macOS, but before that, stop the service.

To stop the service

brew services stop mongodb-community

then restart your system, and start the service again

brew services start mongodb-community

Conclusion

We shed light on the ways to tackle the error “Bootstrap failed: 5: Input/output error Error: Failure while executing in”. It’s completely on you to select the way according to the need of your current condition.

I hope you find it useful! I wish you happy coding with no errors!

Don’t forget to drop a comment below if you need assistance or find it really helpful!

Reference Source: https://www.appsloveworld.com/mongodb/100/21/bootstrap-failed-5-input-output-error-while-running-any-service-on-macos-big-su

https://solutionschecker.com/questions/brew-services-cant-start-service-get-bootstrap-failed-5-inputoutput-error/

https://stackoverflow.com/questions/68975769/brew-services-cant-start-service-get-bootstrap-failed-5-input-output-error

Leave a Reply

Your email address will not be published. Required fields are marked *