rancher: [BUG] upgrade docker install from 2.8.3 -> 2.8.4 fails

Rancher Server Setup

  • Rancher version: 2.8.3 to 2.8.4
  • Installation option: docker (v26)

Describe the bug ran

docker stop rancher
docker rm rancher
docker pull rancher/rancher:stable
docker run -d --restart=unless-stopped --name rancher  -p 80:80 -p 443:443   -v /opt/rancher:/var/lib/rancher   --privileged   rancher/rancher:stable --acme-domain *****

Docker logs after running. Stops at the last line and then restarts the docker.

2024/06/17 09:34:54 [INFO] Rancher version v2.8.4 (29572e61e) is starting
2024/06/17 09:34:54 [INFO] Rancher arguments {ACMEDomains:[*****] AddLocal:true Embedded:false BindHost: HTTPListenPort:80 HTTPSListenPort:443 K8sMode:auto Debug:false Trace:false NoCACerts:false AuditLogPath:/var/log/auditlog/rancher-api-audit.log AuditLogMaxage:10 AuditLogMaxsize:100 AuditLogMaxbackup:10 AuditLevel:0 Features: ClusterRegistry:}
2024/06/17 09:34:54 [INFO] Listening on /tmp/log.sock
2024/06/17 09:34:54 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2024/06/17 09:34:56 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2024/06/17 09:34:58 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2024/06/17 09:35:00 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2024/06/17 09:35:02 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2024/06/17 09:35:04 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2024/06/17 09:35:06 [INFO] Running in single server mode, will not peer connections
2024/06/17 09:35:07 [INFO] Applying CRD features.management.cattle.io
2024/06/17 09:35:41 [INFO] Updating embedded CRD clusterroletemplatebindings.management.cattle.io
2024/06/17 09:35:41 [INFO] Updating embedded CRD globalroles.management.cattle.io
2024/06/17 09:35:41 [INFO] Updating embedded CRD globalrolebindings.management.cattle.io
2024/06/17 09:35:41 [INFO] Updating embedded CRD projects.management.cattle.io
2024/06/17 09:35:41 [INFO] Updating embedded CRD projectroletemplatebindings.management.cattle.io
2024/06/17 09:35:41 [INFO] Updating embedded CRD roletemplates.management.cattle.io
2024/06/17 09:35:41 [INFO] Applying CRD navlinks.ui.cattle.io
2024/06/17 09:35:41 [INFO] Applying CRD podsecurityadmissionconfigurationtemplates.management.cattle.io
2024/06/17 09:35:41 [INFO] Applying CRD clusters.management.cattle.io
2024/06/17 09:35:41 [INFO] Applying CRD apiservices.management.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD clusterregistrationtokens.management.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD settings.management.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD preferences.management.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD features.management.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD clusterrepos.catalog.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD operations.catalog.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD apps.catalog.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD fleetworkspaces.management.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD managedcharts.management.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD clusters.provisioning.cattle.io
2024/06/17 09:35:42 [INFO] Applying CRD clusters.provisioning.cattle.io
2024/06/17 09:35:43 [INFO] Applying CRD rkeclusters.rke.cattle.io
2024/06/17 09:35:43 [INFO] Applying CRD rkecontrolplanes.rke.cattle.io
2024/06/17 09:35:43 [INFO] Applying CRD rkebootstraps.rke.cattle.io
2024/06/17 09:35:43 [INFO] Applying CRD rkebootstraptemplates.rke.cattle.io
2024/06/17 09:35:43 [INFO] Applying CRD rkecontrolplanes.rke.cattle.io
2024/06/17 09:35:43 [INFO] Applying CRD custommachines.rke.cattle.io
2024/06/17 09:35:43 [INFO] Applying CRD etcdsnapshots.rke.cattle.io
2024/06/17 09:35:43 [INFO] Applying CRD clusters.cluster.x-k8s.io
2024/06/17 09:35:43 [INFO] Applying CRD machinedeployments.cluster.x-k8s.io
2024/06/17 09:35:43 [INFO] Applying CRD machinehealthchecks.cluster.x-k8s.io
2024/06/17 09:35:43 [INFO] Applying CRD machines.cluster.x-k8s.io
2024/06/17 09:35:43 [INFO] Applying CRD machinesets.cluster.x-k8s.io
2024/06/17 09:35:44 [FATAL] Internal error occurred: failed calling webhook "rancher.cattle.io.settings.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/settings.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook"

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 11
  • Comments: 33 (3 by maintainers)

