Skip to content

Rancher single node wont start on m1 mac with latest docker desktop #35930

@presidenten

Description

@presidenten

Rancher Server Setup

  • Rancher version: 2.6.2
  • Installation option (Docker install):
    • Docker single node install
  • Proxy/Cert Details: none

Environment

  • Mac M1 on macOS 12.0.1
  • Docker desktop for mac 4.3.1, docker engine 20.10.11

Describe the bug
Rancher crashes periodically, usually after 10-15s, and thus never starts.

Getting lots of [FATAL] k3s exited with: exit status 1 and Unexpected watch close - watch lasted less than a second and no items received. The error depends on how many times it has restarted. Sometimes it installs crds and such before crashing.

To Reproduce

  • Start rancher on m1 mac with latest docker desktop version
docker run -d --privileged --restart=unless-stopped --name rancher -p 4080:80 -p 4443:443 rancher/rancher:v2.6.2

Result

                                                                           ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
CONTAINER ID   IMAGE                    COMMAND           CREATED          STATUS                  PORTS                                         NAMES
c6b9cc8302f5   rancher/rancher:v2.6.2   "entrypoint.sh"   30 minutes ago   Up Less than a second   0.0.0.0:4080->80/tcp, 0.0.0.0:4443->443/tcp   rancher
                                                                           ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

And

2021/12/20 08:31:38 [INFO] Waiting for k3s to start
time="2021-12-20T08:31:38Z" level=info msg="Acquiring lock file /var/lib/rancher/k3s/data/.lock"
time="2021-12-20T08:31:38Z" level=info msg="Preparing data dir /var/lib/rancher/k3s/data/d57e75cb49c3cfd88307a8669e8adcf6b7740b66d6125a45c00aaa54301a5746"
2021/12/20 08:31:39 [INFO] Waiting for k3s to start
exit status 1
2021/12/20 08:31:46 [FATAL] k3s exited with: exit status 1

Edit:
I have now verified that rancher 2.6.2 works on Docker desktop for mac 4.2.0, but if I update to 4.3.1, it stops working.
Moving back to 4.2.0, makes it work again.


Expected Result
I expect rancher single node to not crash before starting

I have tried to prune containers, prune volumes, and even factory reset docker desktop.

Full logs until first crash

2021/12/20 08:31:37 [INFO] Rancher version v2.6.2 (64c748d16) is starting
2021/12/20 08:31:37 [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:}
2021/12/20 08:31:37 [INFO] Listening on /tmp/log.sock
2021/12/20 08:31:37 [INFO] Running etcd --data-dir=management-state/etcd --heartbeat-interval=500 --election-timeout=5000
running etcd on unsupported architecture "arm64" since ETCD_UNSUPPORTED_ARCH is set
2021-12-20 08:31:37.558753 W | pkg/flags: unrecognized environment variable ETCD_URL=https://github.com/etcd-io/etcd/releases/download/v3.4.15/etcd-v3.4.15-linux-arm64.tar.gz
[WARNING] Deprecated '--logger=capnslog' flag is set; use '--logger=zap' flag instead
2021-12-20 08:31:37.558790 I | etcdmain: etcd Version: 3.4.15
2021-12-20 08:31:37.558792 I | etcdmain: Git SHA: aa7126864
2021-12-20 08:31:37.558810 I | etcdmain: Go Version: go1.12.17
2021-12-20 08:31:37.558816 I | etcdmain: Go OS/Arch: linux/arm64
2021-12-20 08:31:37.558820 I | etcdmain: setting maximum number of CPUs to 5, total number of available CPUs is 5
[WARNING] Deprecated '--logger=capnslog' flag is set; use '--logger=zap' flag instead
2021-12-20 08:31:37.559130 I | embed: name = default
2021-12-20 08:31:37.559140 I | embed: data dir = management-state/etcd
2021-12-20 08:31:37.559142 I | embed: member dir = management-state/etcd/member
2021-12-20 08:31:37.559143 I | embed: heartbeat = 500ms
2021-12-20 08:31:37.559144 I | embed: election = 5000ms
2021-12-20 08:31:37.559146 I | embed: snapshot count = 100000
2021-12-20 08:31:37.559151 I | embed: advertise client URLs = http://localhost:2379
2021-12-20 08:31:37.559208 W | pkg/fileutil: check file permission: directory "management-state/etcd" exist, but the permission is "drwxr-xr-x". The recommended permission is "-rwx------" to prevent possible unprivileged access to the data.
2021-12-20 08:31:37.564482 I | etcdserver: starting member 8e9e05c52164694d in cluster cdf818194e3a8c32
raft2021/12/20 08:31:37 INFO: 8e9e05c52164694d switched to configuration voters=()
raft2021/12/20 08:31:37 INFO: 8e9e05c52164694d became follower at term 0
raft2021/12/20 08:31:37 INFO: newRaft 8e9e05c52164694d [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
raft2021/12/20 08:31:37 INFO: 8e9e05c52164694d became follower at term 1
raft2021/12/20 08:31:37 INFO: 8e9e05c52164694d switched to configuration voters=(10276657743932975437)
2021-12-20 08:31:37.565972 W | auth: simple token is not cryptographically signed
2021-12-20 08:31:37.567814 I | etcdserver: starting server... [version: 3.4.15, cluster version: to_be_decided]
2021-12-20 08:31:37.568141 I | etcdserver: 8e9e05c52164694d as single-node; fast-forwarding 9 ticks (election ticks 10)
raft2021/12/20 08:31:37 INFO: 8e9e05c52164694d switched to configuration voters=(10276657743932975437)
2021-12-20 08:31:37.568395 I | etcdserver/membership: added member 8e9e05c52164694d [http://localhost:2380] to cluster cdf818194e3a8c32
2021-12-20 08:31:37.568794 I | embed: listening for peers on 127.0.0.1:2380
raft2021/12/20 08:31:38 INFO: 8e9e05c52164694d is starting a new election at term 1
raft2021/12/20 08:31:38 INFO: 8e9e05c52164694d became candidate at term 2
raft2021/12/20 08:31:38 INFO: 8e9e05c52164694d received MsgVoteResp from 8e9e05c52164694d at term 2
raft2021/12/20 08:31:38 INFO: 8e9e05c52164694d became leader at term 2
raft2021/12/20 08:31:38 INFO: raft.node: 8e9e05c52164694d elected leader 8e9e05c52164694d at term 2
2021-12-20 08:31:38.067422 I | etcdserver: setting up the initial cluster version to 3.4
2021-12-20 08:31:38.070460 N | etcdserver/membership: set the initial cluster version to 3.4
2021-12-20 08:31:38.070547 I | etcdserver/api: enabled capabilities for version 3.4
2021-12-20 08:31:38.070585 I | etcdserver: published {Name:default ClientURLs:[http://localhost:2379]} to cluster cdf818194e3a8c32
2021-12-20 08:31:38.071103 I | embed: ready to serve client requests
2021-12-20 08:31:38.074404 N | embed: serving insecure client requests on 127.0.0.1:2379, this is strongly discouraged!
2021/12/20 08:31:38 [INFO] Waiting for k3s to start
time="2021-12-20T08:31:38Z" level=info msg="Acquiring lock file /var/lib/rancher/k3s/data/.lock"
time="2021-12-20T08:31:38Z" level=info msg="Preparing data dir /var/lib/rancher/k3s/data/d57e75cb49c3cfd88307a8669e8adcf6b7740b66d6125a45c00aaa54301a5746"
2021/12/20 08:31:39 [INFO] Waiting for k3s to start
exit status 1
2021/12/20 08:31:46 [FATAL] k3s exited with: exit status 1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions