Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems to run examples in Meteor

Tags:

mongodb

meteor

I'm testing Meteor examples and this is what I see when I run meteor in todos examples:

Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Can't start mongod. Check for other processes listening on port 3002 or other meteors running in the same project.

And this is what happens if I run mongod in the command line:

Thu Apr 12 19:27:39 Mongo DB : starting : pid = 2686 port = 27017 dbpath = /data/db/ master = 0 slave = 0  32-bit 

** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data
**       see http://blog.mongodb.org/post/137788967/32-bit-limitations for more

Thu Apr 12 19:27:39 db version v1.4.4, pdfile version 4.5
Thu Apr 12 19:27:39 git version: nogitversion
Thu Apr 12 19:27:39 sys info: Linux murphy 2.6.32.14-dsa-ia32 #1 SMP Thu May 27 16:19:20 CEST 2010 i686 BOOST_LIB_VERSION=1_42
Thu Apr 12 19:27:39 waiting for connections on port 27017
Thu Apr 12 19:27:39 listen(): bind() failed errno:98 Address already in use for port: 27017
Thu Apr 12 19:27:39 MiniWebServer: bind() failed port:28017 errno:98 Address already in use
Thu Apr 12 19:27:39   addr already in use
Thu Apr 12 19:27:39 warning: web admin interface failed to initialize on port 28017

Someone helps? Thanks!

like image 224
davidmatas Avatar asked Apr 11 '12 10:04

davidmatas


4 Answers

I had the same problem. Fixed with:

WARNING: This erases your local database:

meteor reset

like image 87
Kriss Avatar answered Nov 19 '22 00:11

Kriss


I had the same problem. Just remove .meteor/local/db/mongod.lock in your meteor project folder. And meteor should run normally.

Hope it helped! :)

like image 41
jsbeckr Avatar answered Nov 19 '22 00:11

jsbeckr


As mKriss mentioned, try

meteor reset

If you get this error:

reset: Meteor is running.

This command does not work while Meteor is running your application.
Exit the running meteor development server.

Then look for meteor in your running processes:

ps -x | grep meteor

This gave me the following output:

14877 pts/0    Sl     0:02 /usr/lib/meteor/mongodb/bin/mongod --bind_ip 127.0.0.1 --port 3005 --dbpath /home/sam/proto/.meteor/local/db
15022 pts/0    S+     0:00 grep --color=auto meteor

So then I did:

kill -s KILL 14877
meteor reset
meteor

Now everything works!

like image 26
Samo Avatar answered Nov 19 '22 00:11

Samo


Not sure if this is relevant to your problem, but I got this error and eventually discovered it was caused because I had my app directory in a NFS share (I am running on Ubuntu in VirtualBox) which mongodb doesn't like. Putting my app in my home directory instead fixed the problem.

like image 19
devdave Avatar answered Nov 19 '22 01:11

devdave