Commits related to this issue

Most upvoted comments

Finally got it, guys

In case you are already down, ssh to your Rancher node

docker exec -t rancher bash -c "while true; do kubectl delete validatingwebhookconfigurations rancher.cattle.io; \
  kubectl patch settings.management.cattle.io fleet-version -p '{\"value\":\"103.1.5+up0.9.5\"}' --type=merge; \
  kubectl patch settings.management.cattle.io rancher-webhook-version -p '{\"value\":\"103.0.6+up0.4.7\"}' --type=merge; done"

and then renistall rancher-webhook from Apps menu to have validating webhook again properly setup.

The same for 2.8.4 -> 2.8.5

Our 2.8.4 also has webhook errors, but in that version it does not stop the container and just works. After upgrading to 2.8.5 it stops just like the first post.

It may be related to https://github.com/rancher/rancher/issues/45418

INFO: Running k3s server --cluster-init --cluster-reset
ERROR:
time="2024-06-19T11:30:54Z" level=warning msg="remove /var/lib/rancher/k3s/agent/etc/k3s-api-server-agent-load-balancer.json: no such file or directory"
time="2024-06-19T11:30:54Z" level=info msg="Starting k3s v1.28.6+k3s2 (c9f49a3b)"
time="2024-06-19T11:30:54Z" level=info msg="Managed etcd cluster bootstrap already complete and initialized"
time="2024-06-19T11:30:54Z" level=info msg="certificate CN=kube-apiserver signed by CN=k3s-server-ca@1652106434: notBefore=2022-05-09 14:27:14 +0000 UTC notAfter=2025-06-19 11:30:54 +0000 UTC"
time="2024-06-19T11:30:54Z" level=info msg="certificate CN=etcd-peer signed by CN=etcd-peer-ca@1652106434: notBefore=2022-05-09 14:27:14 +0000 UTC notAfter=2025-06-19 11:30:54 +0000 UTC"
time="2024-06-19T11:30:54Z" level=info msg="certificate CN=etcd-server signed by CN=etcd-server-ca@1652106434: notBefore=2022-05-09 14:27:14 +0000 UTC notAfter=2025-06-19 11:30:54 +0000 UTC"
time="2024-06-19T11:30:54Z" level=fatal msg="starting kubernetes: preparing server: start managed database: Managed etcd cluster membership was previously reset, please remove the cluster-reset flag and start k3s normally. If you need to perform another cluster reset, you must first manually delete the file at /var/lib/rancher/k3s/server/db/reset-flag"
INFO: Running k3s server --cluster-init --cluster-reset
2024/06/19 11:31:14 [INFO] Rancher version v2.8.4 (29572e61e) is starting
2024/06/19 11:31:14 [INFO] Rancher arguments {ACMEDomains:[] AddLocal:true Embedded:false BindHost: HTTPListenPort:80 HTTPSListenPort:443 K8sMode:auto Debug:false Trace:false NoCACerts:true AuditLogPath:/var/log/auditlog/rancher-api-audit.log AuditLogMaxage:10 AuditLogMaxsize:100 AuditLogMaxbackup:10 AuditLevel:0 Features: ClusterRegistry:}
2024/06/19 11:31:14 [INFO] Listening on /tmp/log.sock
2024/06/19 11:31:14 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2024/06/19 11:31:16 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2024/06/19 11:31:18 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2024/06/19 11:31:20 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2024/06/19 11:31:22 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6444/version?timeout=15m0s": dial tcp 127.0.0.1:6444: connect: connection refused
2024/06/19 11:31:31 [INFO] Running in single server mode, will not peer connections
2024/06/19 11:31:32 [INFO] Applying CRD features.management.cattle.io
2024/06/19 11:31:32 [INFO] Updating embedded CRD clusterroletemplatebindings.management.cattle.io
2024/06/19 11:31:32 [INFO] Updating embedded CRD globalroles.management.cattle.io
2024/06/19 11:31:32 [INFO] Updating embedded CRD globalrolebindings.management.cattle.io
2024/06/19 11:31:32 [INFO] Updating embedded CRD projects.management.cattle.io
2024/06/19 11:31:32 [INFO] Updating embedded CRD projectroletemplatebindings.management.cattle.io
2024/06/19 11:31:32 [INFO] Updating embedded CRD roletemplates.management.cattle.io
2024/06/19 11:31:33 [INFO] Applying CRD navlinks.ui.cattle.io
2024/06/19 11:31:33 [INFO] Applying CRD podsecurityadmissionconfigurationtemplates.management.cattle.io
2024/06/19 11:31:33 [INFO] Applying CRD clusters.management.cattle.io
2024/06/19 11:31:33 [INFO] Applying CRD apiservices.management.cattle.io
2024/06/19 11:31:33 [INFO] Applying CRD clusterregistrationtokens.management.cattle.io
2024/06/19 11:31:33 [INFO] Applying CRD settings.management.cattle.io
2024/06/19 11:31:33 [INFO] Applying CRD preferences.management.cattle.io
2024/06/19 11:31:33 [INFO] Applying CRD features.management.cattle.io
2024/06/19 11:31:33 [INFO] Applying CRD clusterrepos.catalog.cattle.io
2024/06/19 11:31:33 [INFO] Applying CRD operations.catalog.cattle.io
2024/06/19 11:31:33 [INFO] Applying CRD apps.catalog.cattle.io
2024/06/19 11:31:33 [INFO] Applying CRD fleetworkspaces.management.cattle.io
2024/06/19 11:31:34 [INFO] Applying CRD managedcharts.management.cattle.io
2024/06/19 11:31:34 [INFO] Applying CRD clusters.provisioning.cattle.io
2024/06/19 11:31:34 [INFO] Applying CRD clusters.provisioning.cattle.io
2024/06/19 11:31:34 [INFO] Applying CRD rkeclusters.rke.cattle.io
2024/06/19 11:31:34 [INFO] Applying CRD rkecontrolplanes.rke.cattle.io
2024/06/19 11:31:34 [INFO] Applying CRD rkebootstraps.rke.cattle.io
2024/06/19 11:31:34 [INFO] Applying CRD rkebootstraptemplates.rke.cattle.io
2024/06/19 11:31:34 [INFO] Applying CRD rkecontrolplanes.rke.cattle.io
2024/06/19 11:31:34 [INFO] Applying CRD custommachines.rke.cattle.io
2024/06/19 11:31:34 [INFO] Applying CRD etcdsnapshots.rke.cattle.io
2024/06/19 11:31:34 [INFO] Applying CRD clusters.cluster.x-k8s.io
2024/06/19 11:31:34 [INFO] Applying CRD machinedeployments.cluster.x-k8s.io
2024/06/19 11:31:34 [INFO] Applying CRD machinehealthchecks.cluster.x-k8s.io
2024/06/19 11:31:34 [INFO] Applying CRD machines.cluster.x-k8s.io
2024/06/19 11:31:34 [INFO] Applying CRD machinesets.cluster.x-k8s.io
2024/06/19 11:31:35 [WARNING] Unknown setting display-add-extension-repos-banner
2024/06/19 11:31:35 [ERROR] Error adding label cattle.io/unknown to setting display-add-extension-repos-banner: Internal error occurred: failed calling webhook "rancher.cattle.io.settings.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/settings.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook"
2024/06/19 11:31:35 [WARNING] Unknown setting kubeconfig-token-ttl-minutes
2024/06/19 11:31:35 [ERROR] Error adding label cattle.io/unknown to setting kubeconfig-token-ttl-minutes: Internal error occurred: failed calling webhook "rancher.cattle.io.settings.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/settings.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook"
2024/06/19 11:31:35 [WARNING] Unknown setting rancher-webhook-min-version
2024/06/19 11:31:35 [ERROR] Error adding label cattle.io/unknown to setting rancher-webhook-min-version: Internal error occurred: failed calling webhook "rancher.cattle.io.settings.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/settings.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook"
2024/06/19 11:31:35 [WARNING] Unknown setting rdns-base-url
2024/06/19 11:31:35 [ERROR] Error adding label cattle.io/unknown to setting rdns-base-url: Internal error occurred: failed calling webhook "rancher.cattle.io.settings.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/settings.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook"
2024/06/19 11:31:35 [WARNING] Unknown setting ui-link-color
2024/06/19 11:31:35 [ERROR] Error adding label cattle.io/unknown to setting ui-link-color: Internal error occurred: failed calling webhook "rancher.cattle.io.settings.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/settings.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook"
2024/06/19 11:31:35 [WARNING] Unknown setting ui-logo-dark
2024/06/19 11:31:35 [ERROR] Error adding label cattle.io/unknown to setting ui-logo-dark: Internal error occurred: failed calling webhook "rancher.cattle.io.settings.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/settings.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook"
2024/06/19 11:31:35 [WARNING] Unknown setting ui-logo-light
2024/06/19 11:31:35 [ERROR] Error adding label cattle.io/unknown to setting ui-logo-light: Internal error occurred: failed calling webhook "rancher.cattle.io.settings.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/settings.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook"
2024/06/19 11:31:35 [WARNING] Unknown setting ui-primary-color
2024/06/19 11:31:35 [ERROR] Error adding label cattle.io/unknown to setting ui-primary-color: Internal error occurred: failed calling webhook "rancher.cattle.io.settings.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/settings.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook"
2024/06/19 11:31:41 [INFO] Starting cluster controllers for local
2024/06/19 11:31:41 [INFO] Starting /v1, Kind=Secret controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=NodeDriver controller
2024/06/19 11:31:41 [INFO] Starting /v1, Kind=ServiceAccount controller
2024/06/19 11:31:41 [INFO] Starting rbac.authorization.k8s.io/v1, Kind=ClusterRole controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=GlobalRoleBinding controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=Token controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=ClusterAlert controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=MultiClusterAppRevision controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=Notifier controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=ClusterTemplate controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=Group controller
2024/06/19 11:31:41 [INFO] Starting API controllers
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=DynamicSchema controller
2024/06/19 11:31:41 [INFO] Starting rbac.authorization.k8s.io/v1, Kind=Role controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=Cluster controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=CatalogTemplateVersion controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=MultiClusterApp controller
2024/06/19 11:31:41 [INFO] Starting rbac.authorization.k8s.io/v1, Kind=RoleBinding controller
2024/06/19 11:31:41 [INFO] Starting /v1, Kind=Namespace controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=ClusterRegistrationToken controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=KontainerDriver controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=Setting controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=PodSecurityPolicyTemplateProjectBinding controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=ClusterTemplateRevision controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=UserAttribute controller
2024/06/19 11:31:41 [INFO] Starting apiextensions.k8s.io/v1, Kind=CustomResourceDefinition controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=GlobalDns controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=ClusterCatalog controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=GroupMember controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=User controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=Feature controller
2024/06/19 11:31:41 [INFO] Starting cluster.x-k8s.io/v1beta1, Kind=Cluster controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=GlobalRole controller
2024/06/19 11:31:41 [INFO] Starting rke.cattle.io/v1, Kind=RKEBootstrap controller
2024/06/19 11:31:41 [INFO] Starting catalog.cattle.io/v1, Kind=ClusterRepo controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=Preference controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=RoleTemplate controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=ProjectRoleTemplateBinding controller
2024/06/19 11:31:41 [INFO] Starting /v1, Kind=ConfigMap controller
2024/06/19 11:31:41 [INFO] Starting apiregistration.k8s.io/v1, Kind=APIService controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=CatalogTemplate controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=RkeK8sServiceOption controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=RkeK8sSystemImage controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=ClusterRoleTemplateBinding controller
2024/06/19 11:31:41 [INFO] Starting provisioning.cattle.io/v1, Kind=Cluster controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=Node controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=APIService controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=NodeTemplate controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=PodSecurityPolicyTemplate controller
2024/06/19 11:31:41 [INFO] Starting project.cattle.io/v3, Kind=App controller
2024/06/19 11:31:41 [INFO] Starting rbac.authorization.k8s.io/v1, Kind=ClusterRoleBinding controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=ProjectCatalog controller
2024/06/19 11:31:41 [INFO] Starting cluster.x-k8s.io/v1beta1, Kind=Machine controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=NodePool controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=AuthConfig controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=Project controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=RkeAddon controller
2024/06/19 11:31:41 [INFO] Starting management.cattle.io/v3, Kind=Catalog controller
2024/06/19 11:31:41 [INFO] Starting rke.cattle.io/v1, Kind=RKEControlPlane controller
I0619 11:31:41.714700      49 leaderelection.go:250] attempting to acquire leader lease kube-system/cattle-controllers...
2024/06/19 11:31:42 [INFO] Starting cluster agent for local [owner=true]
2024/06/19 11:31:42 [INFO] Starting /v1, Kind=ResourceQuota controller
2024/06/19 11:31:42 [INFO] Starting /v1, Kind=Node controller
2024/06/19 11:31:42 [INFO] Starting /v1, Kind=ServiceAccount controller
2024/06/19 11:31:42 [INFO] Starting apiregistration.k8s.io/v1, Kind=APIService controller
2024/06/19 11:31:42 [INFO] Starting /v1, Kind=Secret controller
2024/06/19 11:31:42 [INFO] Starting /v1, Kind=Namespace controller
2024/06/19 11:31:42 [INFO] Starting rbac.authorization.k8s.io/v1, Kind=ClusterRoleBinding controller
2024/06/19 11:31:42 [INFO] Starting rbac.authorization.k8s.io/v1, Kind=RoleBinding controller
2024/06/19 11:31:42 [INFO] Starting /v1, Kind=LimitRange controller
2024/06/19 11:31:42 [INFO] Starting rbac.authorization.k8s.io/v1, Kind=Role controller
2024/06/19 11:31:42 [INFO] Starting rbac.authorization.k8s.io/v1, Kind=ClusterRole controller
2024/06/19 11:31:42 [INFO] Starting management.cattle.io/v3, Kind=UserAttribute controller
2024/06/19 11:31:42 [INFO] Starting /v1, Kind=Secret controller
2024/06/19 11:31:42 [INFO] Starting management.cattle.io/v3, Kind=GroupMember controller
2024/06/19 11:31:42 [INFO] Starting management.cattle.io/v3, Kind=Group controller
2024/06/19 11:31:42 [INFO] Starting /v1, Kind=ConfigMap controller
2024/06/19 11:31:42 [INFO] Starting management.cattle.io/v3, Kind=Cluster controller
2024/06/19 11:31:42 [INFO] Starting management.cattle.io/v3, Kind=User controller
2024/06/19 11:31:42 [INFO] Starting management.cattle.io/v3, Kind=Token controller
2024/06/19 11:31:42 [ERROR] error syncing 'local/p-4thss': handler project-namespace-auth: Internal error occurred: failed calling webhook "rancher.cattle.io.projects.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/projects.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook", requeuing
2024/06/19 11:31:42 [ERROR] error syncing 'local/p-428np': handler project-namespace-auth: Internal error occurred: failed calling webhook "rancher.cattle.io.projects.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/projects.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook", requeuing
2024/06/19 11:31:42 [INFO] Listening on :443
2024/06/19 11:31:42 [INFO] Listening on :80
2024/06/19 11:31:42 [INFO] Listening on :444
2024/06/19 11:31:42 [INFO] Active TLS secret cattle-system/tls-rancher-internal (ver=381065747) (count 2): map[listener.cattle.io/cn-10.43.160.117:10.43.160.117 listener.cattle.io/cn-172.18.0.2:172.18.0.2 listener.cattle.io/fingerprint:SHA1=EC553B8E4E6839ADDE5E0E9699DE44D759C59078]
2024/06/19 11:31:42 [INFO] certificate CN=dynamic,O=dynamic signed by CN=dynamiclistener-ca,O=dynamiclistener-org: notBefore=2022-05-09 14:27:58 +0000 UTC notAfter=2025-06-19 11:31:42 +0000 UTC
2024/06/19 11:31:42 [ERROR] error syncing 'local/p-428np': handler project-namespace-auth: Internal error occurred: failed calling webhook "rancher.cattle.io.projects.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/projects.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook", requeuing
2024/06/19 11:31:42 [ERROR] error syncing 'local/p-4thss': handler project-namespace-auth: Internal error occurred: failed calling webhook "rancher.cattle.io.projects.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/projects.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook", requeuing
2024/06/19 11:31:42 [ERROR] error syncing 'local/p-428np': handler project-namespace-auth: Internal error occurred: failed calling webhook "rancher.cattle.io.projects.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/projects.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook", requeuing
2024/06/19 11:31:42 [ERROR] error syncing 'local/p-4thss': handler project-namespace-auth: Internal error occurred: failed calling webhook "rancher.cattle.io.projects.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/projects.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook", requeuing
2024/06/19 11:31:42 [ERROR] error syncing 'local/p-428np': handler project-namespace-auth: Internal error occurred: failed calling webhook "rancher.cattle.io.projects.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/projects.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook", requeuing
2024/06/19 11:31:42 [ERROR] error syncing 'local/p-4thss': handler project-namespace-auth: Internal error occurred: failed calling webhook "rancher.cattle.io.projects.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/projects.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook", requeuing
2024/06/19 11:31:42 [ERROR] error syncing 'local/p-428np': handler project-namespace-auth: Internal error occurred: failed calling webhook "rancher.cattle.io.projects.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/projects.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook", requeuing
2024/06/19 11:31:42 [ERROR] error syncing 'local/p-4thss': handler project-namespace-auth: Internal error occurred: failed calling webhook "rancher.cattle.io.projects.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/projects.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook", requeuing
2024/06/19 11:31:42 [INFO] Starting /v1, Kind=Secret controller
...

