Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ARM64 #1585

Open
androidacy-user opened this issue Jul 16, 2022 · 83 comments
Open

Support ARM64 #1585

androidacy-user opened this issue Jul 16, 2022 · 83 comments

Comments

@androidacy-user
Copy link

Self-Hosted Version

n/a

CPU Architecture

arm64

Docker Version

20.10.12

Docker Compose Version

1.29.2

Steps to Reproduce

  1. Try to run ./install.sh on a relatively fresh install of ubuntu 22.04
  2. Install fails

Expected Result

Install succeeds

Actual Result

Hits an error:

Step 4/5 : RUN if [ -s /usr/src/sentry/enhance-image.sh ]; then     /usr/src/sentry/enhance-image.sh; fi
 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
 ---> Running in 2ae646b00261
exec /bin/sh: exec format error

Note we don't have an enhance-image.sh anywhere in the directory

@aminvakil
Copy link
Collaborator

@ethanhs Can getsentry/sentry docker image run on a host with an arm64 cpu?

It may also help if to you try running ./install.sh again like this DEBUG=1 ./install.sh and paste the output in a gist.

@emmatyping
Copy link
Contributor

Can getsentry/sentry docker image run on a host with an arm64 cpu?

No I think on macOS it is getting run by Rosetta maybe? I'm a bit uncertain. Theoretically it is unlikely that any of its dependencies won't work on ARM, I will ask around to see how feasible it is to build native ARM images.

@androidacy-user
Copy link
Author

We're not on MacOS but Ubuntu 22.04 running on GCP.

@aminvakil would that even help? I think it's pretty obvious, the image used to run that script isn't respecting the system architecture and as such failing to run as it defaults to amd64

@aminvakil
Copy link
Collaborator

@androidacy-user What's the output of this command: docker info --format '{{.Architecture}}'?

@androidacy-user
Copy link
Author

aarch64 as expected

@emmatyping
Copy link
Contributor

I'll try to reproduce and fix this later.

@emmatyping
Copy link
Contributor

Hm, unfortunately I think we will be stalled on this until we upgrade zookeeper, ref #1292 as confluence's zookeeper image seems not to support ARM until the 7.x series.

@licstar
Copy link

licstar commented Jul 20, 2022

Hm, unfortunately I think we will be stalled on this until we upgrade zookeeper, ref #1292 as confluence's zookeeper image seems not to support ARM until the 7.x series.

Can I replace zookeeper to some arm64 version? such as watershine

@emmatyping
Copy link
Contributor

We use a rather old version of zookeeper, I'm not sure if it would be safe to upgrade but I'm looking into it.

@licstar
Copy link

licstar commented Jul 30, 2022

I successfully run sentry on an ARM server, using this third-party version: https://github.com/Sentry-ARM/onpremise

@emmatyping
Copy link
Contributor

Note that we don't support third-party repos for deployment. I do want to add aarch64 for Linux at some point, but there are several changes we'd need to make to see that happen.

@nickjmv
Copy link

nickjmv commented Aug 10, 2022

We have also run into ARM issues while running the ./install.sh script. Apparently the getsentry/relay docker image is not built for ARM, only for AMD. We opened a separate issue for this: #1642

@armenzg
Copy link
Member

armenzg commented Aug 26, 2022

I think I have code to build an arm64 build of Sentry in getsentry/sentry#38180

@checkolala
Copy link

Hello,

we are facing the same issue on aws graviton (aarch64) while running ./install.sh
seems, that the current sentry-image doesn't provide the platform aarch64

#7 [3/4] RUN if [ -s /usr/src/sentry/enhance-image.sh ]; then     /usr/src/sentry/enhance-image.sh; fi
#7 0.490 exec /bin/sh: exec format error
#7 ERROR: executor failed running [/bin/sh -c if [ -s /usr/src/sentry/enhance-image.sh ]; then     /usr/src/sentry/enhance-image.sh; fi]: exit code: 1
------
 > [3/4] RUN if [ -s /usr/src/sentry/enhance-image.sh ]; then     /usr/src/sentry/enhance-image.sh; fi:
