You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arguments: (ConnectionError(MaxRetryError("HTTPConnectionPool(host='stg-abhisheksinha001', port=9200): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f979c900a00>: Failed to establish a new connection: [Errno -3] Lookup timed out'))")),)
#545
Open
cu-18bcs1637 opened this issue
Mar 23, 2022
· 2 comments
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 20.04.4 LTS (Focal Fossa)
ElasticHQ Version: 3.5.12
Elasticsearch Version: 8.1.0
Python version (ignore is using docker image): Python 3.8.10
Browser Vendor and Version (if applicable): Google Chrome Version 99.0.4844.83 (Official Build) (x86_64)
Issue Description
I downloaded the ElasticHQ 3.5.12 and installed the requirements.txt. First I got this issue #515 I followed the instruction mentioned over there. After this I got this issue ImportError: cannot import name '_endpoint_from_view_func' from 'flask.helpers' (/usr/local/lib/python3.8/dist-packages/flask/helpers.py). I fixed it following this link and installed Flask-RESTful==0.3.9. After this I ran this command python3 application.py and visited my browser to connect with es cluster then it showed the below error on the terminal.
Source Code / Logs
config settings.json not found, searched /etc/elastic-hq/settings.json,~/settings.json,/root/elasticsearch-HQ-3.5.12/settings.json,/root/elasticsearch-HQ-3.5.12/elastichq/settings.json,/root/elasticsearch-HQ-3.5.12/elastichq/config/settings.json
loading config /root/elasticsearch-HQ-3.5.12/elastichq/config/logger.json
2022-03-23 12:08:41,206 INFO engineio server.__init__:140 Server initialized for eventlet.
None
None
2022-03-23 12:10:49,720 INFO elastichq ConnectionService.create_connection:60 Verify: True
2022-03-23 12:10:49,721 INFO elastichq ConnectionService.create_connection:61 Cert File: None
2022-03-23 12:10:49,721 INFO elastichq ConnectionService.create_connection:93 Basic Auth is False
2022-03-23 12:10:49,721 INFO elastichq ConnectionService.create_connection:105 SSL disabled
--- Logging error ---
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 424, in resolve
return _proxy.query(name, rdtype, raise_on_no_answer=raises,
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 380, in query
return end()
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 359, in end
raise result[1]
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 340, in step
a = fun(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/dns/resolver.py", line 1110, in query
return self.resolve(qname, rdtype, rdclass, tcp, source,
File "/usr/local/lib/python3.8/dist-packages/dns/resolver.py", line 1066, in resolve
timeout = self._compute_timeout(start, lifetime,
File "/usr/local/lib/python3.8/dist-packages/dns/resolver.py", line 879, in _compute_timeout
raise LifetimeTimeout(timeout=duration, errors=errors)
dns.resolver.LifetimeTimeout: The resolution lifetime expired after 5.107 seconds: Server 127.0.0.1 UDP port 53 answered udp() got an unexpected keyword argument 'raise_on_truncation'; Server 127.0.0.1 UDP port 53 answered udp() got an unexpected keyword argument 'raise_on_truncation'; Server 127.0.0.1 UDP port 53 answered udp() got an unexpected keyword argument 'raise_on_truncation'; Server 127.0.0.1 UDP port 53 answered udp() got an unexpected keyword argument 'raise_on_truncation'; Server 127.0.0.1 UDP port 53 answered udp() got an unexpected keyword argument 'raise_on_truncation'; Server 127.0.0.1 UDP port 53 answered udp() got an unexpected keyword argument 'raise_on_truncation'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/urllib3/connection.py", line 140, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.8/dist-packages/urllib3/util/connection.py", line 60, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 517, in getaddrinfo
qname, addrs = _getaddrinfo_lookup(host, family, flags)
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 490, in _getaddrinfo_lookup
raise err
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 479, in _getaddrinfo_lookup
answer = resolve(host, qfamily, False, use_network=use_network)
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 432, in resolve
raise EAI_EAGAIN_ERROR
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 479, in _getaddrinfo_lookup
answer = resolve(host, qfamily, False, use_network=use_network)
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 432, in resolve
raise EAI_EAGAIN_ERROR
socket.gaierror: [Errno -3] Lookup timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 598, in urlopen
httplib_response = self._make_request(conn, method, url,
File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.8/http/client.py", line 1256, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1302, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1251, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1011, in _send_output
self.send(msg)
File "/usr/lib/python3.8/http/client.py", line 951, in send
self.connect()
File "/usr/local/lib/python3.8/dist-packages/urllib3/connection.py", line 166, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.8/dist-packages/urllib3/connection.py", line 149, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f979c900a00>: Failed to establish a new connection: [Errno -3] Lookup timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 638, in urlopen
retries = retries.increment(method, url, error=e, _pool=self,
File "/usr/local/lib/python3.8/dist-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='stg-abhisheksinha001', port=9200): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f979c900a00>: Failed to establish a new connection: [Errno -3] Lookup timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/elasticsearch-HQ-3.5.12/elastichq/service/ConnectionService.py", line 106, in create_connection
response = requests.get(scheme + "://" + ip + ":" + port, timeout=REQUEST_TIMEOUT)
File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='stg-abhisheksinha001', port=9200): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f979c900a00>: Failed to establish a new connection: [Errno -3] Lookup timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/__init__.py", line 1085, in emit
msg = self.format(record)
File "/usr/lib/python3.8/logging/__init__.py", line 929, in format
return fmt.format(record)
File "/usr/lib/python3.8/logging/__init__.py", line 668, in format
record.message = record.getMessage()
File "/usr/lib/python3.8/logging/__init__.py", line 373, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "/usr/local/lib/python3.8/dist-packages/eventlet/greenthread.py", line 221, in main
result = function(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/eventlet/wsgi.py", line 818, in process_request
proto.__init__(conn_state, self)
File "/usr/local/lib/python3.8/dist-packages/eventlet/wsgi.py", line 357, in __init__
self.handle()
File "/usr/local/lib/python3.8/dist-packages/eventlet/wsgi.py", line 390, in handle
self.handle_one_request()
File "/usr/local/lib/python3.8/dist-packages/eventlet/wsgi.py", line 466, in handle_one_request
self.handle_one_response()
File "/usr/local/lib/python3.8/dist-packages/eventlet/wsgi.py", line 566, in handle_one_response
result = self.application(self.environ, start_response)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2091, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.8/dist-packages/flask_socketio/__init__.py", line 42, in __call__
return super(_SocketIOMiddleware, self).__call__(environ,
File "/usr/local/lib/python3.8/dist-packages/engineio/middleware.py", line 67, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/usr/local/lib/python3.8/dist-packages/flask_restful/__init__.py", line 467, in wrapper
resp = resource(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/flask/views.py", line 84, in view
return current_app.ensure_sync(self.dispatch_request)(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/flask_restful/__init__.py", line 582, in dispatch_request
resp = meth(*args, **kwargs)
File "/root/elasticsearch-HQ-3.5.12/elastichq/common/exceptions.py", line 29, in _request_wrapper
return functor(*args, **kwargs)
File "/root/elasticsearch-HQ-3.5.12/elastichq/api/clusters.py", line 122, in post
response = ConnectionService().create_connection(ip=params['ip'], port=params.get('port', "9200"),
File "/root/elasticsearch-HQ-3.5.12/elastichq/service/ConnectionService.py", line 173, in create_connection
LOG.error(message, ex)
Message: 'Unable to create connection to: http://stg-abhisheksinha001:9200'
Arguments: (ConnectionError(MaxRetryError("HTTPConnectionPool(host='stg-abhisheksinha001', port=9200): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f979c900a00>: Failed to establish a new connection: [Errno -3] Lookup timed out'))")),)
--- Logging error ---
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 424, in resolve
return _proxy.query(name, rdtype, raise_on_no_answer=raises,
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 380, in query
return end()
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 359, in end
raise result[1]
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 340, in step
a = fun(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/dns/resolver.py", line 1110, in query
return self.resolve(qname, rdtype, rdclass, tcp, source,
File "/usr/local/lib/python3.8/dist-packages/dns/resolver.py", line 1066, in resolve
timeout = self._compute_timeout(start, lifetime,
File "/usr/local/lib/python3.8/dist-packages/dns/resolver.py", line 879, in _compute_timeout
raise LifetimeTimeout(timeout=duration, errors=errors)
dns.resolver.LifetimeTimeout: The resolution lifetime expired after 5.107 seconds: Server 127.0.0.1 UDP port 53 answered udp() got an unexpected keyword argument 'raise_on_truncation'; Server 127.0.0.1 UDP port 53 answered udp() got an unexpected keyword argument 'raise_on_truncation'; Server 127.0.0.1 UDP port 53 answered udp() got an unexpected keyword argument 'raise_on_truncation'; Server 127.0.0.1 UDP port 53 answered udp() got an unexpected keyword argument 'raise_on_truncation'; Server 127.0.0.1 UDP port 53 answered udp() got an unexpected keyword argument 'raise_on_truncation'; Server 127.0.0.1 UDP port 53 answered udp() got an unexpected keyword argument 'raise_on_truncation'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/urllib3/connection.py", line 140, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.8/dist-packages/urllib3/util/connection.py", line 60, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 517, in getaddrinfo
qname, addrs = _getaddrinfo_lookup(host, family, flags)
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 490, in _getaddrinfo_lookup
raise err
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 479, in _getaddrinfo_lookup
answer = resolve(host, qfamily, False, use_network=use_network)
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 432, in resolve
raise EAI_EAGAIN_ERROR
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 479, in _getaddrinfo_lookup
answer = resolve(host, qfamily, False, use_network=use_network)
File "/usr/local/lib/python3.8/dist-packages/eventlet/support/greendns.py", line 432, in resolve
raise EAI_EAGAIN_ERROR
socket.gaierror: [Errno -3] Lookup timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 598, in urlopen
httplib_response = self._make_request(conn, method, url,
File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.8/http/client.py", line 1256, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1302, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1251, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1011, in _send_output
self.send(msg)
File "/usr/lib/python3.8/http/client.py", line 951, in send
self.connect()
File "/usr/local/lib/python3.8/dist-packages/urllib3/connection.py", line 166, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.8/dist-packages/urllib3/connection.py", line 149, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f979c900a00>: Failed to establish a new connection: [Errno -3] Lookup timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 638, in urlopen
retries = retries.increment(method, url, error=e, _pool=self,
File "/usr/local/lib/python3.8/dist-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='stg-abhisheksinha001', port=9200): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f979c900a00>: Failed to establish a new connection: [Errno -3] Lookup timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/elasticsearch-HQ-3.5.12/elastichq/service/ConnectionService.py", line 106, in create_connection
response = requests.get(scheme + "://" + ip + ":" + port, timeout=REQUEST_TIMEOUT)
File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='stg-abhisheksinha001', port=9200): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f979c900a00>: Failed to establish a new connection: [Errno -3] Lookup timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/handlers.py", line 69, in emit
if self.shouldRollover(record):
File "/usr/lib/python3.8/logging/handlers.py", line 185, in shouldRollover
msg = "%s\n" % self.format(record)
File "/usr/lib/python3.8/logging/__init__.py", line 929, in format
return fmt.format(record)
File "/usr/lib/python3.8/logging/__init__.py", line 668, in format
record.message = record.getMessage()
File "/usr/lib/python3.8/logging/__init__.py", line 373, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "/usr/local/lib/python3.8/dist-packages/eventlet/greenthread.py", line 221, in main
result = function(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/eventlet/wsgi.py", line 818, in process_request
proto.__init__(conn_state, self)
File "/usr/local/lib/python3.8/dist-packages/eventlet/wsgi.py", line 357, in __init__
self.handle()
File "/usr/local/lib/python3.8/dist-packages/eventlet/wsgi.py", line 390, in handle
self.handle_one_request()
File "/usr/local/lib/python3.8/dist-packages/eventlet/wsgi.py", line 466, in handle_one_request
self.handle_one_response()
File "/usr/local/lib/python3.8/dist-packages/eventlet/wsgi.py", line 566, in handle_one_response
result = self.application(self.environ, start_response)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2091, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.8/dist-packages/flask_socketio/__init__.py", line 42, in __call__
return super(_SocketIOMiddleware, self).__call__(environ,
File "/usr/local/lib/python3.8/dist-packages/engineio/middleware.py", line 67, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/usr/local/lib/python3.8/dist-packages/flask_restful/__init__.py", line 467, in wrapper
resp = resource(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/flask/views.py", line 84, in view
return current_app.ensure_sync(self.dispatch_request)(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/flask_restful/__init__.py", line 582, in dispatch_request
resp = meth(*args, **kwargs)
File "/root/elasticsearch-HQ-3.5.12/elastichq/common/exceptions.py", line 29, in _request_wrapper
return functor(*args, **kwargs)
File "/root/elasticsearch-HQ-3.5.12/elastichq/api/clusters.py", line 122, in post
response = ConnectionService().create_connection(ip=params['ip'], port=params.get('port', "9200"),
File "/root/elasticsearch-HQ-3.5.12/elastichq/service/ConnectionService.py", line 173, in create_connection
LOG.error(message, ex)
Message: 'Unable to create connection to: http://stg-abhisheksinha001:9200'
Arguments: (ConnectionError(MaxRetryError("HTTPConnectionPool(host='stg-abhisheksinha001', port=9200): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f979c900a00>: Failed to establish a new connection: [Errno -3] Lookup timed out'))")),)
The text was updated successfully, but these errors were encountered:
General information
Issue Description
I downloaded the ElasticHQ 3.5.12 and installed the
requirements.txt
. First I got this issue #515 I followed the instruction mentioned over there. After this I got this issueImportError: cannot import name '_endpoint_from_view_func' from 'flask.helpers' (/usr/local/lib/python3.8/dist-packages/flask/helpers.py)
. I fixed it following this link and installedFlask-RESTful==0.3.9
. After this I ran this commandpython3 application.py
and visited my browser to connect with es cluster then it showed the below error on the terminal.Source Code / Logs
The text was updated successfully, but these errors were encountered: