Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no mondodb data in ngCodeCamper.zip #75

Open
rohans84 opened this issue Dec 30, 2015 · 26 comments
Open

no mondodb data in ngCodeCamper.zip #75

rohans84 opened this issue Dec 30, 2015 · 26 comments

Comments

@rohans84
Copy link

In order to run the cc-bmean app, I started by unzipping the file ngCodeCamper.zip file, modifying the dbpath property in mongodb.config and starting up mongod daemon by using the modified mongodb.config doesn't work.

Connecting to mongo server and switching to ngCodeCamper database does not show any collelction. Does the zip file have any issues or anythign specific required to be done?

I am running this on a Mac

@Roustalski
Copy link

+1

When connecting to the database directly using a mongo client, there are no databases listed, and when running the cc-beam app, the last console line is:

"!!! Failed while getting MongoDb collections; is the MongoDb server running?"

Yes, it is running, but there is nothing in the DB. Did you get this resolved?

@Roustalski
Copy link

I saw some wildtiger files in the unzipped folder and so I restarted mongod using the wildtiger option, but still there 0 collections connecting using a client and running db.collection.count().

Looks like the zip contains an empty database.

@vigor-rus
Copy link

+1
Have the same problem. After starting MongoDB and listening on port 27017 (through e.g. MongoChef i can establish connection), get "!!! Failed while getting MongoDb collections; is the MongoDb server running?" error.

@AbderrahimDz24
Copy link

+1
me too, and can't find a solution.

@dinesh36
Copy link

+1

4 similar comments
@mtaboada
Copy link

+1

@hitendramalviya
Copy link

+1

@billyroebuck
Copy link

+1

@oyeyemi
Copy link

oyeyemi commented Mar 2, 2016

+1

@smahesaniya
Copy link

You should add following to the mongodb config file
storageEngine=mmapv1

WiredTiger is a new storage engine for MongodDB which is now recommended over MMAPv1.

@chsakell
Copy link

Worked great on Linux. Got the same errors on Windows.

@pancasutresna
Copy link

It's working!
thanks @smahesaniya for the solution.
need to set storageEngine=mmapv1 before running the fresh extract of ngCodeCamper.zip

@ismarslomic
Copy link

+1, setting storageEngine=mmapv1 solved issue on OSX as well

@JonathanAaron
Copy link

This didn't work for me received an error.
2016-04-14T06:52:41.964-0500 I STORAGE [initandlisten] exception in initAndListen: 28662 Cannot start server. Detected data files in /Users/username/development/ng-demos/cc-bmean/src/server/data/ngCodeCamper created by the 'wiredTiger' storage engine, but the specified storage engine was 'mmapv1'., terminating

I'm starting to think that the database needs to be setup via running scripts. I believe people are having issues with mongo/node version issues, but I'm not interested enough to care. I'll just follow the plural-site course with the non mongo version.

@PhuNH
Copy link

PhuNH commented May 5, 2016

@JonathanAaron: as @pancasutresna wrote, you need to set that before running the fresh extract of ngCodeCamper.zip. That means if you have extracted the zip file, you should delete the extracted folder, set storageEngine=mmapv1, and re-extract the zip file.

@aleksmaksiuta
Copy link

I did as all you folks said, but get an error at starting cc-bmean server. Help, pls!
err
:)

GET /bower_components/angular/angular.js 200 11.944 ms - -
c:\Users\alex\WebstormProjects\AngularCleanCode\ng-demos\cc-bmean\node_modules\mongodb\lib\utils.js:98
    process.nextTick(function() { throw err; });
                                  ^

TypeError: Trailer name must be a valid HTTP Token ["Content-Type:"]
    at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:347:13)
    . . .

Process finished with exit code 1

@PhuNH
Copy link

PhuNH commented May 18, 2016

@aleksmaksiuta: please always have Google by your side. The first result of searching "Trailer name must be a valid HTTP Token ["Content-Type:"]" should solve your problem. Or if it's not the first result, here you are #84

@sstoehr
Copy link

sstoehr commented May 21, 2016

Thank you @smahesaniya, setting storageEngine=mmapv1 solved the issue on OSX for me!

@FatihBekdemir
Copy link

FatihBekdemir commented Oct 19, 2016

Having the same problem in Windows 10.
The steps that i have tried:

  1. Installed MongoDB 3.2
  2. Download fresh copy of data files.
  3. Added storageEngine=mmapv1 to my mongodb.config file. The file is now like that:

#logpath=c:\mongodb\log\mongo.log
#dbpath=C:\Projects\AngularJSPatterns\ng-demos\cc-bmean\src\server\data
#rest=true
#storageEngine=mmapv1

  1. Added mongodb the my PATH
  2. Run this command
    mongod.exe --dbpath C:\Projects\AngularJSPatterns\ng-demos\cc-bmean\src\server\data

and it said "data created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'"
and [initandlisten] waiting for connections on port 27017

  1. When i type http://localhost:27017/ to Chrome, i get an Error:
    "It looks like you are trying to access MongoDB over HTTP on the native driver port."
  2. When i try to gulp serve-dev command in project folder, i also get an error:

!!! Failed while getting MongoDb collections; is the MongoDb server running?
C:\Projects\AngularJSPatterns\ng-demos\cc-bmean\node_modules\mongodb\lib\utils.js:98
process.nextTick(function() { throw err; });
^
Error: Unable to locate collection Persons: MongoError: Collection Persons does not exist. Currently in strict mode.

@FatihBekdemir
Copy link

For the previous problem that i wrote above, HTTP interface deprecated since version 3.2 of mongo db
https://docs.mongodb.com/ecosystem/tools/http-interfaces/

So if you are able to do, could you please update the course or mention a workaround in here. @johnpapa

@thiagonsiq
Copy link

This also worked for me on Windows 7. Had to add storage line to mongodb.config file, delete extracted ngCodeCamper folder, unzip it again and restart the server.

Thanks!

@jfelix10
Copy link

jfelix10 commented Jan 3, 2017

Please could someone describe step by step how to make this work on windows 10? I'm not getting any ... :-(

@moawadallah
Copy link

+1
I have the same problem
first i installed the mongoDB from site and make it as a service running now but when try to run the configuration it give me this error:
"Unable to locate collection Persons: MongoError: Collection Persons does not exist. Currently in strict mode."

Is there any solution for this issue @johnpapa

@francisrod01
Copy link

francisrod01 commented Jun 13, 2017

@mawadallah same problem doing Angularjs clean code course on pluralsight.

I create my own mongo database that pointing to data/ngCodeCamper directory.

Error: Unable to locate collection Persons: MongoError: Collection Persons does not exist. Currently in strict mode

I hope any solution for this issue of the @johnpapa because doesn't exist script of creation to this table.

@johnpapa
Copy link
Owner

A few of the solutions above work for some folks, but not others.

The course is not reliant on the mongodb, and I may just remove it from the course entirely since the course is about Angular and not messing with configuring mongo :)

@jefo2k
Copy link

jefo2k commented Oct 11, 2017

+1
Thank you @smahesaniya
Setting storageEngine=mmapv1 solved the issue on my OSX as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests