Unable to connect to local (running) mongo using 'meteor mongo'

I play with a meteorite, installed it on Ubuntu 14.10 and watched the todos tutorial . Meteor Magazine:

$ meteor run
[[[[[ ~/bckd/homedir/learn/meteor/mycoolapp ]]]]]

=> Started proxy.                             
=> Started MongoDB.                           
=> Started your app.                          

=> App running at: http://localhost:3000/

When I try to connect to mongo through another terminal, I get:

$ meteor mongo
mongo: Meteor isn't running a local MongoDB server.
This command only works while Meteor is running your application locally. Start your
application first. (This error will also occur if you asked Meteor to use a different MongoDB
server with $MONGO_URL when you ran your application.)

If you're trying to connect to the database of an app you deployed with `meteor deploy`,
specify your site name with this command.

Trying to get around this problem, I looked at the command mongo, and soon I realized that I could connect using:

$ mongo localhost:3001

It is so cool that it works, and it seems that I can use it now.

But ... why is the official way: meteor mongonot working in my setup, and can I do something to fix this?

Edited 5/6/2015

ubuntu, mongo, , meteor mongo ( sudo). , , ( env. bash, , ( , , gnome ..) , . , ~/.meteor , . . , .

+4
7

:

sudo meteor mongo

:)

+4
  • , , Meteor.
  • .
  • MongoDB?
  • sudo meteor mongo - , Meteor/Node root.
+4

.

export MONGO_URL=''
meteor mongo
+2

:

Ubuntu , , Windows-.

+1

(Windows 10) MONGO_URL = ' url'. , , mongodb, mogodb.

mongodb:

1) "set MONOGO_URL =" .
2) meteor
3) 'meteor mongo'

0

.

: meteor, meteor mongo , .

mongo: Meteor MongoDB.

, Meteor . "", . , MongoDB $MONGO_URL .

, "meteor deploy", .

sudo, .

.

  • ctrl-c ( ).
  • : meteor mongo. . , mongo.
  • exit, mongo.
  • , .
  • : . . Meteor , meteor mongo .

, - Meteor , , ?

0

check if the mongo process is running and kill it manually:

ps -aux | grep mongo
sudo kill [pid]

.. then reload the meteor application.

-> I think that this particular situation exists only when a meteor is launched on a user port (not tested, but pretty obvious)

0
source

Source: https://habr.com/ru/post/1584540/


All Articles