# Integrate MongoDB with elasticsearch mongo-connector

**URL:** <https://discuss.elastic.co/t/integrate-mongodb-with-elasticsearch-mongo-connector/101471>\
**Category:** Elasticsearch\
**Created:** [September 22, 2017, 10:31am UTC](https://discuss.elastic.co/t/integrate-mongodb-with-elasticsearch-mongo-connector/101471 "2017-09-22T10:31:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaibhav2903](https://avatars.discourse-cdn.com/v4/letter/v/a9a28c/32.png) [@vaibhav2903](https://discuss.elastic.co/u/vaibhav2903)\
**Post date:** [September 22, 2017, 10:31am UTC](https://discuss.elastic.co/t/integrate-mongodb-with-elasticsearch-mongo-connector/101471/1 "2017-09-22T10:31:03Z")

</div>

**I am trying to integrate MongoDB with elasticsearch using mongo-connector. I type the following command.**  
**I am using elastic2\_doc\_manager**

sudo mongo-connector -m localhost:27017 -t localhost:9200 -d elastic2\_doc\_manager

**I get the following error in my log file.**

2017-09-22 15:20:06,352 [ALWAYS] mongo\_connector.connector:51 - Starting mongo-connector version: 2.5.1  
2017-09-22 15:20:06,352 [ALWAYS] mongo\_connector.connector:51 - Python version: 2.7.10 (default, Feb 7 2017, 00:08:15)  
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]  
2017-09-22 15:20:06,394 [ALWAYS] mongo\_connector.connector:51 - Platform: Darwin-16.6.0-x86\_64-i386-64bit  
2017-09-22 15:20:06,394 [ALWAYS] mongo\_connector.connector:51 - pymongo version: 3.5.1  
2017-09-22 15:20:06,395 [WARNING] mongo\_connector.connector:167 - MongoConnector: Can't find /usr/local/var/log/mongodb/oplog.timestamp, attempting to create an empty progress log  
2017-09-22 15:20:06,404 [ALWAYS] mongo\_connector.connector:51 - Source MongoDB version: 3.4.9  
2017-09-22 15:20:06,404 [ALWAYS] mongo\_connector.connector:51 - Target DocManager: mongo\_connector.doc\_managers.elastic2\_doc\_manager version: 0.3.0  
2017-09-22 15:30:21,923 [WARNING] elasticsearch:97 - POST [http://localhost:9200/\_refresh](http://localhost:9200/_refresh) [status:N/A request:0.002s]  
Traceback (most recent call last):  
File "/Library/Python/2.7/site-packages/elasticsearch/connection/http\_urllib3.py", line 114, in perform\_request  
response = self.pool.urlopen(method, url, body, retries=False, headers=self.headers, \*\*kw)  
File "/Library/Python/2.7/site-packages/urllib3/connectionpool.py", line 639, in urlopen  
\_stacktrace=sys.exc\_info()[2])  
File "/Library/Python/2.7/site-packages/urllib3/util/retry.py", line 333, in increment  
raise six.reraise(type(error), error, \_stacktrace)  
File "/Library/Python/2.7/site-packages/urllib3/connectionpool.py", line 601, in urlopen  
chunked=chunked)  
File "/Library/Python/2.7/site-packages/urllib3/connectionpool.py", line 357, in \_make\_request  
conn.request(method, url, \*\*httplib\_request\_kw)  
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1053, in request  
self.\_send\_request(method, url, body, headers)  
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1093, in \_send\_request  
self.endheaders(body)  
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1049, in endheaders  
self.\_send\_output(message\_body)  
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 893, in \_send\_output  
self.send(msg)  
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 855, in send  
self.connect()  
File "/Library/Python/2.7/site-packages/urllib3/connection.py", line 166, in connect  
conn = self.\_new\_conn()  
File "/Library/Python/2.7/site-packages/urllib3/connection.py", line 150, in \_new\_conn  
self, "Failed to establish a new connection: %s" % e)  
NewConnectionError: \<urllib3.connection.HTTPConnection object at 0x110654f50\>: Failed to establish a new connection: [Errno 61] Connection refused  
I have installed mongo-connector using

pip install mongo-connector.

**i am using MAC OSX.**  
**I am unable to continue forward after this.Please help.**  
Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 20, 2017, 10:31am UTC](https://discuss.elastic.co/t/integrate-mongodb-with-elasticsearch-mongo-connector/101471/2 "2017-10-20T10:31:07Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
