title: mongo couldn't connect to server
body: <p>Even after reinstalling mongo, I face the same problem on my Mac machine. On a fresh reinstall, I keep getting this error, when typing <code>mongo</code> on my Mac terminal.</p>
  <pre><code>connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&amp;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:372:17
  @(connect):2:6
  exception: connect failed
  exiting with code 1
  </code></pre>
  <p>How can I get this problem fixed? Please help.
  Also using, <code>mongod</code> on the terminal is throwing this error</p>
  <pre><code>{&quot;t&quot;:{&quot;$date&quot;:&quot;2022-04-08T16:34:40.697+05:30&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;NETWORK&quot;,  &quot;id&quot;:4915701, &quot;ctx&quot;:&quot;thread1&quot;,&quot;msg&quot;:&quot;Initialized wire specification&quot;,&quot;attr&quot;:{&quot;spec&quot;:{&quot;incomingExternalClient&quot;:{&quot;minWireVersion&quot;:0,&quot;maxWireVersion&quot;:13},&quot;incomingInternalClient&quot;:{&quot;minWireVersion&quot;:0,&quot;maxWireVersion&quot;:13},&quot;outgoing&quot;:{&quot;minWireVersion&quot;:0,&quot;maxWireVersion&quot;:13},&quot;isInternalClient&quot;:true}}}
  {&quot;t&quot;:{&quot;$date&quot;:&quot;2022-04-08T16:34:40.697+05:30&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;CONTROL&quot;,  &quot;id&quot;:23285,   &quot;ctx&quot;:&quot;thread1&quot;,&quot;msg&quot;:&quot;Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'&quot;}
  {&quot;t&quot;:{&quot;$date&quot;:&quot;2022-04-08T16:34:40.701+05:30&quot;},&quot;s&quot;:&quot;W&quot;,  &quot;c&quot;:&quot;ASIO&quot;,     &quot;id&quot;:22601,   &quot;ctx&quot;:&quot;thread1&quot;,&quot;msg&quot;:&quot;No TransportLayer configured during NetworkInterface startup&quot;}
  {&quot;t&quot;:{&quot;$date&quot;:&quot;2022-04-08T16:34:40.701+05:30&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;NETWORK&quot;,  &quot;id&quot;:4648602, &quot;ctx&quot;:&quot;thread1&quot;,&quot;msg&quot;:&quot;Implicit TCP FastOpen in use.&quot;}
  {&quot;t&quot;:{&quot;$date&quot;:&quot;2022-04-08T16:34:40.702+05:30&quot;},&quot;s&quot;:&quot;W&quot;,  &quot;c&quot;:&quot;ASIO&quot;,     &quot;id&quot;:22601,   &quot;ctx&quot;:&quot;thread1&quot;,&quot;msg&quot;:&quot;No TransportLayer configured during NetworkInterface startup&quot;}
  {&quot;t&quot;:{&quot;$date&quot;:&quot;2022-04-08T16:34:40.702+05:30&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;REPL&quot;,     &quot;id&quot;:5123008, &quot;ctx&quot;:&quot;thread1&quot;,&quot;msg&quot;:&quot;Successfully registered PrimaryOnlyService&quot;,&quot;attr&quot;:{&quot;service&quot;:&quot;TenantMigrationDonorService&quot;,&quot;ns&quot;:&quot;config.tenantMigrationDonors&quot;}}
  {&quot;t&quot;:{&quot;$date&quot;:&quot;2022-04-08T16:34:40.702+05:30&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;REPL&quot;,     &quot;id&quot;:5123008, &quot;ctx&quot;:&quot;thread1&quot;,&quot;msg&quot;:&quot;Successfully registered PrimaryOnlyService&quot;,&quot;attr&quot;:{&quot;service&quot;:&quot;TenantMigrationRecipientService&quot;,&quot;ns&quot;:&quot;config.tenantMigrationRecipients&quot;}}
  {&quot;t&quot;:{&quot;$date&quot;:&quot;2022-04-08T16:34:40.702+05:30&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;CONTROL&quot;,  &quot;id&quot;:5945603, &quot;ctx&quot;:&quot;thread1&quot;,&quot;msg&quot;:&quot;Multi threading initialized&quot;}
  {&quot;t&quot;:{&quot;$date&quot;:&quot;2022-04-08T16:34:40.702+05:30&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;CONTROL&quot;,  &quot;id&quot;:4615611, &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;MongoDB starting&quot;,&quot;attr&quot;:{&quot;pid&quot;:8085,&quot;port&quot;:27017,&quot;dbPath&quot;:&quot;/data/db&quot;,&quot;architecture&quot;:&quot;64-bit&quot;,&quot;host&quot;:&quot;Amijeets-MacBook-Pro.local&quot;}}
  {&quot;t&quot;:{&quot;$date&quot;:&quot;2022-04-08T16:34:40.702+05:30&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;CONTROL&quot;,  &quot;id&quot;:23403,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;Build Info&quot;,&quot;attr&quot;:{&quot;buildInfo&quot;:{&quot;version&quot;:&quot;5.0.6&quot;,&quot;gitVersion&quot;:&quot;212a8dbb47f07427dae194a9c75baec1d81d9259&quot;,&quot;modules&quot;:[],&quot;allocator&quot;:&quot;system&quot;,&quot;environment&quot;:{&quot;distarch&quot;:&quot;x86_64&quot;,&quot;target_arch&quot;:&quot;x86_64&quot;}}}}
  {&quot;t&quot;:{&quot;$date&quot;:&quot;2022-04-08T16:34:40.702+05:30&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;CONTROL&quot;,  &quot;id&quot;:51765,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;Operating System&quot;,&quot;attr&quot;:{&quot;os&quot;:{&quot;name&quot;:&quot;Mac OS X&quot;,&quot;version&quot;:&quot;21.4.0&quot;}}}
  {&quot;t&quot;:{&quot;$date&quot;:&quot;2022-04-08T16:34:40.702+05:30&quot;},&quot;s&quot;:&quot;I&quot;,  &quot;c&quot;:&quot;CONTROL&quot;,  &quot;id&quot;:21951,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;Options set by command line&quot;,&quot;attr&quot;:{&quot;options&quot;:{}}}
  {&quot;t&quot;:{&quot;$date&quot;:&quot;2022-04-08T16:34:40.704+05:30&quot;},&quot;s&quot;:&quot;E&quot;,  &quot;c&quot;:&quot;NETWORK&quot;,  &quot;id&quot;:23024,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;Failed to unlink socket file&quot;,&quot;attr&quot;:{&quot;path&quot;:&quot;/tmp/mongodb-27017.sock&quot;,&quot;error&quot;:&quot;Permission denied&quot;}}
  {&quot;t&quot;:{&quot;$date&quot;:&quot;2022-04-08T16:34:40.704+05:30&quot;},&quot;s&quot;:&quot;F&quot;,  &quot;c&quot;:&quot;-&quot;,        &quot;id&quot;:23091,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;Fatal assertion&quot;,&quot;attr&quot;:{&quot;msgid&quot;:40486,&quot;file&quot;:&quot;src/mongo/transport/transport_layer_asio.cpp&quot;,&quot;line&quot;:989}}
  {&quot;t&quot;:{&quot;$date&quot;:&quot;2022-04-08T16:34:40.704+05:30&quot;},&quot;s&quot;:&quot;F&quot;,  &quot;c&quot;:&quot;-&quot;,        &quot;id&quot;:23092,   &quot;ctx&quot;:&quot;initandlisten&quot;,&quot;msg&quot;:&quot;\n\n***aborting after fassert() failure\n\n&quot;}
  </code></pre>
  <p>How do I get this fixed? please help!
  I thank you already :)</p>