Troubleshooting
Find the error or the symptom you observe. Each entry gives the cause and what to do.
The run fails before any host starts
RunnerSettingsError
| Message says | Cause | What to do |
|---|---|---|
| An option is unknown or invalid | A wrong option name or value. The error names the option and where it was set | Correct it. See Runner options |
| An address is required | The role is server or worker and no address is set in code, in the configuration or in RAY_ADDRESS | Set address |
The role both has an address | An address is set, often by RAY_ADDRESS in the shell, and the role both would not use it | Remove the address, or set the role worker or server |
RayClusterUnreachableError
The runner could not connect to the cluster within connect_timeout, or the machine that runs
the script is not a node of the cluster.
- Check the address and the port.
- Check that the head node runs:
ray statuson the head node. - Join the driver's machine to the cluster:
ray start --address <head>:6379.
NoWorkerNodeError
No live node with at least one CPU can run workers for the role. With the role server, the
driver's node does not count. Add a node to the cluster, or use the role worker.
TaskNotSerializableError
The task function or one of its arguments cannot be sent to the workers. The error names the task. Remove arguments such as locks, open files and open connections, and create them inside the task. See What changes for your tasks.
One host fails
| Error in the host's result | Cause | What to do |
|---|---|---|
| The exception your task raised | The task failed for that host | Correct the task or the device |
| An import error on some hosts only | The node that ran those hosts does not have the package that defines the task or the connection plugin | Install the same packages on every node. The ray attribute of the results of other hosts shows which nodes work |
WorkerDiedError | The host's worker stopped during the call. The error names the host, the node and the worker | Look at that node: memory, processes stopped by the system. The runner starts a new worker at the next run |
RemoteTaskError | The task raised an exception that could not be rebuilt on the driver. The error holds the type name and the message of the original exception | Read the type name and the message in the error |
OperationTaskNotOnWorkerError | The Operation task is not registered through an entry point on the worker's node | See Run Operations |
TaskTimeoutError | The host passed per_host_timeout or the run passed timeout | See Deadlines and cancellation |
Other symptoms
A change the task makes to a variable of the script is lost
The task ran in another process. Return the value in the Result, or store it in host.data.
A session opens again at every run
Sessions stay open only while the same Python process and the same workers run. Check that:
- the script does not exit between the runs;
- the host's inventory data does not change between the runs;
- the host did not pass its deadline in the previous run.
See Sessions stay open between runs.
Hosts fail with TaskTimeoutError although the devices answer fast
A host's deadline keeps running while the host waits for a free place on its worker. Raise
workers_per_node or hosts_per_worker, or raise per_host_timeout.
Under uv run, the first run is slow or workers fail to start
Ray builds a uv environment for each worker when RAY_ENABLE_UV_RUN_RUNTIME_ENV is not 0.
nornir_ray sets it on import, but only if ray was not imported first. Import nornir_ray
before ray, or set the variable before you start the script.