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 running Airbyte on Mac M1 Docker #2017

Closed
2 of 6 tasks
jrhizor opened this issue Feb 9, 2021 · 55 comments · Fixed by #7208
Closed
2 of 6 tasks

Support running Airbyte on Mac M1 Docker #2017

jrhizor opened this issue Feb 9, 2021 · 55 comments · Fixed by #7208

Comments

@jrhizor
Copy link
Contributor

jrhizor commented Feb 9, 2021

Current status

  • Server can build and run.
  • Can sync data among some connectors.
  • Temporal can fail transiently and may require restarting the server to fix it.
  • Some connectors do not work.
  • Huge shout-out to @h7kanna.

Todos

  • Fix temporal
  • Fix connectors
    • source-mssql
    • source-oracle
    • source-file: stuck at installTestReqs
    • source-mysql & destination-mysql
      • MySQL connectors can compile after switching to MariaDB
      • There are weird unit test failures for source-mysql.

Relevant PRs

@jrhizor jrhizor added type/bug Something isn't working blocked labels Feb 9, 2021
@kination
Copy link

kination commented Feb 11, 2021

@jrhizor I'm also failing on Mac M1, with ./gradlew clean build

sorry, seems this is not related with this one...please ignore.

@jrhizor
Copy link
Contributor Author

jrhizor commented Apr 19, 2021

Docker on M1 is now generally available https://docs.docker.com/docker-for-mac/apple-silicon/

@ashishgupta-97065
Copy link

Having the same issue on M1. Would be great to have a solution

@jrhizor jrhizor removed the blocked label Jul 14, 2021
@takan55
Copy link

takan55 commented Jul 18, 2021

Tried running airbyte with Kind on my M1 chip macbook pro but it got stuck saying "cannot reach server. The server may still be starting up.". This is critical to me to stick with airbyte. Since more and more developers are switching to the M1 macs, I'd love to see the solution asap.

@jrhizor jrhizor added the build label Jul 19, 2021
@tuliren
Copy link
Contributor

tuliren commented Jul 21, 2021

M1 support reference: https://docs.docker.com/desktop/multi-arch/

@caiopedroso
Copy link

caiopedroso commented Jul 26, 2021

Hey guys! We are deciding on our primary connector, I'm advocating on airbyte, but all of our engineers have an m1 at this moment, a possible solution to this would help a lot, do we have an eta?

@tuliren
Copy link
Contributor

tuliren commented Jul 28, 2021

Hey @caiopedroso, thank you for letting us know. There is an increasing number of requests for making Airbyte work on M1. We are evaluating if we can prioritize this issue any time soon. Will provide an update this week (probably this Thursday).

@hbd
Copy link

hbd commented Jul 28, 2021

Just confirming that running Airbyte on my M1 is not working. Short version of my experience:

  1. The primary issue is uptime/reliability of the services. I have seen the Airbyte services successfully run a couple times, where I could access the dashboard or use the API. However, it always crashes within a few minutes of starting.
  2. The airbyte-temporal service times out while trying Waiting for default namespace to be initialized in temporal. This happens about 10% of the time I start the services:
    image
  3. I am also seeing airbyte-temporal fail with context deadline exceeded errors when trying to access the webapp
