title: Cannot start Kafka because of log file used by another process?
body: <p>I downloaded Kafka and run it on my local Windows for testing/development. It worked for a couple of days and now it gets the following error. I tried to use process explorer and the file is not used by any process except the time when Kafka is starting (java.exe).</p>
  
  <blockquote>
    <p>java.nio.file.FileSystemException: C:\tools\kafka_2.12-1.1.0\kafka-logs\my-replicated-topic-0\00000000000000000000.log -> C:\tools\kafka_2.12-1.1.0\kafka-logs\my-replicated-topic-0\00000000000000000000.log.deleted: The process cannot access the file because it is being used by another process.</p>
  </blockquote>
  
  <pre>
  [2018-05-14 11:25:35,965] INFO [GroupMetadataManager brokerId=0] Finished loading offsets and group metadata from __consumer_offsets-48 in 0 milliseconds. (kafka.coordinator.group.GroupMetadataManager)
  [2018-05-14 11:26:04,864] INFO [Log partition=my-replicated-topic-0, dir=C:\tools\kafka_2.12-1.1.0\kafka-logs] Found deletable segments with base offsets [0] due to retention time 604800000ms breach (kafka.log.Log)
  [2018-05-14 11:26:04,869] INFO [Log partition=my-replicated-topic-0, dir=C:\tools\kafka_2.12-1.1.0\kafka-logs] Scheduling log segment [baseOffset 0, size 150] for deletion. (kafka.log.Log)
  [2018-05-14 11:26:04,882] ERROR Error while deleting segments for my-replicated-topic-0 in dir C:\tools\kafka_2.12-1.1.0\kafka-logs (kafka.server.LogDirFailureChannel)
  java.nio.file.FileSystemException: C:\tools\kafka_2.12-1.1.0\kafka-logs\my-replicated-topic-0\00000000000000000000.log -> C:\tools\kafka_2.12-1.1.0\kafka-logs\my-replicated-topic-0\00000000000000000000.log.deleted: The process cannot access the file because it is being used by another process.
  </pre>