T
T
tantumus212021-09-22 13:34:31
MongoDB
tantumus21, 2021-09-22 13:34:31

What's wrong with local MongoDB?

Today, after a break of a couple of weeks, I could not connect via Compass to the local database. Issues:

connect ECONNREFUSED 127.0.0.1:27017

I went online with this error. On the stackoverflow, they wrote that the local database might be damaged. And they advised, in order to be sure, to demolish the data / db folder and create it on a new one. So I did. The base is test. Losing data is not a pity.
After creating the folder again, I try to point Mongo to it.
mongod --dbpath /users/{username}/data/db/
But when I run this command, everything freezes tightly at the step
SHARDING [ftdc] Marking collection local.oplog.rs as collection version:

On the same stack, they advised not to stop the process, but simply run it from another terminal window mongoin the data / db folder. The process went further.

But how to start the server now? sudo mongod command throws an error
shutting down with code 48

On the stack, it was advised to stop all processes that could occupy port 27017. So I did. Next, I had to execute
sudo mongod --port 27017
which still gives me a 48 error. If you run without sudo, then the error is:
aborting after fassert() failure


What can I do to make everything work like before?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question