You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "A. Sophie Blee-Goldman (Jira)" <ji...@apache.org> on 2021/02/25 00:31:00 UTC

[jira] [Resolved] (KAFKA-12211) NoSuchFileException will be thrown if hasPersistentStores is false when creating stateDir

     [ https://issues.apache.org/jira/browse/KAFKA-12211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

A. Sophie Blee-Goldman resolved KAFKA-12211.
--------------------------------------------
    Resolution: Fixed

> NoSuchFileException will be thrown if hasPersistentStores is false when creating stateDir
> -----------------------------------------------------------------------------------------
>
>                 Key: KAFKA-12211
>                 URL: https://issues.apache.org/jira/browse/KAFKA-12211
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 2.7.0, 2.6.1
>            Reporter: Luke Chen
>            Assignee: Luke Chen
>            Priority: Minor
>             Fix For: 2.8.0, 2.7.1, 2.6.2
>
>
> We improved the state directory folder/file permission setting in KAFKA-10705. But we forgot to consider one situation: if user doesn't have PersistentStores, we won't need to create base dir and state dir. And if there's no such dir/file, and we tried to set permission to them, we'll have *NoSuchFileException*
>  
> {code:java}
> ERROR Error changing permissions for the state or base directory /var/folders/4l/393lkmzx3zvftwynjngzdsfw0000gn/T/kafka-11254487964259813330/appId_AdjustStreamThreadCountTestshouldAddStreamThread  (org.apache.kafka.streams.processor.internals.StateDirectory:117)
> 2021-01-15T16:10:44.570+0800 [DEBUG] [TestEventLogger]     java.nio.file.NoSuchFileException: /var/folders/4l/393lkmzx3zvftwynjngzdsfw0000gn/T/kafka-11254487964259813330/appId_AdjustStreamThreadCountTestshouldAddStreamThread
> 2021-01-15T16:10:44.570+0800 [DEBUG] [TestEventLogger]          at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
> 2021-01-15T16:10:44.570+0800 [DEBUG] [TestEventLogger]          at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
> 2021-01-15T16:10:44.570+0800 [DEBUG] [TestEventLogger]          at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
> 2021-01-15T16:10:44.570+0800 [DEBUG] [TestEventLogger]          at java.base/sun.nio.fs.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:254)
> 2021-01-15T16:10:44.570+0800 [DEBUG] [TestEventLogger]          at java.base/sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:276)
> 2021-01-15T16:10:44.570+0800 [DEBUG] [TestEventLogger]          at java.base/java.nio.file.Files.setPosixFilePermissions(Files.java:2079)
> 2021-01-15T16:10:44.570+0800 [DEBUG] [TestEventLogger]          at org.apache.kafka.streams.processor.internals.StateDirectory.<init>(StateDirectory.java:115)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)