title: pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 8] nodename nor servname provided, or not known
body: <p>pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 8] nodename nor servname provided, or not known</p>
  
  <p>When I try to insert data into mongodb, the error appears.</p>
  
  <p>mongodb service is already started.</p>
  
  <p>I can't open 'localhost' only on Safari, can open it on Chrome.(can open '127.0.0.1' on both).</p>
  
  <p>my hosts  '127.0.0.1     localhost'</p>