Aaaaand in my case as well. Trying to upgrade 2.8.5 --> 2.9.0, standalone, dockerized app fails the same way as mentioned above

Update to 2.9.0 also not as good.

2024/08/01 10:28:37 [FATAL] Internal error occurred: failed calling webhook "rancher.cattle.io.namespaces.create-non-kubesystem": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/namespaces?timeout=10s": proxy error from 127.0.0.1:6443 while dialing 10.42.0.46:9443, code 502: 502 Bad Gateway

No luck yet

same here, trying to update docker install from 2.8.3 to 2.9.0

Same issue upgrading from 2.8.3 -> 2.8.5. Upgrade process stuck in endless loop. @daleckystepan suggestion worked for me. I do agree with the sentiment that rancher upgrades are a permanent source of stress. It’s the sole reason I have not introduced rancher at work. When asking around, my experiences are not unique, and some of my friends/colleagues even simply stopped using rancher alltogether solely for their permanently broken upgrades.

Finally got it, guys

In case you are already down, ssh to your Rancher node

docker exec -t rancher bash -c "while true; do kubectl delete validatingwebhookconfigurations rancher.cattle.io; \
  kubectl patch settings.management.cattle.io fleet-version -p '{\"value\":\"103.1.5+up0.9.5\"}' --type=merge; \
  kubectl patch settings.management.cattle.io rancher-webhook-version -p '{\"value\":\"103.0.6+up0.4.7\"}' --type=merge; done"

