title: unable to run mongo-connector
body: <p>I have installed mongo-connector in the mongodb server. </p>
  
  <p>I am executing by giving the command </p>
  
  <pre><code>mongo-connector -m [remote mongo server IP]:[remote mongo server port] -t [elastic search server IP]:[elastic search server Port]  -d elastic_doc_manager.py
  </code></pre>
  
  <p>I also tried with this since mongo is running in the same server with the default port.</p>
  
  <pre><code>mongo-connector -t [elastic search server IP]:[elastic search server Port]  -d elastic_doc_manager.py
  </code></pre>
  
  <p>I am getting error</p>
  
  <pre><code>Traceback (most recent call last):
    File "/usr/local/bin/mongo-connector", line 9, in &lt;module&gt;
      load_entry_point('mongo-connector==2.3.dev0', 'console_scripts', 'mongo-connector')()
  
    File "/usr/local/lib/python2.7/dist-packages/mongo_connector-2.3.dev0-py2.7.egg/mongo_connector/util.py", line 85, in wrapped
      func(*args, **kwargs)
  
    File "/usr/local/lib/python2.7/dist-packages/mongo_connector-2.3.dev0-py2.7.egg/mongo_connector/connector.py", line 1037, in main
      conf.parse_args()
  
    File "/usr/local/lib/python2.7/dist-packages/mongo_connector-2.3.dev0-py2.7.egg/mongo_connector/config.py", line 118, in parse_args
      option, dict((k, values.get(k)) for k in option.cli_names))
  
    File "/usr/local/lib/python2.7/dist-packages/mongo_connector-2.3.dev0-py2.7.egg/mongo_connector/connector.py", line 820, in apply_doc_managers
      module = import_dm_by_name(dm['docManager'])
  
    File "/usr/local/lib/python2.7/dist-packages/mongo_connector-2.3.dev0-py2.7.egg/mongo_connector/connector.py", line 810, in import_dm_by_name
      "Could not import %s." % full_name)
  
  **mongo_connector.errors.InvalidConfiguration: Could not import mongo_connector.doc_managers.elastic_doc_manager.py.**
  </code></pre>
  
  <p>NOTE: I am using python2.7
  and mongo-connector 2.3</p>
  
  <p>Elastic search server is 2.2</p>
  
  <p>Any suggestions ?</p>
  
  <p><strong>[edit]</strong>
  After applying <code>Val</code>'s suggestion:</p>
  
  <blockquote>
    <p>2016-02-29 19:56:59,519 [CRITICAL] mongo_connector.oplog_manager:549 -
    Exception during collection dump</p>
    
    <p>Traceback (most recent call last):</p>
    
    <p>File
    "/usr/local/lib/python2.7/dist-packages/mongo_connector-2.3.dev0-py2.7.egg/mongo_connector/oplog_manager.py",
    line 501, in do_dump</p>
    
    <p>upsert_all(dm)</p>
    
    <p>File
    "/usr/local/lib/python2.7/dist-packages/mongo_connector-2.3.dev0-py2.7.egg/mongo_connector/oplog_manager.py",
    line 485, in upsert_all dm.bulk_upsert(docs_to_dump(namespace),
    mapped_ns, long_ts)</p>
    
    <p>File
    "/usr/local/lib/python2.7/dist-packages/mongo_connector-2.3.dev0-py2.7.egg/mongo_connector/util.py", line 32, in wrapped</p>
    
    <p>return f(*args, **kwargs)</p>
    
    <p>File
    "/usr/local/lib/python2.7/dist-packages/mongo_connector-2.3.dev0-py2.7.egg/mongo_connector/doc_managers/elastic_doc_manager.py", line 190, in bulk_upsert</p>
    
    <p>for ok, resp in responses:</p>
    
    <p>File
    "/usr/local/lib/python2.7/dist-packages/elasticsearch-1.9.0-py2.7.egg/elasticsearch/helpers/init.py",
    line 160, in streaming_bulk</p>
    
    <p>for result in _process_bulk_chunk(client, bulk_actions,
    raise_on_exception, raise_on_error, **kwargs):</p>
    
    <p>File
    "/usr/local/lib/python2.7/dist-packages/elasticsearch-1.9.0-py2.7.egg/elasticsearch/helpers/init.py",
    line 132, in _process_bulk_chunk</p>
    
    <p>raise BulkIndexError('%i document(s) failed to index.' % len(errors),
    errors)</p>
    
    <p>BulkIndexError: (u'2 document(s) failed to
    index.',..document_class=dict, tz_aware=False, connect=True,
    replicaset=u'mss'), u'local'), u'oplog.rs')</p>
    
    <p>2016-02-29 19:56:59,835 [ERROR] mongo_connector.connector:302 -
    MongoConnector: OplogThread unexpectedly stopped! Shutting down</p>
  </blockquote>
  
  <hr>
  
  <p>Hi Val,</p>
  
  <p>I connected with another mongodb instance, which had only one database, having one collection with 30,000+ records and I was able to execute it succesfully. The previous mongodb collection has multiple databases (around 7), which internally had multiple collections (around 5 to 15 per databases) and all were having good amount of documents (ranging from 500 to 50,000) in the collections. </p>
  
  <p>Was Mongo-connector failing because of huge data residing in the mongo database ?</p>
  
  <p>I have further queries</p>
  
  <p>a. Is is possible to get indexing done of only specific collections in the mongodb, residing in different databases? I wan to index only specific collections (not the entire database). How can I achieve this ?</p>
  
  <p>b. In elasticsearch i can see duplicate indexes for one collection. First one is with the database name (as expected), other one with the name mongodb_meta, both of them having same data, if I am changing the collection, the update is happening in both the collections. </p>
  
  <p>c. Is it possible to configure the output index name or any other parameters any how?</p>