Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unexpected mongo exit code 48 - restarting in Meteor

Tags:

mongodb

meteor

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.
like image 237
goldsoft25 Avatar asked Oct 16 '25 14:10

goldsoft25


2 Answers

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.

like image 159
KhoPhi Avatar answered Oct 18 '25 07:10

KhoPhi


You just need to reset your database

meteor reset

or

 meteor -p 3006

Hope this works for you,

Cheers

like image 24
Ali Hassan Mirza Avatar answered Oct 18 '25 08:10

Ali Hassan Mirza



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!