awslabs / kinesis-kafka-connector

kinesis-kafka-connector is connector based on Kafka Connect to publish messages to Amazon Kinesis streams or Amazon Kinesis Firehose.
Apache License 2.0
153 stars 91 forks source link

SEVERE: RuntimeException while executing runnable com.google.common.util.concurrent.Futures$6@66177362 with executor INSTANCE org.apache.kafka.connect.errors.DataException: Exception during Kinesis put at com.amazon.kinesis.kafka.AmazonKinesisSinkTask$1.onFailure(AmazonKinesisSinkTask.java:60) #8

Closed jameyuan closed 7 years ago

jameyuan commented 7 years ago

Hello, dears

We met a problem while run Kinesis-kafka-connector, the error information is below:

==================== Error Log ===================== Sep 18, 2017 3:50:11 PM com.google.common.util.concurrent.ExecutionList executeListener SEVERE: RuntimeException while executing runnable com.google.common.util.concurrent.Futures$6@66177362 with executor INSTANCE org.apache.kafka.connect.errors.DataException: Exception during Kinesis put at com.amazon.kinesis.kafka.AmazonKinesisSinkTask$1.onFailure(AmazonKinesisSinkTask.java:60) at com.google.common.util.concurrent.Futures$6.run(Futures.java:1310) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:457) at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145) at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:202) at com.google.common.util.concurrent.SettableFuture.setException(SettableFuture.java:68) at com.amazonaws.services.kinesis.producer.KinesisProducer$MessageHandler$2.run(KinesisProducer.java:158) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: com.amazonaws.services.kinesis.producer.IrrecoverableError: Pipes did not show up after calling mkfifo at com.amazonaws.services.kinesis.producer.Daemon.fatalError(Daemon.java:520) at com.amazonaws.services.kinesis.producer.Daemon.fatalError(Daemon.java:492) at com.amazonaws.services.kinesis.producer.Daemon.createPipesUnix(Daemon.java:405) at com.amazonaws.services.kinesis.producer.Daemon.createPipes(Daemon.java:358) at com.amazonaws.services.kinesis.producer.Daemon.access$000(Daemon.java:62) at com.amazonaws.services.kinesis.producer.Daemon$1.run(Daemon.java:131)

We check the code and looks the error was caused by below KPL code: " Pipes did not show up after calling mkfifo":

private void createPipesUnix() {
    File dir = new File(this.workingDir);
    if (!dir.exists()) {
        dir.mkdirs();
    }

    do {
        inPipe = Paths.get(dir.getAbsolutePath(),
                "amz-aws-kpl-in-pipe-" + uuid8Chars()).toFile();
    } while (inPipe.exists());

    do {
        outPipe = Paths.get(dir.getAbsolutePath(),
                "amz-aws-kpl-out-pipe-" + uuid8Chars()).toFile();
    } while (outPipe.exists());

    try {
        Runtime.getRuntime().exec("mkfifo " + inPipe.getAbsolutePath() + " " + outPipe.getAbsolutePath());
    } catch (Exception e) {
        fatalError("Error creating pipes", e, false);
    }

    // The files apparently don't always show up immediately after the exec,
    // so we make sure they are there before proceeding
    long start = System.nanoTime();
    while (!inPipe.exists() || !outPipe.exists()) {
        try {
            Thread.sleep(10);
        } catch (InterruptedException e) { }
        if (System.nanoTime() - start > 15e9) {
            fatalError("Pipes did not show up after calling mkfifo", false);
        }
    }

}

jameyuan commented 7 years ago

This problem is fixed due to /tmp directory permissions. Thanks a lot!