title: pymongo.errors.ConnectionFailure: [Errno 61] Connection refused
body: <p>I tested a python program connecting to MongoDB, with the DB driver called pymongo, but received the following errors.</p>
  
  <p>The related envirement:</p>
  
  <ul>
  <li>MongoDB: version = 2.6.1</li>
  <li>Python: version = 2.7.9</li>
  <li>pymongo: version = 2.8</li>
  </ul>
  
  <p>And, the error is:</p>
  
  <pre><code>&gt;&gt;&gt; import pymongo
  &gt;&gt;&gt; conn = pymongo.Connection('localhost', 27017)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/local/lib/python2.7/site-packages/pymongo/connection.py", line 241, in __init__
      max_pool_size, document_class, tz_aware, _connect, **kwargs)
    File "/usr/local/lib/python2.7/site-packages/pymongo/mongo_client.py", line 377, in __init__
      raise ConnectionFailure(str(e))
  pymongo.errors.ConnectionFailure: [Errno 61] Connection refused
  </code></pre>
  
  <p>What's wrong with it?</p>