and then renistall rancher-webhook from Apps menu to have validating webhook again properly setup.

Edit: This doesn’t work for me:

docker exec -t rancher${new_rancher} bash -c "while true; do kubectl delete validatingwebhookconfigurations rancher.cattle.io; \

kubectl patch settings.management.cattle.io fleet-version -p ‘{"value":"103.1.5+up0.9.5"}’ --type=merge;
kubectl patch settings.management.cattle.io rancher-webhook-version -p ‘{"value":"103.0.6+up0.4.7"}’ --type=merge; done" validatingwebhookconfiguration.admissionregistration.k8s.io “rancher.cattle.io” deleted setting.management.cattle.io/fleet-version patched setting.management.cattle.io/rancher-webhook-version patched Error from server (NotFound): validatingwebhookconfigurations.admissionregistration.k8s.io “rancher.cattle.io” not found setting.management.cattle.io/fleet-version patched (no change) setting.management.cattle.io/rancher-webhook-version patched (no change) Error from server (NotFound): validatingwebhookconfigurations.admissionregistration.k8s.io “rancher.cattle.io” not found setting.management.cattle.io/fleet-version patched (no change) setting.management.cattle.io/rancher-webhook-version patched (no change) Error from server (NotFound): validatingwebhookconfigurations.admissionregistration.k8s.io “rancher.cattle.io” not found setting.management.cattle.io/fleet-version patched (no change) setting.management.cattle.io/rancher-webhook-version patched (no change) Error from server (NotFound): validatingwebhookconfigurations.admissionregistration.k8s.io “rancher.cattle.io” not found setting.management.cattle.io/fleet-version patched (no change) setting.management.cattle.io/rancher-webhook-version patched (no change) Error from server (NotFound): validatingwebhookconfigurations.admissionregistration.k8s.io “rancher.cattle.io” not found setting.management.cattle.io/fleet-version patched (no change) …

