2 / 2
Oct 2024

My mongoDB was normally running when it suddenly started to produce this error

{"t":{"$date":"2024-10-21T14:11:50.863+02:00"},"s":"I", "c":"NETWORK", "id":23018, "ctx":"listener","msg":"Error accepting new connection on local endpoint","attr":{"localEndpoint":"/tmp/mongodb-27017.sock","error":"Bad file descriptor"}}

This is my config

Where and how to store data. storage: dbPath: /var/lib/mongodb journal: enabled: true # engine: # wiredTiger: # where to write logging data. systemLog: destination: file path: /var/log/mongodb/mongod.log logAppend: true # network interfaces net: port: 27017 bindIp: 127.0.0.1 # how the process runs processManagement: timeZoneInfo: /usr/share/zoneinfo security: authorization: "enabled" #operationProfiling: #replication:

and this is how i run it

sudo mongod --config /etc/mongod.conf

Hi @Maciek_N_A ,

Try restarting your local mongo instance, if it fails with socket error, check if the socket file is present in correct location and has necessary permissions (mongo user should have the permissions), last but not least(rare scenario for local setup) check if your setup has enough resources to accommodate new connections.

Please share logs if you still face the error.