Docker image for aarch64 (arm) architecture won't run

97 views
Skip to first unread message

Stephen Nesbitt

unread,
Jun 24, 2020, 10:02:43 PM6/24/20
to Consul
All:

Tried to create a Consul 1.8 docker container on an arm64 (aarch64) machine (raspberry pi 4) today without success as follows: docker run --rm consul:1.8
All attempts lead to a single error message "==> operation not permitted"

Creating a container using 1.7 (docker run --rm consul:1.7) works as expected.

Underlying system is ubuntu 20.04.
Docker version 19.03.8, build afacb8b7f0

-steve

Alvin Huang

unread,
Jun 24, 2020, 10:35:54 PM6/24/20
to consu...@googlegroups.com
Hi Steve,

If I am understanding correctly, these are images you are building (presumably copying the binary from releases.hashicorp.com into the image) rather than downloading the 1.8 ARM container we provider here: https://hub.docker.com/layers/consul/library/consul/1.8/images/sha256-266753598047a982f884fd16b0c7c4d293a35fda3e2542205a02ce89acf3c2c6?context=explore

If so, can you share the Dockerfile you are using? I suspect it might be the file permissions when copying the binary into the container that is causing the issue. 

On an EC2 a1.medium node (albeit slightly different OS/specs) I am not able to reproduce the issue with the docker container in dockerhub or running the binary:
```
[ec2-user@ip-172-31-45-234 temp]$ uname -m
aarch64
[ec2-user@ip-172-31-45-234 temp]$ docker version
Client:
 Version:           19.03.6-ce
 API version:       1.40
 Go version:        go1.13.4
 Git commit:        369ce74
 Built:             Fri May 29 04:01:30 2020
 OS/Arch:           linux/arm64
 Experimental:      false

Server:
 Engine:
  Version:          19.03.6-ce
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.4
  Git commit:       369ce74
  Built:            Fri May 29 04:02:02 2020
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.3.2
  GitCommit:        ff48f57fc83a8c44cf4ad5d672424a98ba37ded6
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
[ec2-user@ip-172-31-45-234 temp]$ docker run --rm consul:1.8
Unable to find image 'consul:1.8' locally
1.8: Pulling from library/consul
941f399634ec: Pull complete
8c62d7d2a7dc: Pull complete
6cc98caf0c68: Pull complete
78fca3e93a03: Pull complete
9ebcb4658c39: Pull complete
7d51dd1887d7: Pull complete
Digest: sha256:0e660ca8ae28d864e3eaaed0e273b2f8cd348af207e2b715237e869d7a8b5dcc
Status: Downloaded newer image for consul:1.8
==> Starting Consul agent...
           Version: 'v1.8.0'
           Node ID: 'b11e5c53-3829-cd99-412d-687a5989f5a6'
         Node name: '7ebdf6ce035b'
        Datacenter: 'dc1' (Segment: '<all>')
            Server: true (Bootstrap: false)
       Client Addr: [0.0.0.0] (HTTP: 8500, HTTPS: -1, gRPC: 8502, DNS: 8600)
      Cluster Addr: 127.0.0.1 (LAN: 8301, WAN: 8302)
           Encrypt: Gossip: false, TLS-Outgoing: false, TLS-Incoming: false, Auto-Encrypt-TLS: false
```
With the local 1.8 binary:
```
[ec2-user@ip-172-31-45-234 ~]$ unzip consul_1.8.0_linux_arm64.zip
Archive:  consul_1.8.0_linux_arm64.zip
  inflating: consul
[ec2-user@ip-172-31-45-234 ~]$ ls
consul  consul_1.8.0_linux_arm64.zip
[ec2-user@ip-172-31-45-234 ~]$ ./consul version
Consul v1.8.0
Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
[ec2-user@ip-172-31-45-234 ~]$ ./consul info
Error querying agent: Get "http://127.0.0.1:8500/v1/agent/self": dial tcp 127.0.0.1:8500: connect: connection refused
[ec2-user@ip-172-31-45-234 ~]$ ./consul version
Consul v1.8.0
Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
[ec2-user@ip-172-31-45-234 ~]$ ./consul agent -dev
==> Starting Consul agent...
           Version: 'v1.8.0'
           Node ID: '759b83fd-3c39-2846-b526-ac9187775f27'
         Node name: 'ip-172-31-45-234.ec2.internal'
        Datacenter: 'dc1' (Segment: '<all>')
            Server: true (Bootstrap: false)
       Client Addr: [127.0.0.1] (HTTP: 8500, HTTPS: -1, gRPC: 8502, DNS: 8600)
      Cluster Addr: 127.0.0.1 (LAN: 8301, WAN: 8302)
           Encrypt: Gossip: false, TLS-Outgoing: false, TLS-Incoming: false, Auto-Encrypt-TLS: false
```

