# Operator will not start

**URL:** <https://discuss.elastic.co/t/operator-will-not-start/316104>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [October 7, 2022, 6:27pm UTC](https://discuss.elastic.co/t/operator-will-not-start/316104 "2022-10-07T18:27:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Rankin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeff_rankin/32/111822_2.png) [@Jeff\_Rankin](https://discuss.elastic.co/u/Jeff_Rankin)\
**Post date:** [October 7, 2022, 6:27pm UTC](https://discuss.elastic.co/t/operator-will-not-start/316104/1 "2022-10-07T18:27:35Z")

</div>

My operator which has worked just fine for a couple of years (with upgrades of course) is failing today. Logs are below. We had some kubernetes issues earlier but they are are all fixed now. This is the only issue we are having. Any help will be appreciated. This is in AKS for context:

Kubernetes events shows no issues.

```auto
3m24s Warning BackOff pod/elastic-operator-0 Back-off restarting failed container
11m Normal LeaderElection configmap/elastic-operator-leader elastic-operator-0_47744e8a-01be-4e9e-a8b0-c9235373063e became leader

```

Operator Logs:

```auto
E1007 18:19:29.608995 1 leaderelection.go:330] error retrieving resource lock elastic-system/elastic-operator-leader: Get "https://172.18.0.1:443/apis/coordination.k8s.io/v1/namespaces/elastic-system/leases/elastic-operator-leader?timeout=1m0s": context deadline exceeded
I1007 18:19:29.609101 1 leaderelection.go:283] failed to renew lease elastic-system/elastic-operator-leader: timed out waiting for the condition
{"log.level":"error","@timestamp":"2022-10-07T18:19:29.609Z","log.logger":"manager","message":"Failed to start the controller manager","service.version":"2.4.0+96282ca9","service.type":"eck","ecs.version":"1.4.0","error":"leader election lost","error.stack_trace":"runtime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1571"}
{"log.level":"error","@timestamp":"2022-10-07T18:19:29.609Z","log.logger":"manager","message":"Operator stopped with error","service.version":"2.4.0+96282ca9","service.type":"eck","ecs.version":"1.4.0","error":"leader election lost","error.stack_trace":"runtime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1571"}
{"log.level":"error","@timestamp":"2022-10-07T18:19:29.609Z","log.logger":"manager","message":"Shutting down due to error","service.version":"2.4.0+96282ca9","service.type":"eck","ecs.version":"1.4.0","error":"leader election lost","error.stack_trace":"github.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:872\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918\nmain.main\n\t/go/src/github.com/elastic/cloud-on-k8s/cmd/main.go:31\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250"}
Error: leader election lost

```

---

<div class="post-metadata">

**Author:** ![Jeff\_Rankin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeff_rankin/32/111822_2.png) [@Jeff\_Rankin](https://discuss.elastic.co/u/Jeff_Rankin)\
**Post date:** [October 12, 2022, 12:33pm UTC](https://discuss.elastic.co/t/operator-will-not-start/316104/2 "2022-10-12T12:33:03Z")

</div>

This was due to a bad connectivity in kubernetes causing weird issues. It appeared in the operator and in the cluster leader election. Once the connectivity issues were cleared up everything returned to normal.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 9, 2022, 12:33pm UTC](https://discuss.elastic.co/t/operator-will-not-start/316104/3 "2022-11-09T12:33:35Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
