Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-12190

Failure on Windows due to an UnsupportedOperationException when StateDirectory sets file permissions

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.7.0, 2.6.1
    • Fix Version/s: 2.8.0, 2.7.1, 2.6.2
    • Component/s: streams
    • Labels:

      Description

      There appears to be a regression in Kafka 2.6.1 due to the changes made for KAFKA-10705 that causes a failure on Windows. After upgrading to 2.6.1 from 2.6.0, we're seeing failures in Spring Boot's CI on Windows such as the following:

      Caused by: java.lang.UnsupportedOperationException: (No message provided)    
              at java.nio.file.Files.setPosixFilePermissions(Files.java:2044)    
              at org.apache.kafka.streams.processor.internals.StateDirectory.<init>(StateDirectory.java:115)    
              at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:745)    
              at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:585)    
              at org.springframework.kafka.config.StreamsBuilderFactoryBean.start(StreamsBuilderFactoryBean.java:316)    
              at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178)    
              at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54)    
              at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356)    
              at java.lang.Iterable.forEach(Iterable.java:75)    
              at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155)    
              at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123)    
              at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:940)    
              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591)    
              at org.springframework.boot.test.context.runner.AbstractApplicationContextRunner.configureContext(AbstractApplicationContextRunner.java:447)    
              at org.springframework.boot.test.context.runner.AbstractApplicationContextRunner.createAndLoadContext(AbstractApplicationContextRunner.java:423)    
              at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.getContextOrStartupFailure(AssertProviderApplicationContextInvocationHandler.java:61)    
              at org.springframework.boot.test.context.assertj.AssertProviderApplicationContextInvocationHandler.<init>(AssertProviderApplicationContextInvocationHandler.java:48)    
              at org.springframework.boot.test.context.assertj.ApplicationContextAssertProvider.get(ApplicationContextAssertProvider.java:112)    
              at org.springframework.boot.test.context.runner.AbstractApplicationContextRunner.createAssertableContext(AbstractApplicationContextRunner.java:412)    
              at org.springframework.boot.test.context.runner.AbstractApplicationContextRunner.lambda$null$0(AbstractApplicationContextRunner.java:382)    
              at org.springframework.boot.test.util.TestPropertyValues.applyToSystemProperties(TestPropertyValues.java:175)    
              at org.springframework.boot.test.context.runner.AbstractApplicationContextRunner.lambda$run$1(AbstractApplicationContextRunner.java:381)    
              at org.springframework.boot.test.context.runner.AbstractApplicationContextRunner.withContextClassLoader(AbstractApplicationContextRunner.java:392)    
              at org.springframework.boot.test.context.runner.AbstractApplicationContextRunner.run(AbstractApplicationContextRunner.java:381)    
              at org.springframework.boot.actuate.autoconfigure.metrics.KafkaMetricsAutoConfigurationTests.whenKafkaStreamsIsEnabledAndThereIsNoMeterRegistryThenListenerCustomizationBacksOff(KafkaMetricsAutoConfigurationTests.java:92)
      

      The same code worked without changes using Kafka 2.6.0.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                awilkinson Andy Wilkinson
                Reporter:
                awilkinson Andy Wilkinson
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: