Score:1

Mongodb shuts down everytime showing exit status 1

cn flag

thanks for being here, to be fair I do have a solution, but its a temporary one. Its repetitive and kinda annoying doing it everytime you switch on your pc. So if someone has a more permanent solution to this, please upload it here.

The error looks like this:

`MongoDB shell version v4.4.6
 connecting to: mongodb://127.0.0.1:27017/? 
 compressors=disabled&gssapiServiceName=mongodb
 Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: 
 SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection 
 refused :
 connect@src/mongo/shell/mongo.js:374:17
 @(connect):2:6
 exception: connect failed
 exiting with code 1`

To those facing the same problem, I would add the temporary solution in the comments.

Score:1
cn flag

the temporary solution is, do this after a "sudo su":

chown -R mongodb:mongodb /var/lib/mongodb
chown mongodb:mongodb /tmp/mongodb-27017.sock

sudo service mongod restart
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.