Details
-
Bug
-
Status: In Progress
-
Minor
-
Resolution: Unresolved
-
2.1.1
-
None
-
None
Description
Kafka broker crashes with below exception while deleting the segments
Exception thrown:
The process cannot access the file because it is being used by another process.
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:387)
at sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:287)
at java.nio.file.Files.move(Files.java:1395)
at org.apache.kafka.common.utils.Utils.atomicMoveWithFallback(Utils.java:809)
at kafka.log.AbstractIndex.renameTo(AbstractIndex.scala:205)
at kafka.log.LogSegment.changeFileSuffixes(LogSegment.scala:489)
at kafka.log.Log.asyncDeleteSegment(Log.scala:1907)
at kafka.log.Log.deleteSegment(Log.scala:1892)
at kafka.log.Log.$anonfun$deleteSegments$3(Log.scala:1438)
at kafka.log.Log.$anonfun$deleteSegments$3$adapted(Log.scala:1438)
at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:58)
at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:51)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
at kafka.log.Log.$anonfun$deleteSegments$2(Log.scala:1438)
at scala.runtime.java8.JFunction0$mcI$sp.apply(JFunction0$mcI$sp.java:12)
at kafka.log.Log.maybeHandleIOException(Log.scala:1996)
at kafka.log.Log.deleteSegments(Log.scala:1429)
at kafka.log.Log.deleteOldSegments(Log.scala:1424)
at kafka.log.Log.deleteRetentionMsBreachedSegments(Log.scala:1502)
at kafka.log.Log.deleteOldSegments(Log.scala:1492)
at kafka.log.LogManager.$anonfun$cleanupLogs$3(LogManager.scala:898)
at kafka.log.LogManager.$anonfun$cleanupLogs$3$adapted(LogManager.scala:895)
at scala.collection.immutable.List.foreach(List.scala:388)
at kafka.log.LogManager.cleanupLogs(LogManager.scala:895)
at kafka.log.LogManager.$anonfun$startup$2(LogManager.scala:395)
at kafka.utils.KafkaScheduler.$anonfun$schedule$2(KafkaScheduler.scala:114)
at kafka.utils.CoreUtils$$anon$1.run(CoreUtils.scala:63)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
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)
Suppressed: java.nio.file.FileSystemException: C:\Users\Documents\Kafka-runner\kafka\bin\windows\UsersDocumentsKafka-runnerkafkakafka-logs\test-9\00000000000000000000.index -> C:\Users\Documents\Kafka-runner\kafka\bin\windows\UsersDocumentsKafka-runnerkafkakafka-logs\test-9\00000000000000000000.index.deleted: The process cannot access the file because it is being used by another process.
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:301)
at sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:287)
at java.nio.file.Files.move(Files.java:1395)
at org.apache.kafka.common.utils.Utils.atomicMoveWithFallback(Utils.java:806)
... 30 more
[2019-03-12 12:14:12,830] INFO [ReplicaManager broker=0] Stopping serving replicas in dir
Attachments
Attachments
Issue Links
- relates to
-
KAFKA-9458 Kafka crashed in windows environment
- Patch Available