Man, each rancher update is really a pain in the ass.

Edit2: Ok it seems that the upgrade continued and the GUI is available again. But yeah, really, every update is a pain and nothing works out of the box. I always have to patch something, restart something, clean something.

I was able to reproduce this issue using the provided steps, though without the acme-specific bits. Starting with a fresh v2.8.3 Rancher install, these commands reliably crash the webhook after the 2.8.5 upgrade:

sudo docker run -d --restart=unless-stopped -v /opt/rancher:/var/lib/rancher -p 80:80 -p 443:443 --privileged rancher/rancher:v2.8.3

docker stop <container id>
sudo docker run -d --restart=unless-stopped -v /opt/rancher:/var/lib/rancher -p 80:80 -p 443:443 --privileged rancher/rancher:v2.8.4

docker stop <container id>
sudo docker run -d --restart=unless-stopped -v /opt/rancher:/var/lib/rancher -p 80:80 -p 443:443 --privileged rancher/rancher:v2.8.5

Note that our documented upgrade procedure handles data persistence differently, but I was still able to reproduce the issue using both methods.

2024/06/21 16:31:45 [INFO] Applying CRD clusters.cluster.x-k8s.io
2024/06/21 16:31:45 [INFO] Applying CRD machinedeployments.cluster.x-k8s.io
2024/06/21 16:31:45 [INFO] Applying CRD machinehealthchecks.cluster.x-k8s.io
2024/06/21 16:31:45 [INFO] Applying CRD machines.cluster.x-k8s.io
2024/06/21 16:31:45 [INFO] Applying CRD machinesets.cluster.x-k8s.io
2024/06/21 16:31:45 [FATAL] Internal error occurred: failed calling webhook "rancher.cattle.io.settings.management.cattle.io": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/settings.management.cattle.io?timeout=10s": no endpoints available for service "rancher-webhook"