#7 0.490 exec /bin/sh: exec format error
------
failed to solve: executor failed running [/bin/sh -c if [ -s /usr/src/sentry/enhance-image.sh ]; then     /usr/src/sentry/enhance-image.sh; fi]: exit code: 1
Error in build-docker-images.sh:6.
'$dc build --build-arg "http_proxy=${http_proxy:-}" --build-arg "https_proxy=${https_proxy:-}" --build-arg "no_proxy=${no_proxy:-}" --force-rm web' exited with status 17
-> ./install.sh:main:30
--> build-docker-images.sh:source:6

@johnsturgeon
Copy link

Getting the following error trying to build on my M1 Mac

container for service "zookeeper" is unhealthy
Error in bootstrap-snuba.sh:3.
'$dcr snuba-api bootstrap --no-migrate --force' exited with status 1
-> ./install.sh:main:33
--> bootstrap-snuba.sh:source:3

Cleaning up...

@emmatyping
Copy link
Contributor

@johnsturgeon I believe that is an inconsistent issue that only happens some of the time, if you try again does it happen?

@johnsturgeon
Copy link

I tried again, and it did happen again.

I got around it by just doing a docker compose up that fired up quite a few containers...
then docker compose down
then redid the install.sh

@johnsturgeon
Copy link

The only problem I have now is whenever I start the stack the nginx container usually does not start, so I have to stop it / and the web container and restart them. That usually gets it going

@johnsturgeon
Copy link

image

This is the normal state after I start the stack

@hubertdeng123
Copy link
Member

note: Maybe M1 Max vs M1 Pro is causing issues with compatibility

I have to comment out this for self-hosted to work on M1 Max in docker-compose.yml while Chad and Ethan do not.

platform: ${DOCKER_PLATFORM:-} 

@drmrbrewer
Copy link
Contributor

Why is this issue still open but the following issue is closed: #914 ? What is the actual situation with arm support?

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Nov 20, 2024
@maximal
Copy link

maximal commented Nov 24, 2024

@drmrbrewer, I think it is open because it’s not fully resolved.

I just tried to install this package on ARM machine (git pull && ./install.sh) and it fails like before.

#7 [web 3/4] RUN if [ -s /usr/src/sentry/enhance-image.sh ]; then     /usr/src/sentry/enhance-image.sh; fi
#7 0.287 exec /bin/sh: exec format error
#7 ERROR: process "/bin/sh -c if [ -s /usr/src/sentry/enhance-image.sh ]; then     /usr/src/sentry/enhance-image.sh; fi" did not complete successfully: exit code: 1
------
 > [web 3/4] RUN if [ -s /usr/src/sentry/enhance-image.sh ]; then     /usr/src/sentry/enhance-image.sh; fi:
0.287 exec /bin/sh: exec format error
------
failed to solve: process "/bin/sh -c if [ -s /usr/src/sentry/enhance-image.sh ]; then     /usr/src/sentry/enhance-image.sh; fi" did not complete successfully: exit code: 1
Error in install/build-docker-images.sh:6.
'$dcb --force-rm web' exited with status 17
-> ./install.sh:main:34
--> install/build-docker-images.sh:source:6

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /docker-entrypoint.sh: exec format error

@abriginets
Copy link

Guys, just read a few posts from above. There is going to be ARM64 support for Sentry as soon as GitHub Actions release ARM64 runners for public orgs (scheduled to happen Q1 2025). For the time being feel free to install from fork https://github.com/Sentry-ARM/self-hosted/tree/arm64

We've been running ARM64 fork for more than a month with no issues whatsoever.

@drmrbrewer
Copy link
Contributor

@maximal my question was partly why the other issue has been marked as closed (fixed)… seems like the same issue?

@abriginets have tried that but it doesn’t work for me… any special instructions different to the official installation?

@abriginets
Copy link

@drmrbrewer the only thing I screwed up when installing from ARM fork was that I forgot to override image names to be pulled from ARM fork as well. Make sure your .env contains the following

