0

Good Day.

I've been developing with meteorJS which uses mongodb. No problems there. I've been using the mongo shell to access the database on my dev machine (osx 10.11). This is my first project with mongo and when the shell would load, it would connect to db.test and I'd always show dbs and get the list of database, then use myApp.

Yesterday whenever I go into the shell and I type show dbs the only one shown is local 0.078GB. However my app is still working and pulling and pushing data to the database.

I've checked the dbpath in the mongod.conf and that seems ok. I'm not entirely sure about the exact order of things, but two things where different (I'm not sure if these happened prior to the show dbs not showing everything or after, and I'm not sure which came first):

  • when loading the mongo shell I was getting this error:

WARNING: soft rlimits too low. Number of files is 256, should be at least 1000"

I followed these directions which seemed to stop that error from appearing (https://github.com/basho/basho_docs/issues/1402 )

  • I use Meteor Toys and for the first time I update user.profile.companyName (which is a custom field within the standard profile from within the Meteor Toys widget.

Just odd that the app can still access the database and collections, but that the mongo shell doesn't show. I've update mongod via brew upgrade mongodb from 3.0.2 to 3.0.7 to no avail.

Any ideas?

dmayo
  • 640
  • 6
  • 16
  • looking at my `.bash_history` I've always used `mongo` to run the shell. For giggles I tried `meteor mongo` and it loaded the shell. This time with `show dbs` I was rewarded with admin, local and meteor. I `use meteor` and then `show tables` and there they are, my missing tables. Weird. Guess I'm still looking for an answer. ??? – dmayo Oct 31 '15 at 00:51

2 Answers2

2

If you want to use the regular mongo console you have to specify the port to be 3001 for meteor apps instead of the default 27017. Otherwise it's much simpler to just type meteor mongo and connect that way. Then you can type 'show collections' and it will show them all just like normal.

SirCharlesWatson
  • 400
  • 1
  • 12
1

MongoDB do not show the database unless if there is minimum of one collection with a document in it. Refer to this link

Desmond
  • 1,308
  • 1
  • 19
  • 27