dask / old-dask-yarn

Deprecated, please use https://github.com/jcrist/skein or https://github.com/dask/dask-yarn instead
7 stars 2 forks source link

Connection refused #14

Closed quartox closed 7 years ago

quartox commented 7 years ago

I believe the servers that I use will not allow launching of connections to localhost. Instead you need to specify the full host name. E.g. when launching jupyter I use socket.gethostname() as the IP.

I believe the following error is related, but I am including the full error trace in case I am misunderstanding.

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/requests/packages/urllib3/connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/requests/packages/urllib3/util/connection.py", line 83, in create_connection
    raise err
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/requests/packages/urllib3/util/connection.py", line 73, 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 "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 356, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/home/jlord/.conda/envs/dask/lib/python3.5/http/client.py", line 1107, in request
    self._send_request(method, url, body, headers)
  File "/home/jlord/.conda/envs/dask/lib/python3.5/http/client.py", line 1152, in _send_request
    self.endheaders(body)
  File "/home/jlord/.conda/envs/dask/lib/python3.5/http/client.py", line 1103, in endheaders
    self._send_output(message_body)
  File "/home/jlord/.conda/envs/dask/lib/python3.5/http/client.py", line 934, in _send_output
    self.send(msg)
  File "/home/jlord/.conda/envs/dask/lib/python3.5/http/client.py", line 877, in send
    self.connect()
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/requests/packages/urllib3/connection.py", line 166, in connect
    conn = self._new_conn()
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/requests/packages/urllib3/connection.py", line 150, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.HTTPConnection object at 0x7f65111646a0>: 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 "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/requests/adapters.py", line 438, in send
    timeout=timeout
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 649, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/requests/packages/urllib3/util/retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8088): Max retries exceeded with url: /ws/v1/cluster/apps/ (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f65111646a0>: 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 "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/dask_yarn/core.py", line 120, in stop
    self.knit.kill()
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/knit/core.py", line 443, in kill
    return self.yarn_api.kill(self.app_id)
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/knit/yarn_api.py", line 19, in wrapper
    if app_id not in cls.apps:
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/knit/yarn_api.py", line 37, in apps
    r = requests.get(url)
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/requests/sessions.py", line 518, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/requests/sessions.py", line 639, in send
    r = adapter.send(request, **kwargs)
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/requests/adapters.py", line 502, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8088): Max retries exceeded with url: /ws/v1/cluster/apps/ (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f65111646a0>: Failed to establish a new connection: [Errno 111] Connection refused',))
distributed.utils - ERROR - 'StreamClosedError' object has no attribute 'real_error'
Traceback (most recent call last):
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/distributed/comm/tcp.py", line 145, in read
    n_frames = yield stream.read_bytes(8)
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/tornado/gen.py", line 870, in run
    value = future.result()
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
tornado.iostream.StreamClosedError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/distributed/utils.py", line 370, in log_errors
    yield
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/distributed/client.py", line 594, in _handle_report
    msgs = yield self.scheduler_comm.comm.read()
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/tornado/gen.py", line 870, in run
    value = future.result()
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/tornado/gen.py", line 876, in run
    yielded = self.gen.throw(*exc_info)
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/distributed/comm/tcp.py", line 159, in read
    convert_stream_closed_error(e)
  File "/home/jlord/.conda/envs/dask/lib/python3.5/site-packages/distributed/comm/tcp.py", line 100, in convert_stream_closed_error
    if exc.real_error is not None:
AttributeError: 'StreamClosedError' object has no attribute 'real_error'
martindurant commented 7 years ago

Did you successfully start a session before seeing this? atexit only appears in the codebase as a terminator for dask_yarn, it would be strange if you could start containers but not stop them...

quartox commented 7 years ago

My most recent errors are in #17, so I haven't seen this in a while. I saw this error message before #13 was fixed. I haven't seen it again, but I am not sure if it would be an issue for future users. Feel free to close if you don't think it is a concern.

martindurant commented 7 years ago

I'll close then, and can be reopened if this specific thing emerges again.