SENTRY_IMAGE=ghcr.io/sentry-arm/sentry:24.9.0
SNUBA_IMAGE=ghcr.io/sentry-arm/snuba:24.9.0
RELAY_IMAGE=getsentry/relay:84ed80556e803b8b29c1ba624d660e506bdc1f08
SYMBOLICATOR_IMAGE=ghcr.io/sentry-arm/symbolicator:24.9.0
VROOM_IMAGE=ghcr.io/sentry-arm/vroom:24.9.0

Other than that it should be the same as installing from official docs.

@drmrbrewer
Copy link
Contributor

@abriginets yes! thanks... works a treat now!

@ezhevita
Copy link

I've updated the fork to 24.11.0! Please report any issues as I don't have the ability to test on the capable enough arm64 machine

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Nov 26, 2024
@drmrbrewer
Copy link
Contributor

@ezhevita yes... works nicely with a .env containing:

SENTRY_IMAGE=ghcr.io/sentry-arm/sentry:24.11.0
SNUBA_IMAGE=ghcr.io/sentry-arm/snuba:24.11.0
RELAY_IMAGE=getsentry/relay:24.11.0
SYMBOLICATOR_IMAGE=ghcr.io/sentry-arm/symbolicator:24.11.0
VROOM_IMAGE=ghcr.io/sentry-arm/vroom:24.11.0

Dashboard now showing:

Image

Thanks!

@JohnCFerguson
Copy link

JohnCFerguson commented Dec 4, 2024

I'm getting this issue trying to install on a hetzner cloud arm box -

Linux ubuntu-16gb-fsn1-1 6.8.0-49-generic #49-Ubuntu SMP PREEMPT_DYNAMIC Sun Nov  3 21:21:58 UTC 2024 aarch64 aarch64 aarch64 GNU/LinuShell
Cloning into 'self-hosted'...
remote: Enumerating objects: 4218, done.
remote: Counting objects: 100% (60/60), done.
remote: Compressing objects: 100% (52/52), done.
remote: Total 4218 (delta 23), reused 28 (delta 8), pack-reused 4158 (from 1)
Receiving objects: 100% (4218/4218), 1.56 MiB | 7.78 MiB/s, done.
Resolving deltas: 100% (2577/2577), done.
Note: switching to '24.11.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at fa61f17 release: 24.11.0
▶ Parsing command line ...

▶ Detecting Docker platform
Detected Docker platform is linux/arm64

▶ Initializing Docker Compose ...

▶ Setting up error handling ...
#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 292B done
#1 DONE 0.0s

#2 [internal] load metadata for docker.io/library/debian:bookworm-slim
#2 DONE 0.4s

#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s

#4 [1/2] FROM docker.io/library/debian:bookworm-slim@sha256:1537a6a1cbc4b4fd401da800ee9480207e7dc1f23560c21259f681db56768f63
#4 DONE 0.0s

#5 [2/2] RUN set -x   && apt-get update   && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends jq   && apt-get clean   && rm -rf /var/lib/apt/lists/*
#5 CACHED

#6 exporting to image
#6 exporting layers done
#6 writing image sha256:a1afad5a473e956ab7301d4bfd8c92661981dbd5b7b1632341f31adbfc42df51 done
#6 naming to docker.io/library/sentry-self-hosted-jq-local done
#6 DONE 0.0s

Hey, so ... we would love to automatically find out about issues with your
Sentry instance so that we can improve the product. Turns out there is an app
for that, called Sentry. Would you be willing to let us automatically send data
about your instance upstream to Sentry for development and debugging purposes?

  y / yes / 1
  n / no / 0

(Btw, we send this to our own self-hosted Sentry instance, not to Sentry SaaS,
so that we can be in this together.)

Here's the info we may collect:

  - OS username
  - IP address
  - install log
  - runtime errors
  - performance data

Thirty (30) day retention. No marketing. Privacy policy at sentry.io/privacy.

y or n? y

Thank you. To avoid this prompt in the future, use one of these flags:

  --report-self-hosted-issues
  --no-report-self-hosted-issues

