Debezium error : yum: command not found returned a non-zero code: 127

600 views
Skip to first unread message

Hernaldo A González

unread,
Mar 9, 2022, 3:55:24 PM3/9/22
to debezium
Help. I'm Stuck with Debezium and Oracle. I'm following the next tutorial


I'm using Oracle 19 local (deploy as docker)
telnet localhost 1521and respond ok

I have folder: "debezium-with-oracle-jdbc" And Dockerfile inside

I'm using Red Hat Enterprise Linux 7.9

I run as root:

export DEBEZIUM_VERSION=1.8
docker-compose -f docker-compose-oracle.yaml up --build

but I see the error

# docker-compose -f docker-compose-oracle.yaml up --build
Building connect
Step 1/10 : ARG DEBEZIUM_VERSION
Step 2/10 : FROM quay.io/debezium/connect:$DEBEZIUM_VERSION
 ---> be7153d27ef8
Step 3/10 : ENV KAFKA_CONNECT_JDBC_DIR=$KAFKA_CONNECT_PLUGINS_DIR/kafka-connect-jdbc
 ---> Using cache
 ---> 4e35e11f69d3
Step 4/10 : ENV INSTANT_CLIENT_DIR=/instant_client/
 ---> Using cache
 ---> 5f143de9b531
Step 5/10 : USER root
 ---> Using cache
 ---> 16eea76de0b3
Step 6/10 : RUN yum -y install libaio && yum clean all
 ---> Running in 58a06e8ad10f
/bin/sh: line 1: yum: command not found
ERROR: Service 'connect' failed to build: The command '/bin/sh -c yum -y install libaio && yum clean all' returned a non-zero code: 127


My Dockerfile:

ARG DEBEZIUM_VERSION
FROM quay.io/debezium/connect:$DEBEZIUM_VERSION
ENV KAFKA_CONNECT_JDBC_DIR=$KAFKA_CONNECT_PLUGINS_DIR/kafka-connect-jdbc
ENV INSTANT_CLIENT_DIR=/instant_client/

USER root
RUN yum -y install libaio && yum clean all

USER kafka
# Deploy Oracle client and drivers

COPY oracle_instantclient/* $INSTANT_CLIENT_DIR
COPY oracle_instantclient/xstreams.jar /kafka/libs
COPY oracle_instantclient/ojdbc8.jar /kafka/libs


My docker-compose-oracle.yaml is:

version: '2'
services:
  zookeeper:
    image: quay.io/debezium/zookeeper:${DEBEZIUM_VERSION}
    ports:
     - 2181:2181
     - 2888:2888
     - 3888:3888
  kafka:
    image: quay.io/debezium/kafka:${DEBEZIUM_VERSION}
    ports:
     - 9092:9092
    links:
     - zookeeper
    environment:
     - ZOOKEEPER_CONNECT=zookeeper:2181
  connect:
    image: debezium/connect-with-oracle-jdbc:${DEBEZIUM_VERSION}
    build:
      context: debezium-with-oracle-jdbc
      args:
        DEBEZIUM_VERSION: ${DEBEZIUM_VERSION}
    ports:
     - 8083:8083
     - 5005:5005
    links:
     - kafka
    environment:
     - BOOTSTRAP_SERVERS=kafka:9092
     - GROUP_ID=1
     - CONFIG_STORAGE_TOPIC=my_connect_configs
     - OFFSET_STORAGE_TOPIC=my_connect_offsets
     - STATUS_STORAGE_TOPIC=my_connect_statuses
     - LD_LIBRARY_PATH=/instant_client
     - KAFKA_DEBUG=true
     - DEBUG_SUSPEND_FLAG=n
     - JAVA_DEBUG_PORT=0.0.0.0:5005


Regards!

Vojtech Juranek

unread,
Mar 10, 2022, 1:23:41 AM3/10/22
to debe...@googlegroups.com
Hi,


> */bin/sh: line 1: yum: command not foundERROR: Service 'connect' failed to
> build: The command '/bin/sh -c yum -y install libaio && yum clean all'
> returned a non-zero code: 127*
>
> My Dockerfile:
>
> ARG DEBEZIUM_VERSION
> FROM quay.io/debezium/connect:$DEBEZIUM_VERSION
> ENV KAFKA_CONNECT_JDBC_DIR=$KAFKA_CONNECT_PLUGINS_DIR/kafka-connect-jdbc
> ENV INSTANT_CLIENT_DIR=/instant_client/
>
> USER root
> RUN yum -y install libaio && yum clean all

the docker image is based on fedora-minimal, which doesn't have dnf/yum
install. If you need to install something, you have to use `microdnf` command.
However, there's no need to install libaio, it's already there:

[kafka@0a0dc118e65e ~]$ rpm -q libaio
libaio-0.3.111-11.fc34.x86_64

Vojta
signature.asc

Hernaldo A González

unread,
Mar 10, 2022, 2:20:14 PM3/10/22
to debezium
thanks!
Reply all
Reply to author
Forward
0 new messages