1

I get the following message after I run sudo mongod:

{"t":{"$date":"2020-08-12T20:09:04.629+05:30"},"s":"I",  "c":"CONTROL",  "id":23285,   "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
{"t":{"$date":"2020-08-12T20:09:04.631+05:30"},"s":"W",  "c":"ASIO",     "id":22601,   "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
{"t":{"$date":"2020-08-12T20:09:04.631+05:30"},"s":"I",  "c":"NETWORK",  "id":4648601, "ctx":"main","msg":"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize."}
{"t":{"$date":"2020-08-12T20:09:04.631+05:30"},"s":"I",  "c":"STORAGE",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":9455,"port":27017,"dbPath":"/data/db","architecture":"64-bit","host":"pragya"}}
{"t":{"$date":"2020-08-12T20:09:04.631+05:30"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"4.4.0","gitVersion":"563487e100c4215e2dce98d0af2a6a5a2d67c5cf","openSSLVersion":"OpenSSL 1.1.1  11 Sep 2018","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu1804","distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2020-08-12T20:09:04.631+05:30"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Ubuntu","version":"18.04"}}}
{"t":{"$date":"2020-08-12T20:09:04.631+05:30"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{}}}
{"t":{"$date":"2020-08-12T20:09:04.632+05:30"},"s":"E",  "c":"STORAGE",  "id":20568,   "ctx":"initandlisten","msg":"Error setting up listener","attr":{"error":{"code":9001,"codeName":"SocketException","errmsg":"Address already in use"}}}
{"t":{"$date":"2020-08-12T20:09:04.632+05:30"},"s":"I",  "c":"CONTROL",  "id":20565,   "ctx":"initandlisten","msg":"Now exiting"}
{"t":{"$date":"2020-08-12T20:09:04.632+05:30"},"s":"I",  "c":"CONTROL",  "id":23138,   "ctx":"initandlisten","msg":"Shutting down","attr":{"exitCode":48}}

message after status of mongod:
 mongod.service - MongoDB Database Server
   Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-08-12 19:11:52 IST; 57min ago
     Docs: https://docs.mongodb.org/manual
 Main PID: 7312 (mongod)
   CGroup: /system.slice/mongod.service
           └─7312 /usr/bin/mongod --config /etc/mongod.conf

Aug 12 19:11:52 pragya systemd[1]: Started MongoDB Database Server.
Tom Slabbaert
  • 21,288
  • 10
  • 30
  • 43
Pragya
  • 21
  • 1
  • 2
  • 1
    Does this answer your question? [SocketException: Address already in use MONGODB](https://stackoverflow.com/questions/47975929/socketexception-address-already-in-use-mongodb) – D. SM Aug 12 '20 at 16:29
  • `sudo mongod` will start up a copy of the mongod server, not the shell. Is that what you are trying to do? – Joe Aug 13 '20 at 02:24
  • I have already tried o run mongod on a different port using mongod --port 27018 but still the output is the same. – Pragya Aug 13 '20 at 06:08
  • I am trying to run the mongo server as well as mongo shell but only mongo shell is running not the server. – Pragya Aug 13 '20 at 06:09

1 Answers1

0

You could try to run MongoDB manually as a background process, issue the following:

  • sudo mongod --config /usr/local/etc/mongod.conf --fork
  • Confirm your Password
  • check in: brew services list
  • there you will see: mongodb-community started