or set the REPORT_SELF_HOSTED_ISSUES environment variable:

  REPORT_SELF_HOSTED_ISSUES=1 to send data
  REPORT_SELF_HOSTED_ISSUES=0 to not send data

latest: Pulling from getsentry/sentry-cli
Digest: sha256:6882f637e48cb1d740425256641ae32a63c87918e3772749f4ceac10072b116f
Status: Image is up to date for getsentry/sentry-cli:latest
docker.io/getsentry/sentry-cli:latest

▶ Checking for latest commit ... 
skipped

▶ Checking minimum requirements ...
Found Docker version 27.3.1
Found Docker Compose version 2.29.7

▶ Upgrading Clickhouse ...
 clickhouse Pulling 
 clickhouse Warning pull access denied for clickhouse-self-hosted-local, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
#0 building with "default" instance using docker driver

#1 [clickhouse internal] load build definition from Dockerfile
#1 transferring dockerfile: 71B done
#1 WARN: InvalidDefaultArgInFrom: Default value for ARG ${BASE_IMAGE} results in empty or invalid base image name (line 2)
#1 DONE 0.0s

#2 [clickhouse internal] load metadata for docker.io/altinity/clickhouse-server:23.8.11.29.altinitystable
#2 DONE 0.4s

#3 [clickhouse internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s

#4 [clickhouse 1/1] FROM docker.io/altinity/clickhouse-server:23.8.11.29.altinitystable@sha256:a91987eab83bdc8fa5ee9725694b2bcf57779e68fa3934291cd20020484dd391
#4 CACHED

#5 [clickhouse] exporting to image
#5 exporting layers done
#5 writing image sha256:a3c35176fba5d71e7962561230eac3b90dcb55c785b20fc44b399551894a57da done
#5 naming to docker.io/library/clickhouse-self-hosted-local done
#5 DONE 0.0s

#6 [clickhouse] resolving provenance for metadata file
#6 DONE 0.0s
 Container sentry-self-hosted-clickhouse-1  Creating
 Container sentry-self-hosted-clickhouse-1  Created
 Container sentry-self-hosted-clickhouse-1  Starting
 Container sentry-self-hosted-clickhouse-1  Started
Waiting for clickhouse server, 30 remaining attempts...
Waiting for clickhouse server, 29 remaining attempts...
Waiting for clickhouse server, 28 remaining attempts...
Waiting for clickhouse server, 27 remaining attempts...
Waiting for clickhouse server, 26 remaining attempts...
Waiting for clickhouse server, 25 remaining attempts...
Waiting for clickhouse server, 24 remaining attempts...
Waiting for clickhouse server, 23 remaining attempts...
sentry-self-hosted-clickhouse-1   clickhouse-self-hosted-local   "/entrypoint.sh"   clickhouse   11 seconds ago   Up 10 seconds (healthy)   8123/tcp, 9000/tcp, 9009/tcp
Detected clickhouse version 23.8.11.29.altinitystable. Skipping upgrades!

▶ Turning things off ...
 Container sentry-self-hosted-clickhouse-1  Stopping
 Container sentry-self-hosted-clickhouse-1  Stopped
 Container sentry-self-hosted-clickhouse-1  Removing
 Container sentry-self-hosted-clickhouse-1  Removed
 Image clickhouse-self-hosted-local:latest  Removing
 Network sentry-self-hosted_default  Removing
 Image clickhouse-self-hosted-local:latest  Removed
 Network sentry-self-hosted_default  Removed

▶ Ensuring Kafka and Zookeeper volumes have correct permissions ...

▶ Creating volumes for persistent storage ...
Created sentry-clickhouse.
Created sentry-data.
Created sentry-kafka.
Created sentry-postgres.
Created sentry-redis.
Created sentry-symbolicator.

▶ Ensuring files from examples ...
Creating sentry/sentry.conf.py ...
cp: warning: behavior of -n is non-portable and may change in future; use --update=none instead
Creating sentry/config.yml ...
cp: warning: behavior of -n is non-portable and may change in future; use --update=none instead
Creating symbolicator/config.yml ...
cp: warning: behavior of -n is non-portable and may change in future; use --update=none instead

