=================================== FAILURES ===================================
________________________________ test_defaults _________________________________
host = '2001:4860:4860::8888', port = 80, family = <AddressFamily.AF_INET6: 10>
@toolz.memoize
def _get_ip(host, port, family):
# By using a UDP socket, we don't actually try to connect but
# simply select the local address through which *host* is reachable.
sock = socket.socket(family, socket.SOCK_DGRAM)
try:
> sock.connect((host, port))
E OSError: [Errno 101] Network is unreachable
distributed/utils.py:133: OSError
During handling of the above exception, another exception occurred:
loop = <tornado.platform.asyncio.AsyncIOLoop object at 0x7f361c988f70>
def test_defaults(loop):
with popen(["dask-scheduler"]):
async def f():
# Default behaviour is to listen on all addresses
await assert_can_connect_from_everywhere_4_6(8786, timeout=5.0)
with Client(f"127.0.0.1:{Scheduler.default_port}", loop=loop) as c:
> c.sync(f)
distributed/cli/tests/test_dask_scheduler.py:36:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
distributed/client.py:845: in sync
return sync(
distributed/utils.py:325: in sync
raise exc.with_traceback(tb)
distributed/utils.py:308: in f
result[0] = yield future
../../../anaconda3/envs/dask-distributed/lib/python3.8/site-packages/tornado/gen.py:762: in run
value = future.result()
distributed/cli/tests/test_dask_scheduler.py:33: in f
await assert_can_connect_from_everywhere_4_6(8786, timeout=5.0)
distributed/utils_test.py:1193: in assert_can_connect_from_everywhere_4_6
assert_can_connect("%s://[%s]:%d" % (protocol, get_ipv6(), port), **kwargs),
distributed/utils.py:164: in get_ipv6
return _get_ip(host, port, family=socket.AF_INET6)
cytoolz/functoolz.pyx:476: in cytoolz.functoolz._memoize.__call__
???
distributed/utils.py:142: in _get_ip
addr_info = socket.getaddrinfo(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
host = 'genevieve-G5-5500', port = 80, family = <AddressFamily.AF_INET6: 10>
type = <SocketKind.SOCK_DGRAM: 2>, proto = 17, flags = 0
def getaddrinfo(host, port, family=0, type=0, proto=0, flags=0):
"""Resolve host and port into list of address info entries.
Translate the host/port argument into a sequence of 5-tuples that contain
all the necessary arguments for creating a socket connected to that service.
host is a domain name, a string representation of an IPv4/v6 address or
None. port is a string service name such as 'http', a numeric port number or
None. By passing None as the value of host and port, you can pass NULL to
the underlying C API.
The family, type and proto arguments can be optionally specified in order to
narrow the list of addresses returned. Passing zero as a value for each of
these arguments selects the full range of results.
"""
# We override this function since we want to translate the numeric family
# and socket type values to enum constants.
addrlist = []
> for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
E socket.gaierror: [Errno -5] No address associated with hostname
../../../anaconda3/envs/dask-distributed/lib/python3.8/socket.py:918: gaierror
----------------------------- Captured stdout call -----------------------------
Print from stderr
/
=================
distributed.scheduler - INFO - -----------------------------------------------
distributed.http.proxy - INFO - To route to workers diagnostics web server please install jupyter-server-proxy: python -m pip install jupyter-server-proxy
/home/genevieve/GitHub/temp/distributed/distributed/node.py:160: UserWarning: Port 8787 is already in use.
Perhaps you already have a cluster running?
Hosting the HTTP server on port 33299 instead
warnings.warn(
distributed.scheduler - INFO - -----------------------------------------------
distributed.scheduler - INFO - Clear task state
distributed.scheduler - INFO - Scheduler at: tcp://192.168.1.102:8786
distributed.scheduler - INFO - dashboard at: :33299
distributed.scheduler - INFO - Receive client connection: Client-c457fb8c-fe6f-11eb-b6c8-e19f018f439a
distributed.core - INFO - Starting established connection
distributed.scheduler - INFO - Remove client Client-c457fb8c-fe6f-11eb-b6c8-e19f018f439a
distributed.scheduler - INFO - Remove client Client-c457fb8c-fe6f-11eb-b6c8-e19f018f439a
distributed.scheduler - INFO - Close client connection: Client-c457fb8c-fe6f-11eb-b6c8-e19f018f439a
distributed.scheduler - INFO - End scheduler at 'tcp://192.168.1.102:8786'
Traceback (most recent call last):
File "/home/genevieve/anaconda3/envs/dask-distributed/bin/dask-scheduler", line 33, in <module>
sys.exit(load_entry_point('distributed', 'console_scripts', 'dask-scheduler')())
File "/home/genevieve/GitHub/temp/distributed/distributed/cli/dask_scheduler.py", line 217, in go
main()
File "/home/genevieve/anaconda3/envs/dask-distributed/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "/home/genevieve/anaconda3/envs/dask-distributed/lib/python3.8/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/home/genevieve/anaconda3/envs/dask-distributed/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/genevieve/anaconda3/envs/dask-distributed/lib/python3.8/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/home/genevieve/GitHub/temp/distributed/distributed/cli/dask_scheduler.py", line 208, in main
loop.run_sync(run)
File "/home/genevieve/anaconda3/envs/dask-distributed/lib/python3.8/site-packages/tornado/ioloop.py", line 529, in run_sync
raise TimeoutError("Operation timed out after %s seconds" % timeout)
tornado.util.TimeoutError: Operation timed out after None seconds
Print from stdout
=================
________________________________ test_hostport _________________________________
host = '2001:4860:4860::8888', port = 80, family = <AddressFamily.AF_INET6: 10>
@toolz.memoize
def _get_ip(host, port, family):
# By using a UDP socket, we don't actually try to connect but
# simply select the local address through which *host* is reachable.
sock = socket.socket(family, socket.SOCK_DGRAM)
try:
> sock.connect((host, port))
E OSError: [Errno 101] Network is unreachable
distributed/utils.py:133: OSError
During handling of the above exception, another exception occurred:
loop = <tornado.platform.asyncio.AsyncIOLoop object at 0x7f361bae7610>
def test_hostport(loop):
with popen(["dask-scheduler", "--no-dashboard", "--host", "127.0.0.1:8978"]):
async def f():
# The scheduler's main port can't be contacted from the outside
await assert_can_connect_locally_4(8978, timeout=5.0)
with Client("127.0.0.1:8978", loop=loop) as c:
assert len(c.nthreads()) == 0
> c.sync(f)
distributed/cli/tests/test_dask_scheduler.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
distributed/client.py:845: in sync
return sync(
distributed/utils.py:325: in sync
raise exc.with_traceback(tb)
distributed/utils.py:308: in f
result[0] = yield future
../../../anaconda3/envs/dask-distributed/lib/python3.8/site-packages/tornado/gen.py:762: in run
value = future.result()
distributed/cli/tests/test_dask_scheduler.py:47: in f
await assert_can_connect_locally_4(8978, timeout=5.0)
distributed/utils_test.py:1226: in assert_can_connect_locally_4
assert_cannot_connect("tcp://[%s]:%d" % (get_ipv6(), port), **kwargs),
distributed/utils.py:164: in get_ipv6
return _get_ip(host, port, family=socket.AF_INET6)
cytoolz/functoolz.pyx:476: in cytoolz.functoolz._memoize.__call__
???
distributed/utils.py:142: in _get_ip
addr_info = socket.getaddrinfo(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
host = 'genevieve-G5-5500', port = 80, family = <AddressFamily.AF_INET6: 10>
type = <SocketKind.SOCK_DGRAM: 2>, proto = 17, flags = 0
def getaddrinfo(host, port, family=0, type=0, proto=0, flags=0):
"""Resolve host and port into list of address info entries.
Translate the host/port argument into a sequence of 5-tuples that contain
all the necessary arguments for creating a socket connected to that service.
host is a domain name, a string representation of an IPv4/v6 address or
None. port is a string service name such as 'http', a numeric port number or
None. By passing None as the value of host and port, you can pass NULL to
the underlying C API.
The family, type and proto arguments can be optionally specified in order to
narrow the list of addresses returned. Passing zero as a value for each of
these arguments selects the full range of results.
"""
# We override this function since we want to translate the numeric family
# and socket type values to enum constants.
addrlist = []
> for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
E socket.gaierror: [Errno -5] No address associated with hostname
../../../anaconda3/envs/dask-distributed/lib/python3.8/socket.py:918: gaierror
----------------------------- Captured stdout call -----------------------------
Print from stderr
/
=================
distributed.scheduler - INFO - -----------------------------------------------
distributed.http.proxy - INFO - To route to workers diagnostics web server please install jupyter-server-proxy: python -m pip install jupyter-server-proxy
/home/genevieve/GitHub/temp/distributed/distributed/node.py:160: UserWarning: Port 8787 is already in use.
Perhaps you already have a cluster running?
Hosting the HTTP server on port 45903 instead
warnings.warn(
distributed.scheduler - INFO - -----------------------------------------------
distributed.scheduler - INFO - Clear task state
distributed.scheduler - INFO - Scheduler at: tcp://127.0.0.1:8978
distributed.scheduler - INFO - dashboard at: 127.0.0.1:45903
distributed.scheduler - INFO - Receive client connection: Client-c5649c23-fe6f-11eb-b6c8-e19f018f439a
distributed.core - INFO - Starting established connection
distributed.scheduler - INFO - Remove client Client-c5649c23-fe6f-11eb-b6c8-e19f018f439a
distributed.scheduler - INFO - Remove client Client-c5649c23-fe6f-11eb-b6c8-e19f018f439a
distributed.scheduler - INFO - Close client connection: Client-c5649c23-fe6f-11eb-b6c8-e19f018f439a
distributed.scheduler - INFO - End scheduler at 'tcp://127.0.0.1:8978'
Traceback (most recent call last):
File "/home/genevieve/anaconda3/envs/dask-distributed/bin/dask-scheduler", line 33, in <module>
sys.exit(load_entry_point('distributed', 'console_scripts', 'dask-scheduler')())
File "/home/genevieve/GitHub/temp/distributed/distributed/cli/dask_scheduler.py", line 217, in go
main()
File "/home/genevieve/anaconda3/envs/dask-distributed/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "/home/genevieve/anaconda3/envs/dask-distributed/lib/python3.8/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/home/genevieve/anaconda3/envs/dask-distributed/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/genevieve/anaconda3/envs/dask-distributed/lib/python3.8/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/home/genevieve/GitHub/temp/distributed/distributed/cli/dask_scheduler.py", line 208, in main
loop.run_sync(run)
File "/home/genevieve/anaconda3/envs/dask-distributed/lib/python3.8/site-packages/tornado/ioloop.py", line 529, in run_sync
raise TimeoutError("Operation timed out after %s seconds" % timeout)
tornado.util.TimeoutError: Operation timed out after None seconds
Print from stdout
=================
______________________________ test_no_dashboard _______________________________
loop = <tornado.platform.asyncio.AsyncIOLoop object at 0x7f361bbdc670>
def test_no_dashboard(loop):
with popen(["dask-scheduler", "--no-dashboard"]):
with Client(f"127.0.0.1:{Scheduler.default_port}", loop=loop):
response = requests.get("http://127.0.0.1:8787/status/")
> assert response.status_code == 404
E assert 200 == 404
E +200
E -404
distributed/cli/tests/test_dask_scheduler.py:58: AssertionError
----------------------------- Captured stdout call -----------------------------
Print from stderr
/
=================
distributed.scheduler - INFO - -----------------------------------------------
distributed.http.proxy - INFO - To route to workers diagnostics web server please install jupyter-server-proxy: python -m pip install jupyter-server-proxy
/home/genevieve/GitHub/temp/distributed/distributed/node.py:160: UserWarning: Port 8787 is already in use.
Perhaps you already have a cluster running?
Hosting the HTTP server on port 43953 instead
warnings.warn(
distributed.scheduler - INFO - -----------------------------------------------
distributed.scheduler - INFO - Clear task state
distributed.scheduler - INFO - Scheduler at: tcp://192.168.1.102:8786
distributed.scheduler - INFO - dashboard at: :43953
distributed.scheduler - INFO - Receive client connection: Client-c67c7632-fe6f-11eb-b6c8-e19f018f439a
distributed.core - INFO - Starting established connection
distributed.scheduler - INFO - Remove client Client-c67c7632-fe6f-11eb-b6c8-e19f018f439a
distributed.scheduler - INFO - Remove client Client-c67c7632-fe6f-11eb-b6c8-e19f018f439a
distributed.scheduler - INFO - Close client connection: Client-c67c7632-fe6f-11eb-b6c8-e19f018f439a
distributed.scheduler - INFO - End scheduler at 'tcp://192.168.1.102:8786'
Traceback (most recent call last):
File "/home/genevieve/anaconda3/envs/dask-distributed/bin/dask-scheduler", line 33, in <module>
sys.exit(load_entry_point('distributed', 'console_scripts', 'dask-scheduler')())
File "/home/genevieve/GitHub/temp/distributed/distributed/cli/dask_scheduler.py", line 217, in go
main()
File "/home/genevieve/anaconda3/envs/dask-distributed/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "/home/genevieve/anaconda3/envs/dask-distributed/lib/python3.8/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/home/genevieve/anaconda3/envs/dask-distributed/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/genevieve/anaconda3/envs/dask-distributed/lib/python3.8/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/home/genevieve/GitHub/temp/distributed/distributed/cli/dask_scheduler.py", line 208, in main
loop.run_sync(run)
File "/home/genevieve/anaconda3/envs/dask-distributed/lib/python3.8/site-packages/tornado/ioloop.py", line 529, in run_sync
raise TimeoutError("Operation timed out after %s seconds" % timeout)
tornado.util.TimeoutError: Operation timed out after None seconds
Print from stdout
=================
___________________________ test_dashboard_whitelist ___________________________
loop = <tornado.platform.asyncio.AsyncIOLoop object at 0x7f361bae7b50>
@pytest.mark.skipif(not LINUX, reason="Need 127.0.0.2 to mean localhost")
def test_dashboard_whitelist(loop):
pytest.importorskip("bokeh")
with pytest.raises(Exception):
> requests.get("http://localhost:8787/status/").ok
E Failed: DID NOT RAISE <class 'Exception'>
distributed/cli/tests/test_dask_scheduler.py:123: Failed
What happened:
After following the new contributor guidelines for distributed, pytest finds both errors in test collection and failing tests.
What you expected to happen:
I had expected the pytest suite to complete without failures.
Presumably there is something wonky with my sockets, but I haven't done anything strange recently and should have the defaults for everything in Ubuntu.
Minimal Complete Verifiable Example:
pytest collection errors:
Anything else we need to know?:
The test collection errors occur in
pytest distributed/comm/testsAdditionally, several cli tests fail on my machine as well:
pytest distributed/cli/testsDetails:
Environment:
2021.08.0