wheabout.blogg.se

Brew install [email protected]
Brew install mongodb@3.6













So, then I try firing up the server manually via mongod and running mongo from a new tab. What does look like? $ cat ~/Library/LaunchAgents/ Users/carterbancroft/Library/LaunchAgents/: service already loaded Hmm, maybe the launch agent didn't start properly? Let's try loading it by hand: $ launchctl load ~/Library/LaunchAgents/ The obvious cause here is that the mongo server is not running (see: ps aux | grep mongo). T15:26:36.579-0800 E QUERY Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused connect failed I was surprised, however, to get the following error when running mongo: $ mongo The launch agent should load on system start and mongod should be running.

brew install mongodb@3.6

In an perfect world this would be everything. plist into my user's launch agents directory like so: $ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents It all starts with: $ brew uninstall brew install mongodbĪt this point, the MongoDB server can be started with the mongod command but I wanted it to fire up on startup and the installation kindly provides a launch agent for that. In my case however, I didn't care about the data, but let's take a step back. You need to make smaller moves, first to 3.4, then to 3.6 then to 4.0. The data itself also needs to go through the upgrade process and you can't upgrade from 3.2 directly to 4.0. Spoiler alert, it turns out that if you have database data under an old version (like I did) this ain't gonna work. Today I upgraded my local MongoDB installation using Homebrew from v3.2 straight to v4.0.

brew install mongodb@3.6

I'm writing this gist of an article because I'm almost certainly going to have this problem again.

brew install mongodb@3.6

mongodb gist Fixing My Stupid Broken MongoDB Install in OSX.















Brew install mongodb@3.6