Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting elastic search connection error on my windows system #98

Open
mansimht opened this issue Jun 23, 2021 · 0 comments
Open

Getting elastic search connection error on my windows system #98

mansimht opened this issue Jun 23, 2021 · 0 comments

Comments

@mansimht
Copy link

I am getting elastic search connection error while calling Geoparser() in the script. from mordecai import Geoparser successfully works. So could you help me with this ?

Error Traceback:
Models path: C:\Annaconda\lib\site-packages\mordecai\models
GET http://localhost:9200/geonames/_count [status:N/A request:4.098s]
Traceback (most recent call last):
File "C:\Annaconda\lib\site-packages\urllib3\connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "C:\Annaconda\lib\site-packages\urllib3\util\connection.py", line 84, in create_connection
raise err
File "C:\Annaconda\lib\site-packages\urllib3\util\connection.py", line 74, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Annaconda\lib\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 "C:\Annaconda\lib\site-packages\urllib3\connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "C:\Annaconda\lib\site-packages\urllib3\util\retry.py", line 376, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\Annaconda\lib\site-packages\urllib3\packages\six.py", line 735, in reraise
raise value
File "C:\Annaconda\lib\site-packages\urllib3\connectionpool.py", line 672, in urlopen
chunked=chunked,
File "C:\Annaconda\lib\site-packages\urllib3\connectionpool.py", line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File "C:\Annaconda\lib\http\client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Annaconda\lib\http\client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Annaconda\lib\http\client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Annaconda\lib\http\client.py", line 1026, in _send_output
self.send(msg)
File "C:\Annaconda\lib\http\client.py", line 966, in send
self.connect()
File "C:\Annaconda\lib\site-packages\urllib3\connection.py", line 184, in connect
conn = self._new_conn()
File "C:\Annaconda\lib\site-packages\urllib3\connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x000001D32FA1D9C8>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it
GET http://localhost:9200/geonames/_count [status:N/A request:4.062s]
Traceback (most recent call last):
File "C:\Annaconda\lib\site-packages\urllib3\connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "C:\Annaconda\lib\site-packages\urllib3\util\connection.py", line 84, in create_connection
raise err
File "C:\Annaconda\lib\site-packages\urllib3\util\connection.py", line 74, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Annaconda\lib\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 "C:\Annaconda\lib\site-packages\urllib3\connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "C:\Annaconda\lib\site-packages\urllib3\util\retry.py", line 376, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\Annaconda\lib\site-packages\urllib3\packages\six.py", line 735, in reraise
raise value
File "C:\Annaconda\lib\site-packages\urllib3\connectionpool.py", line 672, in urlopen
chunked=chunked,
File "C:\Annaconda\lib\site-packages\urllib3\connectionpool.py", line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File "C:\Annaconda\lib\http\client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Annaconda\lib\http\client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Annaconda\lib\http\client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Annaconda\lib\http\client.py", line 1026, in _send_output
self.send(msg)
File "C:\Annaconda\lib\http\client.py", line 966, in send
self.connect()
File "C:\Annaconda\lib\site-packages\urllib3\connection.py", line 184, in connect
conn = self._new_conn()
File "C:\Annaconda\lib\site-packages\urllib3\connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x000001D2DB474148>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it
GET http://localhost:9200/geonames/_count [status:N/A request:4.124s]
Traceback (most recent call last):
File "C:\Annaconda\lib\site-packages\urllib3\connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "C:\Annaconda\lib\site-packages\urllib3\util\connection.py", line 84, in create_connection
raise err
File "C:\Annaconda\lib\site-packages\urllib3\util\connection.py", line 74, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Annaconda\lib\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 "C:\Annaconda\lib\site-packages\urllib3\connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "C:\Annaconda\lib\site-packages\urllib3\util\retry.py", line 376, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\Annaconda\lib\site-packages\urllib3\packages\six.py", line 735, in reraise
raise value
File "C:\Annaconda\lib\site-packages\urllib3\connectionpool.py", line 672, in urlopen
chunked=chunked,
File "C:\Annaconda\lib\site-packages\urllib3\connectionpool.py", line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File "C:\Annaconda\lib\http\client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Annaconda\lib\http\client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Annaconda\lib\http\client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Annaconda\lib\http\client.py", line 1026, in _send_output
self.send(msg)
File "C:\Annaconda\lib\http\client.py", line 966, in send
self.connect()
File "C:\Annaconda\lib\site-packages\urllib3\connection.py", line 184, in connect
conn = self._new_conn()
File "C:\Annaconda\lib\site-packages\urllib3\connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x000001D2DB4748C8>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it
GET http://localhost:9200/geonames/_count [status:N/A request:4.067s]
Traceback (most recent call last):
File "C:\Annaconda\lib\site-packages\urllib3\connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "C:\Annaconda\lib\site-packages\urllib3\util\connection.py", line 84, in create_connection
raise err
File "C:\Annaconda\lib\site-packages\urllib3\util\connection.py", line 74, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Annaconda\lib\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 "C:\Annaconda\lib\site-packages\urllib3\connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "C:\Annaconda\lib\site-packages\urllib3\util\retry.py", line 376, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\Annaconda\lib\site-packages\urllib3\packages\six.py", line 735, in reraise
raise value
File "C:\Annaconda\lib\site-packages\urllib3\connectionpool.py", line 672, in urlopen
chunked=chunked,
File "C:\Annaconda\lib\site-packages\urllib3\connectionpool.py", line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File "C:\Annaconda\lib\http\client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Annaconda\lib\http\client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Annaconda\lib\http\client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Annaconda\lib\http\client.py", line 1026, in _send_output
self.send(msg)
File "C:\Annaconda\lib\http\client.py", line 966, in send
self.connect()
File "C:\Annaconda\lib\site-packages\urllib3\connection.py", line 184, in connect
conn = self._new_conn()
File "C:\Annaconda\lib\site-packages\urllib3\connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x000001D2DB475048>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it
Traceback (most recent call last):
File "C:\Annaconda\lib\site-packages\urllib3\connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "C:\Annaconda\lib\site-packages\urllib3\util\connection.py", line 84, in create_connection
raise err
File "C:\Annaconda\lib\site-packages\urllib3\util\connection.py", line 74, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Annaconda\lib\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 "C:\Annaconda\lib\site-packages\urllib3\connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "C:\Annaconda\lib\site-packages\urllib3\util\retry.py", line 376, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\Annaconda\lib\site-packages\urllib3\packages\six.py", line 735, in reraise
raise value
File "C:\Annaconda\lib\site-packages\urllib3\connectionpool.py", line 672, in urlopen
chunked=chunked,
File "C:\Annaconda\lib\site-packages\urllib3\connectionpool.py", line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File "C:\Annaconda\lib\http\client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Annaconda\lib\http\client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Annaconda\lib\http\client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Annaconda\lib\http\client.py", line 1026, in _send_output
self.send(msg)
File "C:\Annaconda\lib\http\client.py", line 966, in send
self.connect()
File "C:\Annaconda\lib\site-packages\urllib3\connection.py", line 184, in connect
conn = self._new_conn()
File "C:\Annaconda\lib\site-packages\urllib3\connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x000001D2DB475048>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Annaconda\lib\site-packages\mordecai\geoparse.py", line 71, in init
self.conn.count()
File "C:\Annaconda\lib\site-packages\elasticsearch_dsl\search.py", line 587, in count
**self._params
File "C:\Annaconda\lib\site-packages\elasticsearch\client\utils.py", line 73, in wrapped
return func(*args, params=params, **kwargs)
File "C:\Annaconda\lib\site-packages\elasticsearch\client_init
.py", line 1123, in count
doc_type, '_count'), params=params, body=body)
File "C:\Annaconda\lib\site-packages\elasticsearch\transport.py", line 312, in perform_request
status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
File "C:\Annaconda\lib\site-packages\elasticsearch\connection\http_urllib3.py", line 123, in perform_request
raise ConnectionError('N/A', str(e), e)
elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x000001D2DB475048>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x000001D2DB475048>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "C:\Annaconda\lib\site-packages\mordecai\geoparse.py", line 77, in init
for instructions on setting up Geonames/Elasticsearch""".format(es_hosts, es_port))
elasticsearch.exceptions.ConnectionError: <exception str() failed>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant