title: mongoimport - server selection timeout
body: <p>I am trying to import a csv into my mongo database but when I run the following command:</p>
  
  <pre><code>mongoimport --type csv -d casinos -c casinos --headerline --drop total_cleaned_up.csv
  </code></pre>
  
  <p>I get the following:</p>
  
  <pre><code>error connecting to host: could not connect to server: server selection error: server 
  selection timeout
  current topology: Type: Single
  Servers:
  Addr: localhost:27017, Type: Unknown, State: Connected, Average RTT: 0, Last error: 
  connection(localhost:27017[-121]) connection is closed
  </code></pre>
  
  <p>I have mongod running in the background, and I know for sure my server is connected to the database. When I use postman to create dummy data, it works just fine. My mongoose schema is in the same filepath as my csv. I'm not sure if this is a firewall issue, or something else. The closest answer I can find is from this stackoverflow post, but it doesnt seem to be working for me (its quite verbose, so I very well might be typing it wrong as well)</p>
  
  <p><a href="https://stackoverflow.com/questions/59413297/error-connecting-to-host-could-not-connect-to-server-server-selection-error-s">error connecting to host: could not connect to server: server selection error: server selection timeout current topology: Type: Single Servers</a></p>
  
  <p>any help would be immensely appreciated. </p>