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

how to specify mongodb instance, error starting FGLab #27

Open
kirk86 opened this issue Feb 13, 2019 · 5 comments
Open

how to specify mongodb instance, error starting FGLab #27

kirk86 opened this issue Feb 13, 2019 · 5 comments

Comments

@kirk86
Copy link

kirk86 commented Feb 13, 2019

Hi and thanks for FGLab,
I was wondering how exactly to start FGLab?
I've followed the steps of installation but when I try to start the lab I get the following errors:

> [email protected] start /home/user/FGLab
> node lab.js

Error: No MongoDB instance specified
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node lab.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2019-02-13T19_29_46_962Z-debug.log

Also how do you specify if your db is in a different directory than the working one?

@Kaixhin
Copy link
Owner

Kaixhin commented Feb 13, 2019

Is the MongoDB daemon running and is MONGODB_URI set correctly? For example, can you use the URI to connect to it via another application like Robo 3T?

For a different db path just use an absolute path: mongod --dbpath <absolute path>.

@kirk86
Copy link
Author

kirk86 commented Feb 13, 2019

Yeah mongo is running perfectly fine I can even connect to it using omniboard.
What is the correct format for MONGODB_URI? isn't that usually localhost:27017:dbname?

@Kaixhin
Copy link
Owner

Kaixhin commented Feb 13, 2019

By default it is of the form mongodb://localhost:27017/dbname, as seen in example.env.

@kirk86
Copy link
Author

kirk86 commented Feb 14, 2019

Ok so the this mongodb://localhost:27017/dbname apparently is not working. In mongo there was no db with the name FGLab but then even when I created one and started FGLab again still I was getting the above error of no mongodb instance. Even when I specified a different pre-existing db name still I was getting the error.

Could it be that my --dbpath is not in the same directory as FGLab?

@Kaixhin
Copy link
Owner

Kaixhin commented Feb 14, 2019

I don't think the database path needs to be in the same directory, but just to make sure that under your setup this isn't the issue, would you be able to create a new database inside and see if this changes anything?

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

2 participants