Skip to main content

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 saysCauseWhat to do
An option is unknown or invalidA wrong option name or value. The error names the option and where it was setCorrect it. See Runner options
An address is requiredThe role is server or worker and no address is set in code, in the configuration or in RAY_ADDRESSSet address
The role both has an addressAn address is set, often by RAY_ADDRESS in the shell, and the role both would not use itRemove 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 status on 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 resultCauseWhat to do
The exception your task raisedThe task failed for that hostCorrect the task or the device
An import error on some hosts onlyThe node that ran those hosts does not have the package that defines the task or the connection pluginInstall the same packages on every node. The ray attribute of the results of other hosts shows which nodes work
WorkerDiedErrorThe host's worker stopped during the call. The error names the host, the node and the workerLook at that node: memory, processes stopped by the system. The runner starts a new worker at the next run
RemoteTaskErrorThe task raised an exception that could not be rebuilt on the driver. The error holds the type name and the message of the original exceptionRead the type name and the message in the error
OperationTaskNotOnWorkerErrorThe Operation task is not registered through an entry point on the worker's nodeSee Run Operations
TaskTimeoutErrorThe host passed per_host_timeout or the run passed timeoutSee 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.