title: mongodb refusing connection in python
body: <p>I am using <code>windows8</code>, for writing code I use <code>IDLE</code>. I tried to connect <code>python</code> to <code>mongodb</code>. But when trying to get collection name than it gives an error.</p>
  
  <blockquote>
    <p>ServerSelectionTimeoutError: localhost:20101: [Errno 10061] No connection could be made because the target machine actively refused it</p>
  </blockquote>
  
  <p>This is code for which i am getting an error.</p>
  
  <pre><code>from pymongo import MongoClient
  connection = MongoClient('localhost',20101)
  db = connection['Bhautik']
  collection = db['Student']
  db.collection_names(include_system_collections=True)
  </code></pre>