Run kafka on arm architecture #4121
Replies: 6 comments 9 replies
-
I honestly do not know what the error means. But I do not think you should need to build the JARs for ARM in some ARM container. It is Java, so it does not build into native code. You just need to build the container images for Arm. In master, you can do this using |
Beta Was this translation helpful? Give feedback.
-
I have built an arm image on an arm architecture machine, can I contribute to the community? We go through some regular functional tests |
Beta Was this translation helpful? Give feedback.
-
The following error occurred after building the image operator pod log [root@hudi-arm-master-0001 cluster-operator]# kubectl -n kafka logs strimzi-cluster-operator-795d5d685c-kdsjk
+ shift
+ export MALLOC_ARENA_MAX=2
+ MALLOC_ARENA_MAX=2
+ JAVA_OPTS=' -Dvertx.cacheDirBase=/tmp -Djava.security.egd=file:/dev/./urandom'
++ get_gc_opts
++ '[' '' == true ']'
++ echo ''
+ JAVA_OPTS=' -Dvertx.cacheDirBase=/tmp -Djava.security.egd=file:/dev/./urandom '
+ exec /usr/bin/tini -w -e 143 -- java -Dvertx.cacheDirBase=/tmp -Djava.security.egd=file:/dev/./urandom -classpath lib/io.strimzi.cluster-operator-0.18.0.jar:lib/io.prometheus.simpleclient_common-0.7.0.jar:lib/io.strimzi.kafka-oauth-client-0.5.0.jar:lib/io.netty.netty-handler-4.1.45.Final.jar:lib/io.netty.netty-codec-http-4.1.45.Final.jar:lib/org.quartz-scheduler.quartz-2.2.1.jar:lib/org.bouncycastle.bcprov-jdk15on-1.60.jar:lib/com.squareup.okio.okio-1.15.0.jar:lib/org.keycloak.keycloak-core-10.0.0.jar:lib/io.netty.netty-buffer-4.1.45.Final.jar:lib/org.yaml.snakeyaml-1.24.jar:lib/io.fabric8.openshift-client-4.6.4.jar:lib/io.netty.netty-common-4.1.45.Final.jar:lib/org.apache.logging.log4j.log4j-api-2.13.0.jar:lib/org.xerial.snappy.snappy-java-1.1.7.3.jar:lib/org.hdrhistogram.HdrHistogram-2.1.11.jar:lib/io.prometheus.simpleclient-0.7.0.jar:lib/com.sun.activation.jakarta.activation-1.2.1.jar:lib/org.apache.yetus.audience-annotations-0.5.0.jar:lib/com.fasterxml.jackson.dataformat.jackson-dataformat-yaml-2.10.2.jar:lib/io.micrometer.micrometer-core-1.3.1.jar:lib/io.netty.netty-codec-4.1.45.Final.jar:lib/org.keycloak.keycloak-common-10.0.0.jar:lib/jakarta.activation.jakarta.activation-api-1.2.1.jar:lib/io.vertx.vertx-core-3.8.5.jar:lib/io.strimzi.certificate-manager-0.18.0.jar:lib/io.strimzi.kafka-oauth-common-0.5.0.jar:lib/io.strimzi.kafka-oauth-server-0.5.0.jar:lib/io.netty.netty-codec-dns-4.1.45.Final.jar:lib/io.fabric8.kubernetes-model-4.6.4.jar:lib/io.netty.netty-codec-socks-4.1.45.Final.jar:lib/com.github.mifmif.generex-1.0.2.jar:lib/io.netty.netty-resolver-4.1.45.Final.jar:lib/com.github.luben.zstd-jni-1.4.4-7.jar:lib/io.netty.netty-handler-proxy-4.1.45.Final.jar:lib/com.squareup.okhttp3.logging-interceptor-3.12.6.jar:lib/io.strimzi.operator-common-0.18.0.jar:lib/org.bouncycastle.bcpkix-jdk15on-1.62.jar:lib/org.lz4.lz4-java-1.7.1.jar:lib/io.netty.netty-transport-native-epoll-4.1.45.Final-linux-x86_64.jar:lib/io.netty.netty-transport-native-unix-common-4.1.45.Final.jar:lib/dk.brics.automaton.automaton-1.11-8.jar:lib/io.vertx.vertx-micrometer-metrics-3.8.5.jar:lib/org.apache.kafka.kafka-clients-2.5.0.jar:lib/com.fasterxml.jackson.core.jackson-core-2.10.2.jar:lib/org.apache.zookeeper.zookeeper-jute-3.5.7.jar:lib/io.netty.netty-transport-4.1.45.Final.jar:lib/io.netty.netty-transport-native-epoll-4.1.45.Final.jar:lib/jakarta.xml.bind.jakarta.xml.bind-api-2.3.2.jar:lib/org.apache.logging.log4j.log4j-slf4j-impl-2.13.0.jar:lib/com.fasterxml.jackson.core.jackson-annotations-2.10.2.jar:lib/io.fabric8.zjsonpatch-0.3.0.jar:lib/org.apache.zookeeper.zookeeper-3.5.7.jar:lib/io.strimzi.api-0.18.0.jar:lib/io.fabric8.kubernetes-client-4.6.4.jar:lib/com.fasterxml.jackson.module.jackson-module-jaxb-annotations-2.10.2.jar:lib/com.squareup.okhttp3.okhttp-3.12.6.jar:lib/io.netty.netty-codec-http2-4.1.45.Final.jar:lib/io.strimzi.config-model-0.18.0.jar:lib/org.apache.logging.log4j.log4j-core-2.13.0.jar:lib/io.fabric8.kubernetes-model-common-4.6.4.jar:lib/com.fasterxml.jackson.core.jackson-databind-2.10.2.jar:lib/io.strimzi.crd-annotations-0.18.0.jar:lib/io.netty.netty-resolver-dns-4.1.45.Final.jar:lib/org.slf4j.slf4j-api-1.7.25.jar:lib/org.latencyutils.LatencyUtils-2.0.3.jar:lib/io.micrometer.micrometer-registry-prometheus-1.3.1.jar io.strimzi.operator.cluster.Main
[FATAL tini (7)] exec java failed: No such file or directory
[root@hudi-arm-master-0001 cluster-operator]#
Error message when running the container directly [root@hudi-arm-master-0001 cluster-operator]# docker run --rm -ti harbor-b.alauda.cn/tdsql/kafka/operator:0.18.0 bash
[strimzi@40160969a08e strimzi]$ cd /opt/strimzi
[strimzi@40160969a08e strimzi]$ ls
bin lib
[strimzi@40160969a08e strimzi]$ cd bin
[strimzi@40160969a08e bin]$ ls
cluster_operator_run.sh kafka_init_run.sh launch_java.sh tls_prepare_certificates.sh topic_operator_run.sh user_operator_run.sh
[strimzi@40160969a08e bin]$ ./launch_java.sh
+ shift
+ export MALLOC_ARENA_MAX=2
+ MALLOC_ARENA_MAX=2
+ JAVA_OPTS=' -Dvertx.cacheDirBase=/tmp -Djava.security.egd=file:/dev/./urandom'
++ get_gc_opts
++ '[' '' == true ']'
++ echo ''
+ JAVA_OPTS=' -Dvertx.cacheDirBase=/tmp -Djava.security.egd=file:/dev/./urandom '
+ exec /usr/bin/tini -w -e 143 -- java -Dvertx.cacheDirBase=/tmp -Djava.security.egd=file:/dev/./urandom -classpath
[WARN tini (20)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
[FATAL tini (22)] exec java failed: No such file or directory
[strimzi@40160969a08e bin]$
Have you encountered this kind of problem, or how should I debug |
Beta Was this translation helpful? Give feedback.
-
I think there are two ways to support arm64 architecture. Respectively are: one: $ docker build --platform linux/arm64 --build-arg TARGETPLATFORM=linux/arm64 --build-arg strimzi_version=0.18.0 -t strimzi/operator:arm64-0.18.0 ./
$ docker build --platform linux/amd64 --build-arg TARGETPLATFORM=linux/amd64 --build-arg strimzi_version=0.18.0 -t strimzi/operator:amd64-0.18.0 ./
$ docker manifest create --amend strimzi/operator:0.18.0 strimzi/operator:amd64-0.18.0 strimzi/operator:arm64-0.18.0
two: $ docker buildx build --platform linux/amd64,linux/arm64 -t strimzi/operator:0.18.0 --push .
At present, I have used the first method to build a mirror image of the two architectures, of course on our own pipeline. I would like to ask the community which method will be adopted if it builds a multi-architecture mirror? |
Beta Was this translation helpful? Give feedback.
-
@lanzhiwang Hope you are doing well. As you are running Apache Kafka on arm (probably raspberry pi). Could you tell us more about your architecture? Is it where
I have the first scenario and facing some difficulties. Any help is really appreciated :) |
Beta Was this translation helpful? Give feedback.
-
Our scenario is not as complicated as this, and ARM devices are just some cloud hosts. We build an arm image, deploy k8s on the cloud host, and run operator and kafka directly in k8s. |
Beta Was this translation helpful? Give feedback.
-
I want run strimzi kafka operator and kafka on arm architecture. I package the jar package in the docker container.
I use
maven:3-jdk-8-alpine
as the base image.The java and maven versions in the maven:3-jdk-8-alpine mirror are:
I added some configuration in pom.xml and api/pom.xml
I compiled the source code of version 0.18.0
dockerfile:
An error occurred when packaging the api module
Do I need to do any special configuration?
Packaging directly on the virtual machine is successful, but not in the container。
Beta Was this translation helpful? Give feedback.
All reactions