-Alvin

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/consul/issues
Community chat: https://gitter.im/hashicorp-consul/Lobby
---
You received this message because you are subscribed to the Google Groups "Consul" group.
To unsubscribe from this group and stop receiving emails from it, send an email to consul-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/consul-tool/fc929df9-a14a-4947-ba3a-c2a0ad665516o%40googlegroups.com.

Ray Ploski

unread,
Jul 12, 2020, 12:25:22 AM7/12/20
to Consul

Sorry I can't be much help but I just tried this on one of my rpi4's running Ubuntu 20.0.4LTS and it all seemed fine.  Seems like further troubleshooting is required.  I'm happy to help compare and contrast settings if needed.

$ docker run --rm consul:1.8
Unable to find image 'consul:1.8' locally
1.8: Pulling from library/consul
941f399634ec: Pull complete
8c62d7d2a7dc: Pull complete
6cc98caf0c68: Pull complete
78fca3e93a03: Pull complete
9ebcb4658c39: Pull complete
7d51dd1887d7: Pull complete
Digest: sha256:0e660ca8ae28d864e3eaaed0e273b2f8cd348af207e2b715237e869d7a8b5dcc
Status: Downloaded newer image for consul:1.8
==> Starting Consul agent...
           Version: 'v1.8.0'
           Node ID: '115254c1-bab8-39b7-b559-f87d46b91ff4'
         Node name: 'a895abf23fc3'
        Datacenter: 'dc1' (Segment: '<all>')
            Server: true (Bootstrap: false)
       Client Addr: [0.0.0.0] (HTTP: 8500, HTTPS: -1, gRPC: 8502, DNS: 8600)
      Cluster Addr: 127.0.0.1 (LAN: 8301, WAN: 8302)
           Encrypt: Gossip: false, TLS-Outgoing: false, TLS-Incoming: false, Auto-Encrypt-TLS: false

==> Log data will now stream in as it occurs:

    2020-07-12T04:20:15.598Z [DEBUG] agent: Using random ID as node ID: id=115254c1-bab8-39b7-b559-f87d46b91ff4
    2020-07-12T04:20:15.633Z [INFO]  agent.server.raft: initial configuration: index=1 servers="[{Suffrage:Voter ID:115254c1-bab8-39b7-b559-f87d46b91ff4 Address:127.0.0.1:8300}]"
    2020-07-12T04:20:15.633Z [INFO]  agent.server.raft: entering follower state: follower="Node at 127.0.0.1:8300 [Follower]" leader=
    2020-07-12T04:20:15.638Z [INFO]  agent.server.serf.wan: serf: EventMemberJoin: a895abf23fc3.dc1 127.0.0.1
    2020-07-12T04:20:15.642Z [INFO]  agent.server.serf.lan: serf: EventMemberJoin: a895abf23fc3 127.0.0.1
    2020-07-12T04:20:15.643Z [INFO]  agent.server: Adding LAN server: server="a895abf23fc3 (Addr: tcp/127.0.0.1:8300) (DC: dc1)"
    2020-07-12T04:20:15.643Z [INFO]  agent.server: Handled event for server in area: event=member-join server=a895abf23fc3.dc1 area=wan
    2020-07-12T04:20:15.650Z [INFO]  agent: Started DNS server: address=0.0.0.0:8600 network=tcp
    2020-07-12T04:20:15.650Z [INFO]  agent: Started DNS server: address=0.0.0.0:8600 network=udp
    2020-07-12T04:20:15.653Z [INFO]  agent: Started HTTP server: address=[::]:8500 network=tcp
    2020-07-12T04:20:15.655Z [INFO]  agent: Started gRPC server: address=[::]:8502 network=tcp
    2020-07-12T04:20:15.656Z [INFO]  agent: started state syncer
