UnsatisfiedLinkError: /tmp/snappy-1.1.4-libsnappyjava.so Error loading shared library ld-linux-x86-64.so.2: No such file or directory

后端 未结 5 895
天命终不由人
天命终不由人 2020-12-09 02:51

I am trying to run a Kafka Streams application in kubernetes. When I launch the pod I get the following exception:

Exception in thread \"streams-pipe-e19c2d9         


        
5条回答
  •  难免孤独
    2020-12-09 03:40

    I have implemented a docker image with which I run a Spring Boot microservice with a Kafka Strean Topology working perfectly.

    Here I share the Dockerfile file.

    FROM openjdk:8-jdk-alpine
    # Add Maintainer Info
    LABEL description="Spring Boot Kafka Stream IoT Processor"
    # Args for image
    ARG PORT=8080
    
    RUN apk update && apk upgrade && apk add --no-cache gcompat
    RUN ln -s /bin/bash /usr/bin
    RUN mkdir -p /usr/src/app
    WORKDIR /usr/src/app
    
    
    COPY resources/wait-for-it.sh  wait-for-it.sh
    COPY target/iot_processor.jar app.jar
    
    RUN dos2unix wait-for-it.sh
    RUN chmod +x wait-for-it.sh
    RUN uname -a
    RUN pwd
    RUN ls -al
    
    EXPOSE ${PORT}
    
    CMD ["sh", "-c", "echo 'waiting for 300 seconds for kafka:9092 to be accessable before 
    starting application' && ./wait-for-it.sh -t 300 kafka:9092 -- java -jar app.jar"]
    

    Hope it can help someone

提交回复
热议问题