# Ray k8s cluster, cannot run new task when previous task failed

**URL:** <https://discuss.ray.io/t/ray-k8s-cluster-cannot-run-new-task-when-previous-task-failed/6459>\
**Category:** Kubernetes\
**Created:** [June 10, 2022, 4:47am UTC](https://discuss.ray.io/t/ray-k8s-cluster-cannot-run-new-task-when-previous-task-failed/6459 "2022-06-10T04:47:36Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![yic](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/yic/32/437_2.png) [@yic](https://discuss.ray.io/u/yic)\
**Post date:** [June 14, 2022, 5:49pm UTC](https://discuss.ray.io/t/ray-k8s-cluster-cannot-run-new-task-when-previous-task-failed/6459/7 "2022-06-14T17:49:01Z")

</div>

> [@GoingMyWay](#):
>
> `ReplayBuffer`

Thanks for the details here. So the cluster is started by the admin and you login to one of the workers and call `ray.init` right?

I notice the actual error is

```auto
ModuleNotFoundError: No module named 'components'                                                                              

```

Can you verify that you have this module in all worker nodes? Also, if it’s a local module, can you try py\_modules in the runtime env?

One of the reasons I can think of is that the first time when you ran it, the ray python worker starts on the node your local module is, and the next time when you ran it (not restart the cluster), it got scheduled to another worker. The root cause might be that the two workers are running in a different environment which in the end makes you see different results.

---

_[View the full topic](https://discuss.ray.io/t/ray-k8s-cluster-cannot-run-new-task-when-previous-task-failed/6459)._
