Blocked ports

In some cases, the default port 8786 used for communication between your Dask client (from which you submit code) and the Coiled Dask scheduler (running in the cloud) may be blocked (see Communication with Dask clusters).

If this is the case, you would likely get an error from the client that it’s unable to connect to the tls://<scheduler address>:8786, e.g.:

OSError: Timed out trying to connect to tls://54.212.201.147:8786 after 5 s

You can also check if port 8786 is blocked by trying to load http://portquiz.net:8786 on your local machine.

The easiest solution is to use a different port for communication between the client and scheduler. In the following example, you can use port 443, which is usually not blocked since it is used for HTTPS. When you specify the scheduler_port, we’ll open this port on the cluster firewall and tell the Dask scheduler to use this port.

import coiled

cluster = coiled.Cluster(
    n_workers=1,
    scheduler_port=443,
)