▶ Checking memcached backend ...
PyMemcacheCache found in sentry/sentry.conf.py, gonna assume you're good.

▶ Ensuring Relay credentials ...
Creating relay/config.yml ...
cp: warning: behavior of -n is non-portable and may change in future; use --update=none instead
 relay Pulling 
 relay Pulled 
 Network sentry-self-hosted_default  Creating
 Network sentry-self-hosted_default  Created
Relay credentials written to relay/credentials.json.

▶ Generating secret key ...
Secret key written to sentry/config.yml

▶ Fetching and updating Docker images ...
24.11.0: Pulling from getsentry/sentry
no matching manifest for linux/arm64/v8 in the manifest list entries

▶ Building and tagging Docker images ...

#0 building with "default" instance using docker driver

#1 [web internal] load build definition from Dockerfile
#1 transferring dockerfile: 462B done
#1 WARN: InvalidDefaultArgInFrom: Default value for ARG ${SENTRY_IMAGE} results in empty or invalid base image name (line 2)
#1 DONE 0.0s

#2 [web internal] load metadata for docker.io/getsentry/sentry:24.11.0
#2 ERROR: no match for platform in manifest: not found
------
 > [web internal] load metadata for docker.io/getsentry/sentry:24.11.0:
------
failed to solve: getsentry/sentry:24.11.0: failed to resolve source metadata for docker.io/getsentry/sentry:24.11.0: no match for platform in manifest: not found
Error in install/build-docker-images.sh:6.
'$dcb --force-rm web' exited with status 17
-> ./install.sh:main:34
--> install/build-docker-images.sh:source:6

Looks like you've already sent this error to us, we're on it :)

using this shell script to run it:

# Assuming current latest version is 24.1.0

#!/bin/sh
VERSION="24.11.0"
git clone https://github.com/getsentry/self-hosted.git
cd self-hosted
git checkout ${VERSION}
DEBUG=1 sudo ./install.sh

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 4, 2024
@ezhevita
Copy link

ezhevita commented Dec 5, 2024

@JohnCFerguson there is no official ARM support, you can use my fork that adds the compatibility: https://github.com/Sentry-ARM/self-hosted

@akamoroz
Copy link

akamoroz commented Dec 11, 2024

@ezhevita
Hello, Vita.

I've just faced an issues using your fork.

  1. Clone
  2. Checkout to arm64 branch
  3. run /install.sh

Error:

 Service sentry-cleanup  Building
#0 building with "quizzical_keller" instance using docker-container driver

#1 [sentry-cleanup internal] load build definition from Dockerfile
#1 transferring dockerfile: 469B done
#1 WARN: InvalidDefaultArgInFrom: Default value for ARG ${BASE_IMAGE} results in empty or invalid base image name (line 2)
#1 DONE 0.0s

#2 [sentry-cleanup internal] load metadata for docker.io/library/sentry-self-hosted-local:latest
#2 ...

#3 [sentry-cleanup auth] library/sentry-self-hosted-local:pull token for registry-1.docker.io
#3 DONE 0.0s

#2 [sentry-cleanup internal] load metadata for docker.io/library/sentry-self-hosted-local:latest
#2 ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
------
 > [sentry-cleanup internal] load metadata for docker.io/library/sentry-self-hosted-local:latest:
------
failed to solve: sentry-self-hosted-local: failed to resolve source metadata for docker.io/library/sentry-self-hosted-local:latest: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
Error in install/build-docker-images.sh:9.
'$dcb --force-rm "$service"' exited with status 17
-> ./install.sh:main:34
--> install/build-docker-images.sh:source:9

Cleaning up...

What I am doing wrong?
Arm64, Alpine 3.20, Oracle Cloud

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 11, 2024
@ezhevita
Copy link

@akamoroz hello, this is most likely to be an issue with your environment. Docker should build this image locally instead of trying to pull it from remote. I've encountered this once during building of the images and the only thing that helped was setup a new VM from scratch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Status: No status
Status: No status
Development

No branches or pull requests