Integrate MongoDB with elasticsearch mongo-connector

(vaibhav savala) #1

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 [status:N/A request:0.002s]
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/elasticsearch/connection/", 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/", line 639, in urlopen
File "/Library/Python/2.7/site-packages/urllib3/util/", line 333, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/Library/Python/2.7/site-packages/urllib3/", line 601, in urlopen
File "/Library/Python/2.7/site-packages/urllib3/", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 1053, in request
self._send_request(method, url, body, headers)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 1093, in _send_request
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 1049, in endheaders
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 893, in _send_output
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 855, in send
File "/Library/Python/2.7/site-packages/urllib3/", line 166, in connect
conn = self._new_conn()
File "/Library/Python/2.7/site-packages/urllib3/", 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.

(system) #2

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