davebryson / py-tendermint

A Python microframework for building blockchain applications with Tendermint
Other
22 stars 3 forks source link

"Failed to establish a new connection: [Errno 111] Connection refused" after running simpleapp_clien.py #5

Open Hezaveh opened 5 years ago

Hezaveh commented 5 years ago

python3 examples/simpleapp_client.py check-status

Error: Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/urllib3/connection.py", line 171, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw) File "/usr/local/lib/python3.6/dist-packages/urllib3/util/connection.py", line 79, in create_connection raise err File "/usr/local/lib/python3.6/dist-packages/urllib3/util/connection.py", line 69, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 600, in urlopen chunked=chunked) File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 354, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/lib/python3.6/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.6/http/client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.6/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.6/http/client.py", line 1026, in _send_output self.send(msg) File "/usr/lib/python3.6/http/client.py", line 964, in send self.connect() File "/usr/local/lib/python3.6/dist-packages/urllib3/connection.py", line 196, in connect conn = self._new_conn() File "/usr/local/lib/python3.6/dist-packages/urllib3/connection.py", line 180, in _new_conn self, "Failed to establish a new connection: %s" % e) urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fe26a656be0>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/requests/adapters.py", line 445, in send timeout=timeout File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 638, in urlopen _stacktrace=sys.exc_info()[2]) File "/usr/local/lib/python3.6/dist-packages/urllib3/util/retry.py", line 398, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=46657): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fe26a656be0>: Failed to establish a new connection: [Errno 111] Connection refused',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "examples/simpleapp_client.py", line 36, in cli() File "/usr/local/lib/python3.6/dist-packages/Click-7.0-py3.6.egg/click/core.py", line 764, in call return self.main(args, kwargs) File "/usr/local/lib/python3.6/dist-packages/Click-7.0-py3.6.egg/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.6/dist-packages/Click-7.0-py3.6.egg/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.6/dist-packages/Click-7.0-py3.6.egg/click/core.py", line 956, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python3.6/dist-packages/Click-7.0-py3.6.egg/click/core.py", line 555, in invoke return callback(args, kwargs) File "examples/simpleapp_client.py", line 16, in check_status print(rpc.status()) File "/usr/local/lib/python3.6/dist-packages/tendermint-0.3.0-py3.6.egg/tendermint/client.py", line 72, in status return self.call('status', []) File "/usr/local/lib/python3.6/dist-packages/tendermint-0.3.0-py3.6.egg/tendermint/client.py", line 42, in call timeout=3 File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 559, in post return self.request('POST', url, data=data, json=json, kwargs) File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 512, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 622, in send r = adapter.send(request, kwargs) File "/usr/local/lib/python3.6/dist-packages/requests/adapters.py", line 513, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=46657): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fe26a656be0>: Failed to establish a new connection: [Errno 111] Connection refused',))

davebryson commented 5 years ago

This is most likely a result of py-tendermint being way behind the current version of ABCI. Unfortunately I haven't had the time to keep it updated. The py-abci project is much more up to date.

faidi-saif commented 5 years ago

I have the same problem ! please share the solution if you got it