EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB441447: Kafka could not be started due to " Failed to clean up log for __consumer_offsets" in MicroStrategy 10.x through MicroStrategy 2019 Update 1.


Community Admin

• Strategy


This article describes an Apache Kafka issue where the Kafka Server cannot be started on Windows. This issue is resolved in MicroStrategy 2019 Update 2.

Description 


In Strategy 10.x and later versions, the Apache Kafka (Telemetry Server) service cannot be started on Windows.

ka04W00000148CiQAI_0EM44000000Wf5A.png


Entries similar to those below are recorded in the Kafka server log in the Messaging Services folder: 

C:\Program Files (x86)\Strategy\Messaging Services\Kafka\kafka_2.11-1.1.0\logs\kafka\server.log 


[2018-07-27 13:57:01,177] INFO [ExpirationReaper-0-Fetch]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2018-07-27 13:57:01,369] ERROR Failed to clean up log for __consumer_offsets-39 in dir C:\Program Files (x86)\Strategy\Messaging Services\tmp\kafka-logs due to IOException (kafka.server.LogDirFailureChannel)
java.nio.file.FileSystemException: C:\Program Files (x86)\Strategy\Messaging Services\tmp\kafka-logs\__consumer_offsets-39\00000000000000000000.log.cleaned: 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.Cleaner.deleteCleanedFileIfExists$1(LogCleaner.scala:488)
at kafka.log.Cleaner.cleanSegments(LogCleaner.scala:493)
at kafka.log.Cleaner$$anonfun$doClean$4.apply(LogCleaner.scala:462)
at kafka.log.Cleaner$$anonfun$doClean$4.apply(LogCleaner.scala:461)
at scala.collection.immutable.List.foreach(List.scala:392)
at kafka.log.Cleaner.doClean(LogCleaner.scala:461)
at kafka.log.Cleaner.clean(LogCleaner.scala:438)
at kafka.log.LogCleaner$CleanerThread.cleanOrSleep(LogCleaner.scala:305)
at kafka.log.LogCleaner$CleanerThread.doWork(LogCleaner.scala:291)
at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:82)

 

Why is this happening? 


This is caused by a defect in Apache Kafka where the service crashes upon trying to clean up data files that have exceeded the retention policy. This crash can occur after the service has been running for some time, or on startup. The data files contain all data that has been received by the Telemetry Server (i.e. Platform Analytics Statistics and DSSErrors log contents) and by default are automatically cleaned up after 7 days. See the Apache website for more details of the Kafka issue.

Solution


This issue is resolved in Strategy 2019 Update 2. To take advantage of the fix, upgrade to Strategy 2019 Update 2 or later.
If you are on Strategy 2019 Update 2 and up, and experiencing file system errors with Kafka, please see KB484018.


Comment

0 comments

Details

Knowledge Article

Published:

August 2, 2018

Last Updated:

July 10, 2019