'Bootstrap failed: 5: Input/output error while running any service on macOS Big Sur version 11.5.2
I am trying to run [email protected] service using brew services start [email protected]
(facing similar error, while running httpd service or any other service)
Following is the error:
Error: Failure while executing; /bin/launchctl bootstrap gui/502 /Users/chiragsingla/Library/LaunchAgents/[email protected]
exited with 5.
Solution 1:[1]
There can be multiple reasons behind this error message. So, the first thing to do is to find where your mongo related logs are stored. To do that, run the following command -
sudo find / -name mongod.conf
This will get you the mongo db config file. On running this command, I got /usr/local/etc/mongod.conf
. You may find it directly under /etc
.
On opening mongod.conf
, you will find log path mentioned there. You can open the file itself, or instead get the last 15-20 lines of this log file via tail
command -
tail -n 15 <<your mongo db log path>>
Now, you will need to debug the issue mentioned in the logs. Generally, I have seen these three sets of issues -
Permission issue with
/tmp/mongodb-27017.sock
- While some SO answers asked to change the permissions for this file as a solution, my issue with this only went away after I removed this file.Compatibility issue - If you see a message like
Version incompatibility detected
, it means that the mongodb version you have currently installed is different from the version whose data is present on your system. Uninstall the current mongodb version and then install the correct older version (if you don't want to lose the data). Once you have done it, and your mongo is up and running, and you want to upgrade mongodb version, follow this SO answer.Permission issues with
WiredTiger
- Usingchmod
to change file permissions resolved these.
In case you have any issue other than these three, you will still need to search more on SO and figure it out. Hope this was of some help! :)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | thisisashwani |