Verified on v2.9-head ID: db67b4e ✅

Fresh Install ✅ Docker upgrade from v2.9.0 -> v2.9-head ✅ Docker upgrade from v2.8.6 -> v2.9-head ✅ Docker upgrade from v2.8.5 -> v2.9-head ✅ Docker upgrade from v2.8.4 -> v2.8.5 -> v2.9-head ✅

HA upgrade from v2.9.0 -> v2.9-head ✅ HA upgrade from v2.8.6 -> v2.9-head ✅ HA upgrade from v2.8.5 -> v2.9-head ✅ HA upgrade from v2.8.4 -> v2.8.5 -> v2.9-head ✅

2.8 Backport Tracking: https://github.com/rancher/rancher/issues/46541

Update to 2.9.0 also not as good.

2024/08/01 10:28:37 [FATAL] Internal error occurred: failed calling webhook "rancher.cattle.io.namespaces.create-non-kubesystem": failed to call webhook: Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/namespaces?timeout=10s": proxy error from 127.0.0.1:6443 while dialing 10.42.0.46:9443, code 502: 502 Bad Gateway

No luck yet

Hey folks 👋 — just a heads up for anyone stuck upgrading Rancher (e.g., from v2.8.3 to 2.11.0) because of rancher-webhook issues: I got around it by spinning up the older Rancher version, uninstalling the webhook from cluster local (k3s) helm uninstall rancher-webhook -n cattle-system stopping the container, updating to the new version in Docker Compose, and then manually reinstalling the webhook with: helm repo add rancher-charts https://charts.rancher.io helm repo update helm install rancher-webhook rancher-charts/rancher-webhook -n cattle-system --create-namespace This got everything working smoothly again on the upgrade. 🙌

