0

我想使用启用了 KPL/KCL 的 Spring Cloud Stream kinesis binder。但是,当我通过使用kpl-kcl-enabled: true以下错误启用它时,不断出现:

com.amazonaws.services.kinesis.producer.IrrecoverableError: Error starting child process at 

com.amazonaws.services.kinesis.producer.Daemon.fatalError(Daemon.java:537) at 
com.amazonaws.services.kinesis.producer.Daemon.startChildProcess(Daemon.java:468) at 
com.amazonaws.services.kinesis.producer.Daemon.access$100(Daemon.java:63) at 
com.amazonaws.services.kinesis.producer.Daemon$1.run(Daemon.java:133) at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at 
java.lang.Thread.run(Thread.java:748) 
Caused by: java.io.IOException: Cannot run program "/tmp/amazon-kinesis-producer-native-

binaries/kinesis_producer_685427917724EC847D7D65F261E7040F3FCCB039": error=2, No such file or directory 
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at
com.amazonaws.services.kinesis.producer.Daemon.startChildProcess(Daemon.java:466) ... 5 common frames omitted Caused by: java.io.IOException: error=2, No such file or directory at
java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:247) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at
java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 6 common frames omitted

经过多次尝试重新启动它后,它会抛出内存不足异常:

Exception in thread "kpl-daemon-0000" java.lang.OutOfMemoryError: Java heap space
    at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
    at java.nio.ByteBuffer.allocate(ByteBuffer.java:335)
    at com.amazonaws.services.kinesis.producer.Daemon.<init>(Daemon.java:95)
    at com.amazonaws.services.kinesis.producer.KinesisProducer$MessageHandler.onError(KinesisProducer.java:168)
    at com.amazonaws.services.kinesis.producer.Daemon.fatalError(Daemon.java:537)
    at com.amazonaws.services.kinesis.producer.Daemon.startChildProcess(Daemon.java:468)
    at com.amazonaws.services.kinesis.producer.Daemon.access$100(Daemon.java:63)
    at com.amazonaws.services.kinesis.producer.Daemon$1.run(Daemon.java:133)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
4

1 回答 1

0

KPL 期望 2.5 或更高版本的 glibc 在您的 Linux 版本中可用。 openjdk:8-jdk-alpinedocker image 没有提供。

您需要使用不同的 docker 镜像,例如:openjdk:8-jdk-slim已经安装了 jdk 和 glibc,或者frolvlad/alpine-glibc对于带有 glibc 的 alpine 镜像。

于 2021-10-21T15:22:59.870 回答