I have tried everything, but when I run “brew services”, I get an error, it tells me that my mongodb-community has an error status with code 15872. I’ve tried reinstalling, deleting “/tmp/mongodb-27017.sock” and reinstalling, deleting cached files…I’m not sure what else to do.
I encountered this error after trying to upgrade my dev mongod from 4.2 to 6.0 using Homebrew. Went through many many iterations of uninstall, reinstall, tracking down misc files to remove, restarting, etc. After many hours and troubleshooting with ChatGPT, the following worked for me.
Turned on live log: tail -f $(brew --prefix)/var/log/mongodb/mongo.log
which surfaced this error:
"error":"UPGRADE PROBLEM: Found an invalid featureCompatibilityVersion document (ERROR: Location4926900: Invalid featureCompatibilityVersion document in admin.system.version: { _id: "featureCompatibilityVersion", version: "4.2" }.
ChatGPT suggested a scaled upgrade from 1 version to next, setting the featureCompatibilityVersion with each step.
Since this is a dev box, I went with the nuclear option instead. I didn’t even realize there were still 4.2 files lingering out there.