etcdmain:无法访问数据目录:mkdir管理状态:文件存在

时间:2020-03-10 19:13:41

标签: rancher

我正在尝试在Windows笔记本电脑上执行此命令

docker run -d -p 80:80 -p 443:443 -v "C:\ranchervolume":/var/lib/rancher --restart=unless-stopped rancher/rancher:latest

但是看到此错误:

[20835918.CROC1LWPF1S99JJ] ➤ docker logs mystifying_perlman
2020/03/09 19:22:00 [INFO] Listening on /tmp/log.sock
2020/03/09 19:22:00 [INFO] Rancher version v2.3.5 is starting
2020/03/09 19:22:00 [INFO] Rancher arguments {ACMEDomains:[] AddLocal:auto Embedded:false KubeConfig: HTTPListenPort:80 HTTPSListenPort:443 K8sMode:auto Debug:false NoCACerts:false ListenConfig:<nil> AuditLogPath:/var/log/auditlog/rancher-api-audit.log AuditLogMaxage:10 AuditLogMaxsize:100 AuditLogMaxbackup:10 AuditLevel:0 Features:}
2020/03/09 19:22:00 [INFO] Running etcd --data-dir=management-state/etcd
2020-03-09 19:22:01.076094 W | pkg/flags: unrecognized environment variable ETCD_URL_arm64=https://github.com/etcd-io/etcd/releases/download/v3.3.14/etcd-v3.3.14-linux-arm64.tar.gz
2020-03-09 19:22:01.083483 W | pkg/flags: unrecognized environment variable ETCD_URL_amd64=https://github.com/etcd-io/etcd/releases/download/v3.3.14/etcd-v3.3.14-linux-amd64.tar.gz
2020-03-09 19:22:01.083505 W | pkg/flags: unrecognized environment variable ETCD_UNSUPPORTED_ARCH=amd64
2020-03-09 19:22:01.083514 W | pkg/flags: unrecognized environment variable ETCD_URL=ETCD_URL_amd64
2020-03-09 19:22:01.085812 I | etcdmain: etcd Version: 3.3.14
2020-03-09 19:22:01.085840 I | etcdmain: Git SHA: 5cf5d88a1
2020-03-09 19:22:01.085848 I | etcdmain: Go Version: go1.12.9
2020-03-09 19:22:01.085855 I | etcdmain: Go OS/Arch: linux/amd64
2020-03-09 19:22:01.085931 I | etcdmain: setting maximum number of CPUs to 2, total number of available CPUs is 2
2020-03-09 19:22:01.279050 I | embed: listening for peers on http://localhost:2380
2020-03-09 19:22:01.292159 I | embed: listening for client requests on localhost:2379
2020-03-09 19:22:01.373739 C | etcdmain: cannot access data directory: mkdir management-state: file exists
2020/03/09 19:22:01 [FATAL] etcd exited

,容器重新启动,我无法进入UI。但是如果我没有音量就可以正常运行 任何想法都非常感谢

编辑: 试图给出一个不同的卷名,像这样,但是那个给了我另一个错误。

docker run -d -p 80:80 -p 443:443 -v "C:\ranchervol":/var/lib/rancher --restart=unless-stopped rancher/rancher:latest

