I am using heroku for hosting my geddy app. The mongolab recently upgrade the version to mongo 3.x
I am using mongodb package 2.0.45 version which is latest. since the upgrade my app is throwing error of MongoError: auth failed error.
Old thread but just in case someone runs into this issue, I managed to solve this by upgrading my mongo shell to match the version in mongolab. I had 2.6 version of my mongo shell, but my mongolab db is in 3.0.6. This September, I believe Mongolab will again upgrade to 3.2 so you might need to upgrade again when that happens.
you may have to upgrade your mongo gem version.
Try:
bundle update mongo
The version in my Gemfile.lock that solved is:
gem 'bson_ext', '~> 1.12.3'
gem 'mongo', '~> 1.12.3'
Related
Getting this error on Ubuntu 20.04.
I had origianlly installed the default version 3.0.6 on ubuntu.
I have purged it and installed 5.0.9. But now I get this error in logs and mongod won't start.
"Failed to start up WiredTiger under any compatibility version. This may be due to an unsupported upgrade or downgrade."
It's a massive gap between versions. You need to upgrade all versions in-between one at a time: https://www.mongodb.com/docs/manual/release-notes/5.0-upgrade-standalone/#upgrade-version-path:
To upgrade an existing MongoDB deployment to 5.0, you must be running a 4.4-series release.
To upgrade from a version earlier than the 4.4-series, you must successively upgrade major releases until you have upgraded to 4.4-series. For example, if you are running a 4.2-series, you must upgrade first to 4.4 before you can upgrade to 5.0.
Or you can export data from 3.0.6 , start 5.0.9 with empty data directory (Storage.dbPath option in config), import data to 5.0.9
I installed MongoDB community edition following its doc on ubuntu. Then installed strapi following its doc. Started MongoDb in terminal from command-mongod
Getting the entry
...
[initandlisten] waiting for connections on port 27017
While creating the project with default values using strapi new myStrapiProject throws the error:
and mongod log details:
it goes till connection id: 62 I don't know why. I've tried creating the project by starting MongoDb using its start, stop command but no change. I'm completely new to MongoDb and Strapi. Any help would be appreciated. I have referred this but it didn't solve my issue.
Version details:
$ mongod --version
db version v3.6.4
$ strapi --version
3.0.0-alpha.12
$ node --version
v9.11.1
$ npm --version
5.6.0
$ git --version
git version 2.7.4
check your minimum requirements for the strapi alpha 3.0.0
From the official site:
Node.js >= 10.x
NPM >= 6.x
MongoDB >= 3.x
I'm trying to upgrade mongodb to version 3.6. I ran brew update to get any new formulae. Then I ran brew upgrade mongodb and it complains that I already have 3.4. Is it possible to upgrade to 3.6 through homebrew, and if so, what am I doing wrong?
~: brew update
Updated 2 taps (homebrew/core, caskroom/cask).
==> New Formulae
ddgr
==> Updated Formulae
qt ✔ dialog octave suite-sparse
ansible-lint fd pyenv sundials
artifactory graphicsmagick python-markdown traefik
ceres-solver html-xml-utils reminiscence wtf
chromedriver libtiff sfk
~: brew upgrade mongodb
Error: mongodb 3.4.10 already installed
I also tried this this-morning and go the same error. I guess it is not yet available via homebrew ☹️
The mongoDB web site has a statement about it being untested on OSX 10.13:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/
My aim is to be able to connect myself from my local machine to a remote mongodb (version 3.2.8) instance with the following cmd:
mongo XX.XX.XXX.XXX:27017/myDB -u toto -p myPwd
i am getting this error
Error: 18 { ok: 0.0, errmsg: "auth failed", code: 18 } at src/mongo/shell/db.js:1210
exception: login failed
I checked the mongoDB documentation and i understood that i have to install the same version locally
So I updated my local mongodb with brew
like it is explained here Install MongoDB Community Edition on OS X and everything ran fine
toto$ brew install mongodb
toto$ Warning: mongodb-3.2.8 already installed
but when i try that:
toto$ mongod -version
db version v2.6.6
toto$ mongo -version
MongoDB shell version: 2.6.6
it seems that i am still using the old version locally.
I also tried to install it manually like it is explained in the documentation but nothing.
So I tried to set the path for mongo in my ~/.bashrc to use the version installed with brew like that:
toto$ cat ~/.bashrc
...
# Setting PATH for MongoDb 3.2.8
export MONGO_PATH=/usr/local/Cellar/mongodb/3.2.8
export PATH=$PATH:$MONGO_PATH/bin
...
but nothing.
What am I missing or misunderstanding ...?
I finally uninstall mongodb:
brew uninstall mongodb
I also did that just in case:
remove mongodb that was installed via brew
Raw
that helped me to found out the old mongoDB version (really used) so i removed everything from my local (binaries, the export in ~/.bashrc).
I restarted the machine, re install mongodb with brew and now everything is working properly.
Don't know why i didn't try that from the begining !
I hope it will help someone.
if it is the case don't forget to up vote please :)
I am practice on ruby on rails 4 and using mongodb database,I am trying to work follow this site to connect database : http://mongoid.org/en/mongoid/docs/documents.html
However, when I worked this step this occur error:
rails g mongoid:config
error:
Bundler could not find compatible versions for gem "activemodel":
In snapshot (Gemfile.lock):
activemodel (4.1.1)
In Gemfile:
mongoid (~> 3.1.6) x86-mingw32 depends on
activemodel (~> 3.2) x86-mingw32
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
I am also try the command bundel update but it has that error:
sorry I am new bie on ruby and rails and mongodb, so I hope there is any easy guide to follow.
thankyou
Try skipping ActiveRecord when creating your app.
rails new my_app -O
I had this problem using the following:
gem 'rails', '4.1.1'
gem 'mongoid', '~> 4.0.0'
Skipping ActiveRecord solved that error.