failed to start cluster controllers c-dbk7g: context cancel

I installed the rancher in a single node via container docker. I have 03 etcd and control Plane hosts and 03 Worker hosts.
I get this message on the Rancher GUI
“This cluster is currently Unavailable; areas that directly interact with it will not be available until the API is ready.”

This error is in the rancher container logs.
failed to start cluster controllers c-dbk7g: context cancel

2021/06/05 20:05:18 [ERROR] error syncing ‘c-dbk7g’: handler cluster-deploy: Get “https://192.168.0.153:6443/apis/apps/v1/namespaces/cattle-system/daemonsets/cattle-node-agent”: waiting for cluster [c-dbk7g] agent to connect, requeuing
2021-06-05 20:06:34.914592 I | mvcc: store.index: compact 55883328
2021-06-05 20:06:34.957157 I | mvcc: finished scheduled compaction at 55883328 (took 41.306809ms)
2021/06/05 20:07:07 [INFO] Stopping cluster agent for c-dbk7g
2021/06/05 20:07:07 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
W0605 20:07:33.746643 33 watcher.go:199] watch chan error: etcdserver: mvcc: required revision has been compacted
2021/06/05 20:09:12 [INFO] Stopping cluster agent for c-dbk7g
2021/06/05 20:09:12 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
W0605 20:09:58.886016 33 watcher.go:199] watch chan error: etcdserver: mvcc: required revision has been compacted
W0605 20:10:27.733243 33 watcher.go:199] watch chan error: etcdserver: mvcc: required revision has been compacted
2021/06/05 20:11:18 [INFO] Stopping cluster agent for c-dbk7g
2021/06/05 20:11:18 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
2021-06-05 20:11:34.920593 I | mvcc: store.index: compact 55885185
2021-06-05 20:11:34.960779 I | mvcc: finished scheduled compaction at 55885185 (took 38.698053ms)
2021/06/05 20:13:26 [INFO] Stopping cluster agent for c-dbk7g
2021/06/05 20:13:26 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
2021/06/05 20:15:39 [INFO] Stopping cluster agent for c-dbk7g
2021/06/05 20:15:39 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
2021-06-05 20:16:34.926857 I | mvcc: store.index: compact 55887037
2021-06-05 20:16:34.967700 I | mvcc: finished scheduled compaction at 55887037 (took 39.686485ms)
W0605 20:16:46.170323 33 watcher.go:199] watch chan error: etcdserver: mvcc: required revision has been compacted
W0605 20:17:23.630669 33 watcher.go:199] watch chan error: etcdserver: mvcc: required revision has been compacted
2021/06/05 20:17:40 [INFO] Stopping cluster agent for c-dbk7g
2021/06/05 20:17:40 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
W0605 20:19:20.022226 33 watcher.go:199] watch chan error: etcdserver: mvcc: required revision has been compacted
2021/06/05 20:19:52 [INFO] Stopping cluster agent for c-dbk7g
2021/06/05 20:19:52 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
2021-06-05 20:21:34.933216 I | mvcc: store.index: compact 55888893
2021-06-05 20:21:34.973827 I | mvcc: finished scheduled compaction at 55888893 (took 38.986348ms)
2021/06/05 20:21:45 [INFO] Stopping cluster agent for c-dbk7g
2021/06/05 20:21:45 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
2021/06/05 20:22:39 [ERROR] error syncing ‘c-dbk7g’: handler cluster-deploy: Get “https://192.168.0.153:6443/apis/apps/v1/namespaces/cattle-system/daemonsets/cattle-node-agent”: waiting for cluster [c-dbk7g] agent to connect, requeuing
W0605 20:22:53.276338 33 watcher.go:199] watch chan error: etcdserver: mvcc: required revision has been compacted
2021/06/05 20:23:36 [INFO] Stopping cluster agent for c-dbk7g
2021/06/05 20:23:36 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
2021/06/05 20:25:57 [INFO] Stopping cluster agent for c-dbk7g
2021/06/05 20:25:57 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
2021-06-05 20:26:34.940664 I | mvcc: store.index: compact 55890751
2021-06-05 20:26:34.981048 I | mvcc: finished scheduled compaction at 55890751 (took 38.961021ms)
W0605 20:26:40.871202 33 watcher.go:199] watch chan error: etcdserver: mvcc: required revision has been compacted
2021/06/05 20:27:59 [INFO] Stopping cluster agent for c-dbk7g
2021/06/05 20:27:59 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
W0605 20:29:51.284898 33 watcher.go:199] watch chan error: etcdserver: mvcc: required revision has been compacted
2021/06/05 20:30:00 [INFO] Stopping cluster agent for c-dbk7g
2021/06/05 20:30:00 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
W0605 20:30:08.914160 33 watcher.go:199] watch chan error: etcdserver: mvcc: required revision has been compacted
2021-06-05 20:31:34.947562 I | mvcc: store.index: compact 55892605
2021-06-05 20:31:34.986801 I | mvcc: finished scheduled compaction at 55892605 (took 38.106291m

It sounds like you’re mixing two things. Either Rancher is running as a single Docker container, or Rancher is installed into a Kubernetes cluster. It can’t be both. Your post says that you’re running it as a Docker container, but then you provide Rancher container logs as documentation for issues with an external set of master/etcd/worker nodes as if is an external cluster.

Can you share more information about how you built this? Are you trying to just get Rancher running, or are you trying to import a cluster into Rancher? Which part of the documentation are you following, and where do you encounter an error in those steps?

Exatamente, Installing Rancher on a Single Node Using Docker, Eu criei um cluster, e dividi os work e o etcd e control Plane em outros hosts, o log de erro é no container do docker.
![cluster_rancher|690x306](upload://uHqcLTZorqtcUB8FAh16N84DM3V.png
2021-06-08 12:08:08.203675 W | etcdserver: read-only range request “key:”/registry/configmaps/fleet-system/gitjob" " with result “range_response_count:1 size:530” took too long (140.140221ms) to execute
2021-06-08 12:08:13.510905 W | etcdserver: read-only range request “key:”/registry/leases" range_end:"/registry/leaset" count_only:true " with result “range_response_count:0 size:9” took too long (107.498826ms) to execute
2021-06-08 12:08:13.511078 W | etcdserver: read-only range request “key:”/registry/management.cattle.io/etcdbackups" range_end:"/registry/management.cattle.io/etcdbackupt" count_only:true " with result “range_response_count:0 size:9” took too long (127.546902ms) to execute
2021/06/08 12:08:45 [INFO] Stopping cluster agent for c-dbk7g
2021/06/08 12:08:45 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
2021-06-08 12:10:48.309009 I | mvcc: store.index: compact 55173310
2021-06-08 12:10:48.354377 I | mvcc: finished scheduled compaction at 55173310 (took 38.722767ms)
2021/06/08 12:10:51 [INFO] Stopping cluster agent for c-dbk7g
2021/06/08 12:10:51 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
W0608 12:11:04.374109 30 watcher.go:199] watch chan error: etcdserver: mvcc: required revision has been compacted
W0608 12:11:31.217969 30 watcher.go:199] watch chan error: etcdserver: mvcc: required revision has been compacted
2021/06/08 12:12:59 [INFO] Stopping cluster agent for c-dbk7g
2021/06/08 12:12:59 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
2021/06/08 12:15:12 [INFO] Stopping cluster agent for c-dbk7g
2021/06/08 12:15:12 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
2021-06-08 12:15:48.320708 I | mvcc: store.index: compact 55175168
2021-06-08 12:15:48.361789 I | mvcc: finished scheduled compaction at 55175168 (took 40.025439ms)
2021/06/08 12:17:11 [INFO] Stopping cluster agent for c-dbk7g
2021/06/08 12:17:11 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
2021/06/08 12:19:25 [INFO] Stopping cluster agent for c-dbk7g
2021/06/08 12:19:25 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
2021-06-08 12:20:48.326223 I | mvcc: store.index: compact 55177023
2021-06-08 12:20:48.365909 I | mvcc: finished scheduled compaction at 55177023 (took 38.146249ms)
2021/06/08 12:21:29 [INFO] Stopping cluster agent for c-dbk7g
2021/06/08 12:21:29 [ERROR] failed to start cluster controllers c-dbk7g: context canceled
I lost access to cluster resources
What to do to get the docker container back ?

I don’t speak Portugese, so I’m not sure what you’re saying.

If you want to run Rancher as a Docker container, you run it on its own host, and then you can create and import Kubernetes clusters running on other hosts. You cannot run a Kubernetes cluster on the same host as the Rancher container when you use this method.

If you want to run Rancher inside of a Kubernetes cluster, you should first build that cluster (RKE/K3s/RKE2/EKS/AKS/GKE/etc), then install Rancher into that cluster using Helm. Rancher can then manage that cluster and its workloads, and you can also use it to create and import clusters running on other hosts.

These two methods are mutually exclusive, and both are clearly explained in the documentation at rancher.com/docs.