2020-03-09 20:17:53.490417 N | etcdmain: the server is already initialized as member before, starting as etcd member...
2020-03-09 20:17:53.503647 I | embed: listening for peers on http://localhost:2380
2020-03-09 20:17:53.505499 I | embed: listening for client requests on localhost:2379
2020-03-09 20:17:53.656685 I | etcdserver: name = default
2020-03-09 20:17:53.658261 I | etcdserver: data dir = management-state/etcd
2020-03-09 20:17:53.658282 I | etcdserver: member dir = management-state/etcd/member
2020-03-09 20:17:53.658446 I | etcdserver: heartbeat = 100ms
2020-03-09 20:17:53.658456 I | etcdserver: election = 1000ms
2020-03-09 20:17:53.658555 I | etcdserver: snapshot count = 100000
2020-03-09 20:17:53.659896 I | etcdserver: advertise client URLs = http://localhost:2379
2020-03-09 20:17:53.716774 I | etcdserver: restarting member 8e9e05c52164694d in cluster cdf818194e3a8c32 at commit index 8
2020-03-09 20:17:53.731950 I | raft: 8e9e05c52164694d became follower at term 3
2020-03-09 20:17:53.734578 I | raft: newRaft 8e9e05c52164694d [peers: [], term: 3, commit: 8, applied: 0, lastindex: 8, lastterm: 3]
2020-03-09 20:17:53.803006 W | auth: simple token is not cryptographically signed
2020-03-09 20:17:53.831166 I | etcdserver: starting server... [version: 3.3.14, cluster version: to_be_decided]
2020-03-09 20:17:54.005795 I | etcdserver/membership: added member 8e9e05c52164694d [http://localhost:2380] to cluster cdf818194e3a8c32
2020-03-09 20:17:54.013487 N | etcdserver/membership: set the initial cluster version to 3.3
2020-03-09 20:17:54.013564 I | etcdserver/api: enabled capabilities for version 3.3
2020-03-09 20:17:55.534240 I | raft: 8e9e05c52164694d is starting a new election at term 3
2020-03-09 20:17:55.545230 I | raft: 8e9e05c52164694d became candidate at term 4
2020-03-09 20:17:55.565580 I | raft: 8e9e05c52164694d received MsgVoteResp from 8e9e05c52164694d at term 4
2020-03-09 20:17:55.567904 I | raft: 8e9e05c52164694d became leader at term 4
2020-03-09 20:17:55.573112 I | raft: raft.node: 8e9e05c52164694d elected leader 8e9e05c52164694d at term 4
2020-03-09 20:17:55.755830 W | etcdserver: request "ID:7587844921191328514 Method:\"PUT\" Path:\"/0/members/8e9e05c52164694d/attributes\" Val:\"{\\\"name\\\                               ":\\\"default\\\",\\\"clientURLs\\\":[\\\"http://localhost:2379\\\"]}\" " with result "" took too long (134.888324ms) to execute
2020-03-09 20:17:55.778077 I | etcdserver: published {Name:default ClientURLs:[http://localhost:2379]} to cluster cdf818194e3a8c32
2020-03-09 20:17:55.789056 I | embed: ready to serve client requests
2020-03-09 20:17:56.243053 N | embed: serving insecure client requests on 127.0.0.1:2379, this is strongly discouraged!
2020/03/09 20:17:56 [INFO] Waiting for k3s to start
time="2020-03-09T20:17:56Z" level=info msg="Preparing data dir /var/lib/rancher/k3s/data/de37a675b342fcd56e57fd5707882786b0e0c840862d6ddc1e8f5c391fb424c9"
2020/03/09 20:17:57 [INFO] Waiting for k3s to start
2020/03/09 20:17:59 [INFO] Waiting for k3s to start
2020/03/09 20:18:00 [INFO] Waiting for k3s to start
2020/03/09 20:18:01 [INFO] Waiting for k3s to start
2020/03/09 20:18:02 [INFO] Waiting for k3s to start
2020/03/09 20:18:03 [INFO] Waiting for k3s to start
2020/03/09 20:18:04 [INFO] Waiting for k3s to start
2020/03/09 20:18:05 [INFO] Waiting for k3s to start
time="2020-03-09T20:18:06Z" level=info msg="error extracting tarball into /var/lib/rancher/k3s/data/de37a675b342fcd56e57fd5707882786b0e0c840862d6ddc1e8f5c39                               1fb424c9-tmp after 10 files, 1 dirs, 9.194373164s: mkdir /var/lib/rancher/k3s/data/de37a675b342fcd56e57fd5707882786b0e0c840862d6ddc1e8f5c391fb424c9-tmp/bin/                               aux: input/output error"
2020/03/09 20:18:06 [INFO] Waiting for k3s to start
2020/03/09 20:18:07 [INFO] Waiting for k3s to start
time="2020-03-09T20:18:08Z" level=fatal msg="extracting data: mkdir /var/lib/rancher/k3s/data/de37a675b342fcd56e57fd5707882786b0e0c840862d6ddc1e8f5c391fb424                               c9-tmp/bin/aux: input/output error"
2020/03/09 20:18:08 [INFO] Waiting for k3s to start
2020/03/09 20:18:08 [FATAL] k3s exited with: exit status 1

0 个答案:

没有答案