docker部署rancher2.5.13,容器D状态(卡住)

  • Rancher 版本:2.5.13
  • docker单节点离线部署
    问题描述:
    容器已经正常运行3年,最近rancher容器异常卡死,日志显示etcd超时,搜索说磁盘性能问题,因为之前运行一直正常,想问下是否还有别的原因可能导致这个问题,有何解决办法
    容器日志:
    {“log”:“2026-03-19 19:12:21.812902 W | etcdserver: read-only range request "key:\"/registry/configmaps/fleet-system/fleet-controller-lock\" " with result "error:context canceled" took too long (4.328764095s) to execute\n”,“stream”:“stderr”,“time”:“2026-03-19T19:12:21.813207094Z”}
    {“log”:“WARNING: 2026/03/19 19:12:21 grpc: Server.processUnaryRPC failed to write status: connection error: desc = "transport is closing"\n”,“stream”:“stderr”,“time”:“2026-03-19T19:12:21.813210521Z”}
    {“log”:“2026-03-19 19:12:21.812926 W | etcdserver: read-only range request "key:\"/registry/rancher.cattle.io/roletemplates/\" range_end:\"/registry/rancher.cattle.io/roletemplates0\" count_only:true " with result "error:context canceled" took too long (2.189632776s) to execute\n”,“stream”:“stderr”,“time”:“2026-03-19T19:12:21.813213725Z”}
    {“log”:“WARNING: 2026/03/19 19:12:21 grpc: Server.processUnaryRPC failed to write status: connection error: desc = "transport is closing"\n”,“stream”:“stderr”,“time”:“2026-03-19T19:12:21.813217395Z”}
    {“log”:“2026-03-19 19:12:21.812944 W | etcdserver: read-only range request "key:\"/registry/management.cattle.io/monitormetrics/\" range_end:\"/registry/management.cattle.io/monitormetrics0\" count_only:true " with result "error:context canceled" took too long (8.176820835s) to execute\n”,“stream”:“stderr”,“time”:“2026-03-19T19:12:21.813220731Z”}
    {“log”:“WARNING: 2026/03/19 19:12:21 grpc: Server.processUnaryRPC failed to write status: connection error: desc = "transport is closing"\n”,“stream”:“stderr”,“time”:“2026-03-19T19:12:21.813224497Z”}
    {“log”:“2026-03-19 19:12:21.812975 W | etcdserver: read-only range request "key:\"/registry/clusterrolebindings/\" range_end:\"/registry/clusterrolebindings0\" count_only:true " with result "error:context canceled" took too long (5.137280487s) to execute\n”,“stream”:“stderr”,“time”:“2026-03-19T19:12:21.813239249Z”}
    {“log”:“WARNING: 2026/03/19 19:12:21 grpc: Server.processUnaryRPC failed to write status: connection error: desc = "transport is closing"\n”,“stream”:“stderr”,“time”:“2026-03-19T19:12:21.813243501Z”}
    {“log”:“2026-03-19 19:12:21.812989 W | etcdserver: read-only range request "key:\"/registry/fleet.cattle.io/imagescans/\" range_end:\"/registry/fleet.cattle.io/imagescans0\" count_only:true " with result "error:context canceled" took too long (2.424048s) to execute\n”,“stream”:“stderr”,“time”:“2026-03-19T19:12:21.81324671Z”}
    {“log”:“WARNING: 2026/03/19 19:12:21 grpc: Server.processUnaryRPC failed to write status: connection error: desc = "transport is closing"\n”,“stream”:“stderr”,“time”:“2026-03-19T19:12:21.813250394Z”}
    {“log”:“2026-03-19 19:12:21.813009 W | etcdserver: read-only range request "key:\"/registry/jobs/\" range_end:\"/registry/jobs0\" limit:500 " with result "error:context canceled" took too long (6.78200799s) to execute\n”,“stream”:“stderr”,“time”:“2026-03-19T19:12:21.813253758Z”}
    {“log”:“WARNING: 2026/03/19 19:12:21 grpc: Server.processUnaryRPC failed to write status: connection error: desc = "transport is closing"\n”,“stream”:“stderr”,“time”:“2026-03-19T19:12:21.813257712Z”}
    {“log”:“2026/03/19 19:12:21 [FATAL] k3s exited with: exit status 255\n”,“stream”:“stdout”,“time”:“2026-03-19T19:12:21.817568017Z”}
    {“log”:“2026/03/19 19:12:21 httputil: ReverseProxy read error during body copy: unexpected EOF\n”,“stream”:“stderr”,“time”:“2026-03-19T19:12:21.817597686Z”}
    k3s日志:
    net.(*TCPListener).accept(0xc00013c3a0, 0x10, 0x10, 0x203008)
    /usr/local/go/src/net/tcpsock_posix.go:139 +0x32
    net.(*TCPListener).Accept(0xc00013c3a0, 0x29e8d60800, 0x0, 0xc00c988d70, 0x40f2b0)
    /usr/local/go/src/net/tcpsock.go:261 +0x65
    github.com/rancher/k3s/vendor/k8s.io/apiserver/pkg/server.tcpKeepAliveListener.Accept(0x4dcff20, 0xc00013c3a0, 0x0, 0xc00c988d48, 0x46f87b, 0x9b84a04abefed)
    /go/src/github.com/rancher/k3s/vendor/k8s.io/apiserver/pkg/server/secure_serving.go:261 +0x35
    crypto/tls.(*listener).Accept(0xc00c03e260, 0xc00c988dc0, 0x18, 0xc00cce3800, 0x8de94c)
    /usr/local/go/src/crypto/tls/tls.go:67 +0x37
    net/http.(*Server).Serve(0xc006febb20, 0x4dad9e0, 0xc00c03e260, 0x0, 0x0)
    /usr/local/go/src/net/http/server.go:2937 +0x266
    github.com/rancher/k3s/vendor/k8s.io/apiserver/pkg/server.RunServer.func2(0x4dcff20, 0xc00013c3a0, 0xc006febb20, 0xc00f235c20)
    /go/src/github.com/rancher/k3s/vendor/k8s.io/apiserver/pkg/server/secure_serving.go:236 +0xe9
    created by github.com/rancher/k3s/vendor/k8s.io/apiserver/pkg/server.RunServer
    /go/src/github.com/rancher/k3s/vendor/k8s.io/apiserver/pkg/server/secure_serving.go:227 +0xc8

