TL/DR: MongoDB Error and simple fix. I apologize for the issues!
Everyone, I apologize if anyone is having issues with their local MongoDB locking up. It is now a known issue that sometimes the AWS cloud servers don't always play nice with the local install of MongoDB. I wanted to post this before posting step 3 on Friday since it would not be fair to all our readers if the code I posted did not work and confused everyone. I will be making sure that before we deploy our live site that you have a Mongo Atlas cloud account set up so your deployment doesn't rely on a local install. From the research I have done, the connections to your MongoDB are not being fully terminated by AWS after you hit CTRL + C to end the connection. I have not found a way to make sure it shuts down entirely yet, but if I find a way, I will make sure to relay it in a future post.
If you are getting a shut down code of 48, (that is what the error message is referring to) use this line in your terminal to find where the connection to your MongoDB is still open:
sudo lsof -iTCP -sTCP:LISTEN -n -P. It will bring up a table and find what connection is still live on port 2717. Mongo will give you a 4 digit code in the second column of the table, and then use the line
sudo kill *4digitCode*.
Now, you can run your
./mongod to start up your database and then connect to your app when you run
Sorry for any confusion this may have caused but this should get everyone back on track for when Step 3 comes out this afternoon or tomorrow morning.
Hello! I'm the owner and lead developer here at The Good Fellas Agency. I've been working with code for the past 10 years and started this business over 5 years ago. I mostly write about how Web Design, Digital Marketing, and Search Engine Optimization help your business grow.