Hi all :wave: I’m having the following error while...
# replication-ask-ai
j
Hi all 👋 I’m having the following error while trying to run Airbyte locally: (
./run-ab-platform.sh
)
Copy code
airbyte-db                        | /usr/local/bin/docker-entrypoint.sh: line 92: /usr/local/bin/initdb: cannot execute binary file: Exec format error
airbyte-db exited with code 126
airbyte-temporal                  | nc: bad address 'db'
airbyte-temporal                  | Waiting for PostgreSQL to startup.
It’d seem the PostgreSQL binary is not compatible with my mac's architecture (M1, arm64). I’ve search the Github discussions, the Discourse and here on Slack but didn’t find a workaround. I tried changing the db image in the Docker compose yaml from:
Copy code
db:
    image: airbyte/db:${VERSION}
to:
Copy code
db:
    image: airbyte/db:0.50.11@sha256:bd28ca659a8b4940582fdd5338be7582c94cad4de8fe690bce7b4bed67ce6193
to make sure the image for arm64 would be installed. I got a slightly different error:
Copy code
airbyte-db                        | /usr/local/bin/docker-entrypoint.sh: line 346: /usr/local/bin/postgres: cannot execute binary file: Exec format error
airbyte-db                        | /usr/local/bin/docker-entrypoint.sh: line 346: /usr/local/bin/postgres: No error information
airbyte-db exited with code 1
But there still seem to be an architecture incompatibility error. I'm not particularly experienced with Docker so not sure what I can do next. Anyone has an idea? 🤓 Thanks!
k
Hello! It seems like you're running into an issue with the PostgreSQL binary not being compatible with your Mac's M1 architecture. This is a known issue with certain Docker images on M1 Macs, as they may not have ARM64 support. From the information provided, it appears that the Airbyte Docker images you're trying to use are not compatible with the ARM64 architecture of your M1 Mac. This is indicated by the
Exec format error
you're seeing, which typically means the binary was built for a different architecture. In the [forum discussion](https://discuss.airbyte.io/t/4652), a user faced a similar issue while trying to add a custom connector to the Airbyte UI. The user was able to resolve the issue by enabling Docker's experimental features and building the Docker image for the
linux/amd64
platform. Here are the steps they followed: 1. Go to Docker Desktop settings. Find "Experimental features". Enable. 2. Run
docker buildx create --use
3. Build and push your image using
docker buildx build --platform linux/amd64 --push -t repo/image-name:tag .
Please note that this solution might not work for your case as it depends on the specific Docker images you're using. If the issue persists, I would recommend reaching out to the Airbyte community on their [Slack channel](https://airbytehq.slack.com) or [forum](https://discuss.airbyte.io) for further assistance.
j
Thanks for your answer @kapa.ai. The "Airbyte PostgreSQL" Docker image is already available for my architecture (arm64). Are you suggesting I should build it again from source code?
k
Based on the information provided in the extracts, there is no explicit suggestion to build the "Airbyte PostgreSQL" Docker image from the source code if it's already available for your architecture (arm64). The extracts mainly provide instructions on how to set up Airbyte, start a PostgreSQL Docker container, and build a Docker image for a new destination connector. However, if you need to make any modifications or customizations to the Docker image, you might need to build it from the source code. For instance, in one of the [support conversations](https://airbytehq.slack.com/archives/C021JANJ6TY/p1669989455369569), a user needed to make changes to the nginx config template and rebuild the image. If the available Docker image suits your needs and is compatible with your architecture, you can use it as is. If you need to make changes, you would need to clone the repository, make your changes, and then build the Docker image. Please note that any modifications should be done carefully and in accordance with the guidelines provided in the Airbyte documentation and tutorials.
m
@Jean-Charles Touzalin Airbyte is compatible with M1 chips. Are you running latest version of
./run-platform.sh
script?
j
@Marcos Marx (Airbyte) yes I cloned the repo yesterday, updated it today for good measure, tried again and got the same error
there must be something wrong with my setup then, but not sure how to fix it
m
j
I don't have the error code 126 anymore. Now only this:
Copy code
airbyte-db                        | PostgreSQL Database directory appears to contain a database; Skipping initialization
airbyte-db                        |
airbyte-db                        |
airbyte-db                        | /usr/local/bin/docker-entrypoint.sh: line 346: /usr/local/bin/postgres: cannot execute binary file: Exec format error
airbyte-db                        | /usr/local/bin/docker-entrypoint.sh: line 346: /usr/local/bin/postgres: No error information
airbyte-db exited with code 1
m
docker run --rm --name dest -p 2001:5432 -e POSTGRES_PASSWORD=password -d postgre
if you run this are you able to spin up a Postgre container?
j
yes seems good
Posting logs from db and temporal
s
@Jean-Charles Touzalin Can you do
docker compose down
and
docker compose up
and report what errors you see? Unfortunately not seeing any unresolved errors in the logs
j