Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.0.0
-
None
-
None
-
RancherOS with NFS mounted for log directory
Description
Hello,
I encountered a error when I try to delete a topic with kafka version 1.0.0, the error is not present on version 0.10.2.1 which is the version I upgraded from.
I suspect that some other thread is still using that file while the Kafka is trying to delete that.
12/6/2017 3:37:32 PM[2017-12-06 21:37:32,846] ERROR Exception while deleting Log(/opt/kafka/logs/topicname-0.112ff11872e4411ca7470ba7e3026ab0-delete) in dir /opt/kafka/logs. (kafka.log.LogManager) 12/6/2017 3:37:32 PMorg.apache.kafka.common.errors.KafkaStorageException: Error while deleting log for topicname-0 in dir /opt/kafka/logs 12/6/2017 3:37:32 PMCaused by: java.nio.file.FileSystemException: /opt/kafka/logs/topicname-0.112ff11872e4411ca7470ba7e3026ab0-delete/.nfs0000000000e609f2000000ce: Device or resource busy 12/6/2017 3:37:32 PM at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) 12/6/2017 3:37:32 PM at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) 12/6/2017 3:37:32 PM at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) 12/6/2017 3:37:32 PM at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) 12/6/2017 3:37:32 PM at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) 12/6/2017 3:37:32 PM at java.nio.file.Files.delete(Files.java:1126) 12/6/2017 3:37:32 PM at org.apache.kafka.common.utils.Utils$1.visitFile(Utils.java:630) 12/6/2017 3:37:32 PM at org.apache.kafka.common.utils.Utils$1.visitFile(Utils.java:619) 12/6/2017 3:37:32 PM at java.nio.file.Files.walkFileTree(Files.java:2670) 12/6/2017 3:37:32 PM at java.nio.file.Files.walkFileTree(Files.java:2742) 12/6/2017 3:37:32 PM at org.apache.kafka.common.utils.Utils.delete(Utils.java:619) 12/6/2017 3:37:32 PM at kafka.log.Log.$anonfun$delete$2(Log.scala:1432) 12/6/2017 3:37:32 PM at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) 12/6/2017 3:37:32 PM at kafka.log.Log.maybeHandleIOException(Log.scala:1669) 12/6/2017 3:37:32 PM at kafka.log.Log.delete(Log.scala:1427) 12/6/2017 3:37:32 PM at kafka.log.LogManager.deleteLogs(LogManager.scala:626) 12/6/2017 3:37:32 PM at kafka.log.LogManager.$anonfun$startup$7(LogManager.scala:362) 12/6/2017 3:37:32 PM at kafka.utils.KafkaScheduler.$anonfun$schedule$2(KafkaScheduler.scala:110) 12/6/2017 3:37:32 PM at kafka.utils.CoreUtils$$anon$1.run(CoreUtils.scala:61) 12/6/2017 3:37:32 PM at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 12/6/2017 3:37:32 PM at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) 12/6/2017 3:37:32 PM at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) 12/6/2017 3:37:32 PM at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) 12/6/2017 3:37:32 PM at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 12/6/2017 3:37:32 PM at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 12/6/2017 3:37:32 PM at java.lang.Thread.run(Thread.java:748)
Then
12/6/2017 3:37:32 PM[2017-12-06 21:37:32,882] INFO Stopping serving logs in dir /opt/kafka/logs (kafka.log.LogManager) 12/6/2017 3:37:32 PM[2017-12-06 21:37:32,883] FATAL Shutdown broker because all log dirs in /opt/kafka/logs have failed (kafka.log.LogManager)