goroutine 2834 [chan receive, 4 minutes]:
github.com/rancher/k3s/vendor/k8s.io/apiserver/pkg/server.preparedGenericAPIServer.NonBlockingRun.func1(0xc00f235b00, 0xc00f235c20, 0xc00f618780, 0xc006549680, 0xc00f235bc0)
/go/src/github.com/rancher/k3s/vendor/k8s.io/apiserver/pkg/server/genericapiserver.go:396 +0x38
created by github.com/rancher/k3s/vendor/k8s.io/apiserver/pkg/server.preparedGenericAPIServer.NonBlockingRun
/go/src/github.com/rancher/k3s/vendor/k8s.io/apiserver/pkg/server/genericapiserver.go:395 +0xf7

goroutine 5184 [chan receive, 4 minutes]:
github.com/rancher/k3s/vendor/k8s.io/client-go/tools/cache.(*sharedProcessor).run(0xc0101ac930, 0xc0155d1140)
/go/src/github.com/rancher/k3s/vendor/k8s.io/client-go/tools/cache/shared_informer.go:628 +0x53
github.com/rancher/k3s/vendor/k8s.io/apimachinery/pkg/util/wait.(*Group).StartWithChannel.func1()
/go/src/github.com/rancher/k3s/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:56 +0x2e
github.com/rancher/k3s/vendor/k8s.io/apimachinery/pkg/util/wait.(*Group).Start.func1(0xc011c8b3d0, 0xc00c8d0340)
/go/src/github.com/rancher/k3s/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:73 +0x51
created by github.com/rancher/k3s/vendor/k8s.io/apimachinery/pkg/util/wait.(*Group).Start
/go/src/github.com/rancher/k3s/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:71 +0x65

goroutine 3789 [sync.Cond.Wait, 4 minutes]:
runtime.goparkunlock(…)
/usr/local/go/src/runtime/proc.go:312
sync.runtime_notifyListWait(0xc001f01f10, 0xc267304800000002)
/usr/lI0319 19:12:21.315156 44 trace.go:205] Trace[1112153919]: “Get” url:/apis/coordination.k8s.io/v1/namespaces/kube-system/leases/kube-scheduler,user-agent:k3s/v1.19.13+k3s1 (linux/amd64) kubernetes/99eadcc/leader-election,client:127.0.0.1 (19-Mar-2026 19:12:13.556) (total time: 7758ms):
Trace[1112153919]: [7.758629537s] [7.758629537s] END