Heya, this issue scared the s@#! outta me. Reverting the persistent containers storage and going back to 2.8.4 is good, but yeah, moving from a minor version to another minor version shouldnt be breaking…

Finally got it, guys

In case you are already down, ssh to your Rancher node

docker exec -t rancher bash -c “while true; do kubectl delete validatingwebhookconfigurations rancher.cattle.io;
kubectl patch settings.management.cattle.io fleet-version -p ‘{"value":"103.1.5+up0.9.5"}’ --type=merge;
kubectl patch settings.management.cattle.io rancher-webhook-version -p ‘{"value":"103.0.6+up0.4.7"}’ --type=merge; done” and then renistall rancher-webhook from Apps menu to have validating webhook again properly setup.

After doing this, I was able to access Rancher from the browser. However, there was an error with the RKE2 cluster downstream, while another cluster downstream on RKE1 was not affected.
Has anyone successfully reinstalled/upgraded the rancher-webhook after running the above docker exec command?

2.9.0 and 2.9.1 both start after deleting validatingwebhookconfigurations as suggested by @daleckystepan, but could not find such an App to restore deleted object on any of these versions. My attempts to update repos failed with errors like “could not connect”.

but 2.9-head works for me, did not have to delete validatingwebhookconfigurations

I still am unable to proceed with following…: Docker upgrade from v2.8.5 -> v2.9-head ✅ Same proxy error from 127.0.0.1:6443 while dialing 10.42.0.46:9443, code 502: 502 Bad Gateway as before

Hello here, I had some success through an entrypoint modification of the container (docker inspect, engine stop, etc … ) In short rancher launches k3s but exits pretty quickly if rancher-webhook is not quickly ready. Manually launching k3s server and troubleshooting rancher-webhook was the key part.

I am sorry about the pretty low level of information but some other colleague was working on it at the same time so I do not have a reproductible documentation.

It works on newly created clusters without this issues unfortunately it does not work on old clusters that were already updated multiple times.