Reputation: 140
I cannot start my Meteor app using the meteor command. I have tried almost all Meteor reset but all in vain, but I have manged to run the Meteor project on different ports, but my mongodb instance must be working.
I have tried running Meteor:
Unexpected mongo exit code 48. Restarting.
Unexpected mongo exit code 48. Restarting.
Unexpected mongo exit code 48. Restarting.
Can't start Mongo server.
MongoDB exited because its port was closed, or was already
taken by a previous instance of MongoDB
Check for other processes listening on port 3001
or other Meteor instances running in the same project.
Upvotes: 4
Views: 2950
Reputation: 82
In my case, I was trying to run 2 Meteor apps on the one computer. One on port 3000, the other on port 3001.
Meteor reserves port
(3000 in this case) and port + 1
(so, port 3001 too) as stated here.
So, I changed to port 3010 (meteor --port 3010
) and that fixed my issue.
Upvotes: 0
Reputation: 9517
Starting meteor on a different port is a quick and easy workaround. In my case, I had not instructed any app to run on port 3001, thus via this command, I learned what the culprit was:
sudo lsof -i :3001
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
.ruby.bin 2529 daemon 12u IPv4 22408 0t0 TCP localhost:3001 (LISTEN)
Simply kill the ruby server if you want, or simply run your meteor app on a new port.
Upvotes: 4
Reputation: 582
You just need to reset your database
meteor reset
or
meteor -p 3006
Hope this works for you,
Cheers
Upvotes: 4