self-hosted
self-hosted copied to clipboard
Support ARM64
Self-Hosted Version
n/a
CPU Architecture
arm64
Docker Version
20.10.12
Docker Compose Version
1.29.2
Steps to Reproduce
- Try to run ./install.sh on a relatively fresh install of ubuntu 22.04
- 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
@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.
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.
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
@androidacy-user What's the output of this command: docker info --format '{{.Architecture}}'
?
aarch64
as expected
I'll try to reproduce and fix this later.
Hm, unfortunately I think we will be stalled on this until we upgrade zookeeper, ref https://github.com/getsentry/self-hosted/issues/1292 as confluence's zookeeper image seems not to support ARM until the 7.x series.
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
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.
I successfully run sentry on an ARM server, using this third-party version: https://github.com/Sentry-ARM/onpremise
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.
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
I think I have code to build an arm64 build of Sentry in https://github.com/getsentry/sentry/pull/38180
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
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...
@johnsturgeon I believe that is an inconsistent issue that only happens some of the time, if you try again does it happen?
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
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

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:-}
any update?
Any update?
Ping pong pang. Running into the same issue, anyone got a workaround?
As of now, we have no update here as we don't have the bandwidth to tackle this issue 😔. If you'd like to look into this on your own, we do accept PR's
Same issue:
#6 [2/4] COPY . /usr/src/sentry
#6 CACHED
#7 [3/4] RUN if [ -s /usr/src/sentry/enhance-image.sh ]; then /usr/src/sentry/enhance-image.sh; fi
#7 0.333 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
------
> [3/4] RUN if [ -s /usr/src/sentry/enhance-image.sh ]; then /usr/src/sentry/enhance-image.sh; fi:
#7 0.333 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
+++ cleanup ERR
+++ local retcode=17
+++ local 'cmd=$dcb --force-rm web'
+++ [[ 0 -eq 1 ]]
+++ DID_CLEAN_UP=1
+++ [[ ERR != \E\X\I\T ]]
+++ set +o xtrace
Error in install/build-docker-images.sh:6.
'$dcb --force-rm web' exited with status 17
-> ./install.sh:main:29
--> install/build-docker-images.sh:source:6
# docker info --format '{{.Architecture}}'
aarch64
Still only linux/amd64:
SENTRY_IMAGE=getsentry/sentry:nightly
SNUBA_IMAGE=getsentry/snuba:nightly
RELAY_IMAGE=getsentry/relay:nightly
SYMBOLICATOR_IMAGE=getsentry/symbolicator:nightly
Having the same issues with Ampere (ARM64) hosting, bash syntax error
Do we have a workaround for this ? I am using Ampere (Oracle-ARM64) but always getting the error related to bash
Made some research and it seems to be snuba does not have support for the arm builds yet. However meanwhile we can try use these images to go around.
This method is working for me!
This method is working for me!
How did you try ? Is it working with some service like amphere ?