==> Consul agent running!
    2020-07-12T04:20:15.690Z [WARN]  agent.server.raft: heartbeat timeout reached, starting election: last-leader=
    2020-07-12T04:20:15.690Z [INFO]  agent.server.raft: entering candidate state: node="Node at 127.0.0.1:8300 [Candidate]" term=2
    2020-07-12T04:20:15.691Z [DEBUG] agent.server.raft: votes: needed=1
    2020-07-12T04:20:15.691Z [DEBUG] agent.server.raft: vote granted: from=115254c1-bab8-39b7-b559-f87d46b91ff4 term=2 tally=1
    2020-07-12T04:20:15.691Z [INFO]  agent.server.raft: election won: tally=1
    2020-07-12T04:20:15.691Z [INFO]  agent.server.raft: entering leader state: leader="Node at 127.0.0.1:8300 [Leader]"
    2020-07-12T04:20:15.692Z [INFO]  agent.server: cluster leadership acquired
    2020-07-12T04:20:15.695Z [DEBUG] agent.server: Cannot upgrade to new ACLs: leaderMode=0 mode=0 found=true leader=127.0.0.1:8300
    2020-07-12T04:20:15.695Z [INFO]  agent.server: New leader elected: payload=a895abf23fc3
    2020-07-12T04:20:15.701Z [DEBUG] connect.ca.consul: consul CA provider configured: id=07:80:c8:de:f6:41:86:29:8f:9c:b8:17:d6:48:c2:d5:c5:5c:7f:0c:03:f7:cf:97:5a:a7:c1:68:aa:23:ae:81 is_primary=true
    2020-07-12T04:20:15.767Z [INFO]  agent.server.connect: initialized primary datacenter CA with provider: provider=consul
    2020-07-12T04:20:15.767Z [INFO]  agent.leader: started routine: routine="federation state anti-entropy"
    2020-07-12T04:20:15.767Z [INFO]  agent.leader: started routine: routine="federation state pruning"
    2020-07-12T04:20:15.767Z [INFO]  agent.leader: started routine: routine="CA root pruning"
    2020-07-12T04:20:15.767Z [DEBUG] agent.server: Skipping self join check for node since the cluster is too small: node=a895abf23fc3
    2020-07-12T04:20:15.769Z [INFO]  agent.server: federation state anti-entropy synced
    2020-07-12T04:20:15.770Z [INFO]  agent.server: member joined, marking health alive: member=a895abf23fc3
    2020-07-12T04:20:15.910Z [DEBUG] agent: Skipping remote check since it is managed automatically: check=serfHealth
    2020-07-12T04:20:15.912Z [INFO]  agent: Synced node info
    2020-07-12T04:20:15.912Z [DEBUG] agent: Node info in sync
    2020-07-12T04:20:17.736Z [DEBUG] agent: Skipping remote check since it is managed automatically: check=serfHealth
    2020-07-12T04:20:17.737Z [DEBUG] agent: Node info in sync
    ^C
    2020-07-12T04:20:32.605Z [INFO]  agent: Caught: signal=interrupt
    2020-07-12T04:20:32.605Z [INFO]  agent: Graceful shutdown disabled. Exiting
    2020-07-12T04:20:32.605Z [INFO]  agent: Requesting shutdown
    2020-07-12T04:20:32.605Z [INFO]  agent.server: shutting down server
    2020-07-12T04:20:32.605Z [DEBUG] agent.leader: stopping routine: routine="federation state anti-entropy"
    2020-07-12T04:20:32.605Z [DEBUG] agent.leader: stopping routine: routine="federation state pruning"
    2020-07-12T04:20:32.605Z [DEBUG] agent.leader: stopping routine: routine="CA root pruning"
    2020-07-12T04:20:32.606Z [WARN]  agent.server.serf.lan: serf: Shutdown without a Leave
    2020-07-12T04:20:32.606Z [WARN]  agent.server.serf.wan: serf: Shutdown without a Leave
    2020-07-12T04:20:32.606Z [INFO]  agent.server.router.manager: shutting down
    2020-07-12T04:20:32.607Z [INFO]  agent: consul server down
    2020-07-12T04:20:32.607Z [INFO]  agent: shutdown complete
    2020-07-12T04:20:32.607Z [INFO]  agent: Stopping server: protocol=DNS address=0.0.0.0:8600 network=tcp
    2020-07-12T04:20:32.607Z [INFO]  agent: Stopping server: protocol=DNS address=0.0.0.0:8600 network=udp
    2020-07-12T04:20:32.608Z [INFO]  agent: Stopping server: protocol=HTTP address=[::]:8500 network=tcp
    2020-07-12T04:20:32.608Z [INFO]  agent: Waiting for endpoints to shut down
    2020-07-12T04:20:32.608Z [INFO]  agent: Endpoints down
    2020-07-12T04:20:32.608Z [INFO]  agent: Exit code: code=1
$ uname -a
Linux enceladus 5.4.0-1013-raspi #13-Ubuntu SMP Mon Jun 15 03:17:37 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
$ dpkg --print-architecture
arm64


Reply all
Reply to author
Forward
0 new messages