Cannot run meteor mongo 2015-04-16

hello_world,

I am walking through this tuturial:

https://www.meteor.com/try/3

I see a problem:

dan@u77:~/mets/myapp $ 
dan@u77:~/mets/myapp $ 
dan@u77:~/mets/myapp $ 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's name with this command.
dan@u77:~/mets/myapp $ 
dan@u77:~/mets/myapp $ 
dan@u77:~/mets/myapp $ 

Here are the steps I use to reproduce this bug:

- Install ubuntu 14.04.2
- login
- curl https://install.meteor.com/ | sh
- mkdir mets; cd mets/
- meteor create myapp
- cd myapp
- meteor
- start other terminal
- meteor mongo

I welcome any tips to debug this problem.


Here is a complete screendump.

Terminal 1:

dan@u77:~ $ 
dan@u77:~ $ mv .meteor dot_meteor2014_0415
dan@u77:~ $ 
dan@u77:~ $ curl https://install.meteor.com/ | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6121    0  6121    0     0   5949      0 --:--:--  0:00:01 --:--:--  5954
Downloading Meteor distribution
################################################################################################################################################################# 100.0%

Meteor 1.1.0.2 has been installed in your home directory (~/.meteor).
Writing a launcher script to /usr/local/bin/meteor for your convenience.
This may prompt for your password.
[sudo] password for dan: 
Sorry, try again.
[sudo] password for dan: 
Sorry, try again.
[sudo] password for dan: 
Sorry, try again.
sudo: 3 incorrect password attempts

Couldn't write the launcher script. Please either:

  (1) Run the following as root:
        cp "/home/dan/.meteor/packages/meteor-tool/1.1.3/mt-os.linux.x86_64/scripts/admin/launch-meteor" /usr/bin/meteor
  (2) Add "$HOME/.meteor" to your path, or
  (3) Rerun this command to try again.

Then to get started, take a look at 'meteor --help' or see the docs at
docs.meteor.com.
dan@u77:~ $ cp "/home/dan/.meteor/packages/meteor-tool/1.1.3/mt-os.linux.x86_64/scripts/admin/launch-meteor" ~/bin/meteor
dan@u77:~ $ 

dan@u77:~ $ cd mets
dan@u77:~/mets $ meteor create myapp
myapp: created.

To run your new app:
  cd myapp
  meteor
dan@u77:~/mets $ cd myapp
dan@u77:~/mets/myapp $ 
dan@u77:~/mets/myapp $ 


dan@u77:~/mets/myapp $ 
dan@u77:~/mets/myapp $ 
dan@u77:~/mets/myapp $ date
Thu Apr 16 18:06:03 PDT 2015
dan@u77:~/mets/myapp $ 
dan@u77:~/mets/myapp $ 
dan@u77:~/mets/myapp $ meteor
[[[[[ ~/mets/myapp ]]]]]

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

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



Terminal 2:


dan@u77:~/mets/myapp $ 
dan@u77:~/mets/myapp $ ps -ef | grep meteor
dan      15630 15465 14 18:06 pts/36   00:00:04 /home/dan/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bun
dan      15653 15630  0 18:06 pts/36   00:00:00 /home/dan/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bun
dan      15706 15630  2 18:06 pts/36   00:00:00 /home/dan/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bun
dan      15715 15608  0 18:06 pts/37   00:00:00 grep meteor
dan@u77:~/mets/myapp $ 
dan@u77:~/mets/myapp $ 
dan@u77:~/mets/myapp $ curl localhost:3000 | head
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" type="text/css" class="__meteor-css__" href="/20ae2c8d51b2507244e598844414ecdec2615ce3.css">


<script type="text/javascript">__meteor_runtime_config__ = JSON.parse(decodeURIComponent("%7B%22meteorRelease%22%3A%22METEOR%401.1.0.2%22%2C%22ROOT_URL%22%3A%22http%3A%2F%2Flocalhost%3A3000%2F%22%2C%22ROOT_URL_PATH_PREFIX%22%3A%22%22%2C%22appId%22%3A%2219hfgl0o84o98ktkuvu%22%2C%22autoupdateVersion%22%3A%22872a389b8948dfa183828e27bf009aa5793424d6%22%2C%22autoupdateVersionRefreshable%22%3A%22adb79924a16fb1be293175ef0e06d4103cc308bc%22%2C%22autoupdateVersionCordova%22%3A%22none%22%7D"));</script>

  <script type="text/javascript" src="/packages/underscore.js?0a80a8623e1b40b5df5a05582f288ddd586eaa18"></script>
  <script type="text/javascript" src="/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf"></script>
100  4949    0  4949    0     0   175k      0 --:--:-- --:--:-- --:--:--  179k
(23) Failed writing body
dan@u77:~/mets/myapp $ 
dan@u77:~/mets/myapp $ 
dan@u77:~/mets/myapp $ 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's name with this command.
dan@u77:~/mets/myapp $ 
dan@u77:~/mets/myapp $ 
dan@u77:~/mets/myapp $
I found a workaround:

cd ~/bin/
find ~/.meteor -name mongo -type f -print
ln -s ~/.meteor/packages/meteor-tool/.1.1.3.4sddkj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/mongodb/bin/mongo .
./mongo --port 3001

Actually I need to add 1 line of code to the workaround:

use meteor