airbyte-temporal   | {"level":"error","ts":"2021-07-27T21:49:54.515Z","msg":"Operation failed with internal error.","service":"matching","error":"UpdateTaskQueue failed. Failed to start t
ransaction. Error: context deadline exceeded","metric-scope":38,"logging-call-at":"persistenceMetricClients.go:804","stacktrace":"go.temporal.io/server/common/log/loggerimpl.(*loggerImpl).Error\n\t/temporal/common/log/loggerimpl/logger.go:138\ngo.temporal.io/server/common/persistence.(*taskPersistenceClient).updateErrorMetric\n\t/temporal/common/persistence/persistenceMetricClients.go:804\ngo.temporal.io/server/common/persistence.(*taskPersistenceClient).UpdateTaskQueue\n\t/temporal/common/persistence/persistenceMetricClients.go:787\ngo.temporal.io/server/service/matching.(*taskQueueDB).UpdateState\n\t/temporal/service/matching/db.go:109\ngo.temporal.io/server/service/matching.(*taskReader).persistAckLevel\n\t/temporal/service/matching/ta
skReader.go:272\ngo.temporal.io/server/service/matching.(*taskReader).getTasksPump\n\t/temporal/service/matching/taskReader.go:160"}
airbyte-temporal   | {"level":"error","ts":"2021-07-27T21:49:54.519Z","msg":"Persistent store operation failure","service":"matching","component":"matching-engine","wf-task-queue-name":"3218103eeed6:d20106e3-3a07-460c-8f98-6b1d259c7bd2","wf-task-queue-type":"Workflow","store-operation":"update-task-queue","error":"UpdateTaskQueue failed. Failed to start transaction. Error: context deadline exceeded","logging-call-at":"taskReader.go:166","stacktrace":"go.temporal.io/server/common/log/loggerimpl.(*loggerImpl).Error\n\t/temporal/common/log/loggerimpl/logger.
go:138\ngo.temporal.io/server/service/matching.(*taskReader).getTasksPump\n\t/temporal/service/matching/taskReader.go:166"}
airbyte-temporal   | {"level":"error","ts":"2021-07-27T21:50:00.405Z","msg":"Operation failed with internal error.","service":"matching","error":"GetMetadata operation failed. Error: cont
ext deadline exceeded","metric-scope":51,"logging-call-at":"persistenceMetricClients.go:932","stacktrace":"go.temporal.io/server/common/log/loggerimpl.(*loggerImpl).Error\n\t/temporal/common/log/loggerimpl/logger.go:138\ngo.temporal.io/server/common/persistence.(*metadataPersistenceClient).updateErrorMetric\n\t/temporal/common/persistence/persistenceMetricClients.go:932\ngo.temporal.io/server/common/persistence.(*metadataPersistenceClient).GetMetadata\n\t/temporal/common/persistence/persistenceMetricClients.go:910\ngo.temporal.io/server/common/cache.(*namespaceCache).refreshNamespacesLocked\n\t/temporal/common/cache/namespaceCache.go:435\ngo.temporal.io/server/common/cache.(*namespaceCache).refreshNamespaces\n\t/temporal/common/cache/name
spaceCache.go:425\ngo.temporal.io/server/common/cache.(*namespaceCache).refreshLoop\n\t/temporal/common/cache/namespaceCache.go:409"}
airbyte-temporal   | {"level":"error","ts":"2021-07-27T21:50:00.405Z","msg":"Error refreshing namespace cache","service":"matching","error":"GetMetadata operation failed. Error: context deadline exceeded","logging-call-at":"namespaceCache.go:414","stacktrace":"go.temporal.io/server/common/log/loggerimpl.(*loggerImpl).Error\n\t/temporal/common/log/loggerimpl/logger.go:138\ngo.temporal.io/server/common/cache.(*namespaceCache).refreshLoop\n\t/temporal/common/cache/namespaceCache.go:414"}
airbyte-temporal   | {"level":"error","ts":"2021-07-27T21:50:09.409Z","msg":"Operation failed with internal error.","service":"matching","error":"GetMetadata operation failed. Error: cont
ext deadline exceeded","metric-scope":51,"logging-call-at":"persistenceMetricClients.go:932","stacktrace":"go.temporal.io/server/common/log/loggerimpl.(*loggerImpl).Error\n\t/temporal/common/log/loggerimpl/logger.go:138\ngo.temporal.io/server/common/persistence.(*metadataPersistenceClient).updateErrorMetric\n\t/temporal/common/persistence/persistenceMetricClients.go:932\ngo.temporal.io/server/common/persistence.(*metadataPersistenceClient).GetMetadata\n\t/temporal/common/persistence/persistenceMetricClients.go:910\ngo.temporal.io/server/common/cache.(*namespaceCache).refreshNamespacesLocked\n\t/temporal/common/cache/namespaceCache.go:435\ngo.temporal.io/server/common/cache.(*namespaceCache).refreshNamespaces\n\t/temporal/common/cache/name
spaceCache.go:425\ngo.temporal.io/server/common/cache.(*namespaceCache).refreshLoop\n\t/temporal/common/cache/namespaceCache.go:409"}
airbyte-temporal   | {"level":"error","ts":"2021-07-27T21:50:09.410Z","msg":"Error refreshing namespace cache","service":"matching","error":"GetMetadata operation failed. Error: context deadline exceeded","logging-call-at":"namespaceCache.go:414","stacktrace":"go.temporal.io/server/common/log/loggerimpl.(*loggerImpl).Error\n\t/temporal/common/log/loggerimpl/logger.go:138\ngo.temporal.io/server/common/cache.(*namespaceCache).refreshLoop\n\t/temporal/common/cache/namespaceCache.go:414"}

I am moving on to workarounds like using a deployed version and my Intel. Happy to help however possible to get this up and running as soon as possible.

@tuliren
Copy link
Contributor

tuliren commented Jul 30, 2021

Hey @caiopedroso, thank you for letting us know. There is an increasing number of requests for making Airbyte work on M1. We are evaluating if we can prioritize this issue any time soon. Will provide an update this week (probably this Thursday).

Update on this. We have allocated one week for this issue in August, and will likely solve it by the end of the month.

@cgardens
Copy link
Contributor

Another user affected by this problem: https://airbytehq.slack.com/archives/C01MFR03D5W/p1629153029204200

@bleonard
Copy link
Contributor

That's me! (commenting for alerts when you fix it).

@barnyrelph
Copy link

Would love to see a fix for this too!

@Freddacker
Copy link

Getting the same errors as @hbd when trying to use Airbyte for the first time.
Looking forward to the resolution!

@vaibhavpals
Copy link

Having the same problem.

@KarlXerri
Copy link

+1 for this problem also.

@watkinsa
Copy link

+1, same problem running on M1. I can get docker image to run and get into UI. problem arises when trying to add a connector/source, even after pre-loading the connector manually and restarting.

@jwei98
Copy link

jwei98 commented Sep 14, 2021

+1 following

@saadatqadri
Copy link

+1, ran into the same problem today as @hbd.

@ChristopheDuong
Copy link
Contributor

It seems we'd also need to upgrade dbt version that is used by airbyte to run on Mac M1:
#6872

@hbd
Copy link

hbd commented Oct 11, 2021

Any update on this? Eager to use Airbyte on my M1! Happy to help where I can.

Hey @caiopedroso, thank you for letting us know. There is an increasing number of requests for making Airbyte work on M1. We are evaluating if we can prioritize this issue any time soon. Will provide an update this week (probably this Thursday).

Update on this. We have allocated one week for this issue in August, and will likely solve it by the end of the month.

@tuliren
Copy link
Contributor

tuliren commented Oct 19, 2021

Thanks to @h7kanna, Airbyte can now build and run on M1.

Please use open jdk 17, and build the server as follows:

export DOCKER_BUILD_PLATFORM=linux/arm64
export DOCKER_BUILD_ARCH=arm64
export JDK_VERSION=17
export NODE_VERSION=16.11.1
SUB_BUILD=PLATFORM ./gradlew build -x test

See doc here for details and #7104 for next steps.

Known remaining issues:

  • Unit test does not work.
  • Temporal has transient issue that may require server restart.

@jrhizor
Copy link
Contributor Author

jrhizor commented Oct 19, 2021

For Temporal:

@voidful
Copy link

voidful commented Feb 16, 2022

I am able to build airbyte locally in M1 machine with a little bit more setting, just share what I have done here:

  1. Install sdkman and open jdk 17
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java 17.0.2-open
  1. Switching to python 3.8.12 via pyenv(.python-version)

  2. Install airbyte(git clone and cd into the root)

export DOCKER_BUILD_PLATFORM=linux/arm64
export DOCKER_BUILD_ARCH=arm64
export JDK_VERSION=17
export NODE_VERSION=16.11.1
export JAVA_OPTS=-Djdk.lang.Process.launchMechanism=vfork
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
SUB_BUILD=PLATFORM ./gradlew build -x test
docker compose up 

@swyxio
Copy link
Contributor

swyxio commented Feb 16, 2022

@jrhizor just an update on the Temporal side - v1.14.2 onwards should be fine again. only v1.12 to v1.14 were affected by this M1 issue.

@reubano
Copy link

reubano commented Mar 2, 2022

For those using macports

cd airbyte
git fetch

sudo port install openjdk17-temurin openssl3

export DOCKER_BUILD_PLATFORM=linux/arm64
export DOCKER_BUILD_ARCH=arm64
export ALPINE_IMAGE=arm64v8/alpine:3.14
export POSTGRES_IMAGE=arm64v8/postgres:13-alpine
export JDK_HOME=${JAVA_HOME}
export JDK_VERSION=17
export JAVA_OPTS=-Djdk.lang.Process.launchMechanism=vfork
export LDFLAGS="-L/opt/local/lib -L/opt/local/libexec/openssl3/lib"
export CPPFLAGS="-I/opt/local/include -I/opt/local/libexec/openssl3/include"

docker compose up 

It now builds, but I still get the Failed to exec spawn helper error.

@grishick
Copy link
Contributor

grishick commented Mar 3, 2022

the above error is because of the airbyte worker not able to create a process on Mac M1

Add this to the worker environment in docker-compose and try once

JAVA_OPTS: "-Djdk.lang.Process.launchMechanism=vfork"

This seems to be causing a new problem. Gradle fails with vfork is not a supported process launch mechanism on this platform

@tino
Copy link

tino commented Mar 28, 2022

At version 0.35.60-alpha I manage to get it up with:

export DOCKER_BUILD_PLATFORM=linux/arm64
export DOCKER_BUILD_ARCH=arm64
export ALPINE_IMAGE=arm64v8/alpine:3.14
export POSTGRES_IMAGE=arm64v8/postgres:13-alpine
export JDK_VERSION=17
VERSION=0.35.60-alpha docker-compose up

however that crashes:

airbyte-server      | Mar 28, 2022 8:11:38 PM org.glassfish.jersey.server.wadl.WadlFeature configure
airbyte-server      | WARNING: JAXBContext implementation could not be found. WADL feature is disabled.
airbyte-server      | 2022-03-28 20:11:41 INFO o.h.v.i.u.Version(<clinit>):21 - HV000001: Hibernate Validator 6.1.2.Final
airbyte-server      | 2022-03-28 20:11:43 INFO o.e.j.s.h.ContextHandler(doStart):860 - Started o.e.j.s.ServletContextHandler@5ebe903a{/,null,AVAILABLE}
airbyte-server      | 2022-03-28 20:11:43 INFO o.e.j.s.AbstractConnector(doStart):331 - Started ServerConnector@71531dd7{HTTP/1.1, (http/1.1)}{0.0.0.0:8001}
airbyte-server      | 2022-03-28 20:11:43 INFO o.e.j.s.Server(doStart):400 - Started @75367ms
airbyte-server      | 2022-03-28 20:11:43 INFO i.a.s.ServerApp(start):124 -
airbyte-server      |     ___    _      __          __
airbyte-server      |    /   |  (_)____/ /_  __  __/ /____
airbyte-server      |   / /| | / / ___/ __ \/ / / / __/ _ \
airbyte-server      |  / ___ |/ / /  / /_/ / /_/ / /_/  __/
airbyte-server      | /_/  |_/_/_/  /_.___/\__, /\__/\___/
airbyte-server      |                     /____/
airbyte-server      | --------------------------------------
airbyte-server      |  Now ready at http://localhost:8000/
airbyte-server      | --------------------------------------
airbyte-server      | Version: 0.35.60-alpha
airbyte-server      |
airbyte-server      | #
airbyte-server      | # A fatal error has been detected by the Java Runtime Environment:
airbyte-server      | #
airbyte-server      | #  SIGSEGV (0xb) at pc=0x00000040132256a0, pid=1, tid=87
airbyte-server      | #
airbyte-server      | # JRE version: OpenJDK Runtime Environment (17.0.1+12) (build 17.0.1+12-39)
airbyte-server      | # Java VM: OpenJDK 64-Bit Server VM (17.0.1+12-39, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
airbyte-server      | # Problematic frame:
airbyte-server      | # J 5389 c1 com.ibm.icu.text.UnicodeSet.checkFrozen()V (19 bytes) @ 0x00000040132256a0 [0x00000040132255e0+0x00000000000000c0]
airbyte-server      | #
airbyte-server      | # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
airbyte-server      | #
airbyte-server      | # An error report file with more information is saved as:
airbyte-server      | # /app/hs_err_pid1.log
airbyte-server      | #
airbyte-server      | # If you would like to submit a bug report, please visit:
airbyte-server      | #   https://bugreport.java.com/bugreport/crash.jsp
airbyte-server      | #
airbyte-server      | qemu: uncaught target signal 6 (Aborted) - core dumped

@harshitasingh1612
Copy link

harshitasingh1612 commented Apr 13, 2022

@evantahler Facing the same issue in Airbyte while trying to run a sample dataset using File connector on M1 Macbook Pro.Tried the workaround but still the same.
I am using Rancher Desktop as Docker in my project.

at java.lang.ProcessBuilder.start(ProcessBuilder.java:1073) ~[?:?]
at io.airbyte.workers.process.DockerProcessFactory.checkImageExists(DockerProcessFactory.java:174) ~[io.airbyte-airbyte-workers-0.35.66-alpha.jar:?]
at io.airbyte.workers.process.DockerProcessFactory.create(DockerProcessFactory.java:94) ~[io.airbyte-airbyte-workers-0.35.66-alpha.jar:?]
at io.airbyte.workers.process.AirbyteIntegrationLauncher.check(AirbyteIntegrationLauncher.java:58) ~[io.airbyte-airbyte-workers-0.35.66-alpha.jar:?]
at io.airbyte.workers.DefaultCheckConnectionWorker.run(DefaultCheckConnectionWorker.java:53) ~[io.airbyte-airbyte-workers-0.35.66-alpha.jar:?]
at io.airbyte.workers.DefaultCheckConnectionWorker.run(DefaultCheckConnectionWorker.java:27) ~[io.airbyte-airbyte-workers-0.35.66-alpha.jar:?]
at io.airbyte.workers.temporal.TemporalAttemptExecution.lambda$getWorkerThread$2(TemporalAttemptExecution.java:155) ~[io.airbyte-airbyte-workers-0.35.66-alpha.jar:?]
... 1 more

Caused by: java.io.IOException: error=0, Failed to exec spawn helper: pid: 147, exit value: 1
at java.lang.ProcessImpl.forkAndExec(Native Method) ~[?:?]
at java.lang.ProcessImpl.(ProcessImpl.java:314) ~[?:?]
at java.lang.ProcessImpl.start(ProcessImpl.java:244) ~[?:?]
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1110) ~[?:?]
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1073) ~[?:?]
at io.airbyte.workers.process.DockerProcessFactory.checkImageExists(DockerProcessFactory.java:174) ~[io.airbyte-airbyte-workers-0.35.66-alpha.jar:?]
at io.airbyte.workers.process.DockerProcessFactory.create(DockerProcessFactory.java:94) ~[io.airbyte-airbyte-workers-0.35.66-alpha.jar:?]
at io.airbyte.workers.process.AirbyteIntegrationLauncher.check(AirbyteIntegrationLauncher.java:58) ~[io.airbyte-airbyte-workers-0.35.66-alpha.jar:?]
at io.airbyte.workers.DefaultCheckConnectionWorker.run(DefaultCheckConnectionWorker.java:53) ~[io.airbyte-airbyte-workers-0.35.66-alpha.jar:?]
at io.airbyte.workers.DefaultCheckConnectionWorker.run(DefaultCheckConnectionWorker.java:27) ~[io.airbyte-airbyte-workers-0.35.66-alpha.jar:?]
at io.airbyte.workers.temporal.TemporalAttemptExecution.lambda$getWorkerThread$2(TemporalAttemptExecution.java:155) ~[io.airbyte-airbyte-workers-0.35.66-alpha.jar:?]

@shubhransh-locale
Copy link

I am trying to create simple source and destination
Sources: Mysql, Pokimon API
Destination: Local CSV
always getting following error
i.a.c.i.LineGobbler(voidCall):82 - WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

Is there a way to fix this?

@tovbinm
Copy link

tovbinm commented Apr 22, 2022

Is there an ETA on this?

@Inventrohyder
Copy link

For me AirByte builds on an M1 and I don’t get any errors

however it doesn’t connect to any source or destination successfully

@tovbinm
Copy link

tovbinm commented May 11, 2022

In the meantime, we compiled and published Airbyte containers for Apple M1 chips on farosai org on DockerHub. E.g. airbyte/init was published under farosai/airbyte-init and the same convention for all other Airbyte service containers.

It would be great to see the official images published as well though.

@davinchia
Copy link
Contributor

davinchia commented May 12, 2022

HI all, we've started publishing official ARM images as of 0.38.2-alpha. A proper announcement will go out soon. This means it is now possible to run Airbyte on ARM laptops without any additional work.

Connector support is still spotty. @evantahler and @sherifnada are working on publishing ARM connector images.

In the mean time, one way around this is to build the relevant connector images locally (so it's an ARM architecture) and update the connector image tag on the UI. Airbyte will run off the local connector and thus use the right architecture. Thanks for the patience!

@evantahler
Copy link
Contributor

evantahler commented May 26, 2022

With #13004, we now have the plumbing in place to start releasing connectors for multiple platforms (e.g. M1 Macs). Going forward, we will release connectors for multiple architectures!

@erikcw
Copy link

erikcw commented Jun 1, 2022

Looks like alpine/socat:1.7.4.1-r1 (source-s3-check) needs to be updated to version 1.7.4.3-r0 for arm support.

@davinchia
Copy link
Contributor

@erikcw socat was updated in #13411.

I tested this locally on an M1 laptop and was able to run a sync using the source-s3.

Screenshot 2022-06-02 at 5 12 28 PM

@davinchia
Copy link
Contributor

I am going to close this issue since the core Airbyte platform now supports M1. Note that though we've the default connector publishing now publishes M1 images, not all connectors have M1 images published yet. Our approach is to greedily publish M1-compatible connector images as connectors are updated.

Please open a new issue for M1 specific connector image or any suspected M1-specific bugs. Thanks again for the patience everyone!

@void666
Copy link

void666 commented Sep 21, 2022

@davinchia Is there a list of connectors that we can refer to, which have M1 images published?

I am going to close this issue since the core Airbyte platform now supports M1. Note that though we've the default connector publishing now publishes M1 images, not all connectors have M1 images published yet. Our approach is to greedily publish M1-compatible connector images as connectors are updated.

Please open a new issue for M1 specific connector image or any suspected M1-specific bugs. Thanks again for the patience everyone!

@evantahler
Copy link
Contributor

@void666 we don't have a list at the moment, but if you are curious you can look on dockerhub and check for the linux/arm64 build architecture. It's safe to assume that most connectors in the Generally Available release stage have been re-published with M1 support by now.

Screen Shot 2022-09-22 at 9 03 31 AM

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

Successfully merging a pull request may close this issue.