[ 
https://issues.apache.org/jira/browse/KAFKA-6200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17569923#comment-17569923
 ] 

Martin Pelak commented on KAFKA-6200:
-------------------------------------

Hi, if you are a Windows user, you can use a fix in [this pull 
request|https://github.com/apache/kafka/pull/12331].

> 00000000000000000015.timeindex:  The process cannot access the file because 
> it is being used by another process.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-6200
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6200
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: yassine bsf
>            Priority: Major
>              Labels: windows
>
> Hello , 
> I have a problem installing Kafka on  windows.
> I installed  kafka cluster of 3 instances in 3 differents servers (each 
> server contain one kafka and zookeeper )
> all work well, but when an instance kafka stop (or fail ) , when i try to 
> restart this instance .
> I have this error message:
> {code:java}
> [2017-11-10 15:17:53,999] INFO [ThrottledRequestReaper-Produce]: Starting 
> (kafka.server.ClientQuotaManager$ThrottledRequestReaper)
> [2017-11-10 15:17:53,999] INFO [ThrottledRequestReaper-Request]: Starting 
> (kafka.server.ClientQuotaManager$ThrottledRequestReaper)
> [2017-11-10 15:17:54,109] INFO Loading logs. (kafka.log.LogManager)
> [2017-11-10 15:17:54,171] WARN Found a corrupted index file due to 
> requirement failed: Corrupt index found, index file 
> (C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.ArchiveQueue-0\00000000000000000015.index)
>  has non-zero size but the last offset is 15 which is no larger than the base 
> offset 15.}. deleting 
> C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.ArchiveQueue-0\00000000000000000015.timeindex,
>  
> C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.ArchiveQueue-0\00000000000000000015.index,
>  and 
> C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.ArchiveQueue-0\00000000000000000015.txnindex
>  and rebuilding index... (kafka.log.Log)
> [2017-11-10 15:17:54,171] ERROR There was an error in one of the threads 
> during logs loading: java.nio.file.FileSystemException: 
> C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.ArchiveQueue-0\00000000000000000015.timeindex:
>  The process cannot access the file because it is being used by another 
> process.
>  (kafka.log.LogManager)
> [2017-11-10 15:17:54,171] FATAL [Kafka Server 1], Fatal error during 
> KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
> java.nio.file.FileSystemException: 
> C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.ArchiveQueue-0\00000000000000000015.timeindex:
>  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.WindowsException.rethrowAsIOException(WindowsException.java:102)
>       at 
> sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269)
>       at 
> sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108)
>       at java.nio.file.Files.deleteIfExists(Files.java:1165)
>       at kafka.log.Log$$anonfun$loadSegmentFiles$3.apply(Log.scala:318)
>       at kafka.log.Log$$anonfun$loadSegmentFiles$3.apply(Log.scala:279)
>       at 
> scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:733)
>       at 
> scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
>       at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
>       at 
> scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:732)
>       at kafka.log.Log.loadSegmentFiles(Log.scala:279)
>       at kafka.log.Log.loadSegments(Log.scala:383)
>       at kafka.log.Log.<init>(Log.scala:186)
>       at kafka.log.Log$.apply(Log.scala:1609)
>       at 
> kafka.log.LogManager$$anonfun$loadLogs$2$$anonfun$5$$anonfun$apply$12$$anonfun$apply$1.apply$mcV$sp(LogManager.scala:172)
>       at kafka.utils.CoreUtils$$anon$1.run(CoreUtils.scala:57)
>       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)
> [2017-11-10 15:17:54,187] INFO [Kafka Server 1], shutting down 
> (kafka.server.KafkaServer)
> [2017-11-10 15:17:54,187] WARN Found a corrupted index file due to 
> requirement failed: Corrupt index found, index file 
> (C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.JoinInfoQueue-0\00000000000000000000.index)
>  has non-zero size but the last offset is 0 which is no larger than the base 
> offset 0.}. deleting 
> C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.JoinInfoQueue-0\00000000000000000000.timeindex,
>  
> C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.JoinInfoQueue-0\00000000000000000000.index,
>  and 
> C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.JoinInfoQueue-0\00000000000000000000.txnindex
>  and rebuilding index... (kafka.log.Log)
> [2017-11-10 15:17:54,202] WARN Found a corrupted index file due to 
> requirement failed: Corrupt index found, index file 
> (C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.NodeInfoQueue-0\00000000000000000000.index)
>  has non-zero size but the last offset is 0 which is no larger than the base 
> offset 0.}. deleting 
> C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.NodeInfoQueue-0\00000000000000000000.timeindex,
>  
> C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.NodeInfoQueue-0\00000000000000000000.index,
>  and 
> C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.NodeInfoQueue-0\00000000000000000000.txnindex
>  and rebuilding index... (kafka.log.Log)
> [2017-11-10 15:17:54,202] WARN Found a corrupted index file due to 
> requirement failed: Corrupt index found, index file 
> (C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.NodeStatusQueue-0\00000000000000000000.index)
>  has non-zero size but the last offset is 0 which is no larger than the base 
> offset 0.}. deleting 
> C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.NodeStatusQueue-0\00000000000000000000.timeindex,
>  
> C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.NodeStatusQueue-0\00000000000000000000.index,
>  and 
> C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.NodeStatusQueue-0\00000000000000000000.txnindex
>  and rebuilding index... (kafka.log.Log)
> [2017-11-10 15:17:54,202] WARN Found a corrupted index file due to 
> requirement failed: Corrupt index found, index file 
> (C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.TimeSeriesQueue-0\00000000000000000014.index)
>  has non-zero size but the last offset is 14 which is no larger than the base 
> offset 14.}. deleting 
> C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.TimeSeriesQueue-0\00000000000000000014.timeindex,
>  
> C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.TimeSeriesQueue-0\00000000000000000014.index,
>  and 
> C:\Tools\Kafka\kafka-logs\hubone.dataCollect.orbiwise.TimeSeriesQueue-0\00000000000000000014.txnindex
>  and rebuilding index... (kafka.log.Log)
> [2017-11-10 15:17:54,187] INFO Terminate ZkClient event thread. 
> (org.I0Itec.zkclient.ZkEventThread)
> [2017-11-10 15:17:54,218] WARN Found a corrupted index file due to 
> requirement failed: Corrupt index found, index file 
> (C:\Tools\Kafka\kafka-logs\__consumer_offsets-0\00000000000000000000.index) 
> has non-zero size but the last offset is 0 which is no larger than the base 
> offset 0.}. deleting 
> C:\Tools\Kafka\kafka-logs\__consumer_offsets-0\00000000000000000000.timeindex,
>  C:\Tools\Kafka\kafka-logs\__consumer_offsets-0\00000000000000000000.index, 
> and 
> C:\Tools\Kafka\kafka-logs\__consumer_offsets-0\00000000000000000000.txnindex 
> and rebuilding index... (kafka.log.Log)
> {code}
> when i delete kafka-logs , the offsets are corrupted .
> could you help me to fix this problem ?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to