You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Colin P. McCabe (JIRA)" <ji...@apache.org> on 2017/06/08 21:25:18 UTC

[jira] [Commented] (KAFKA-3925) Default log.dir=/tmp/kafka-logs is unsafe

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

Colin P. McCabe commented on KAFKA-3925:
----------------------------------------

The issue with {{/var}} is that if you run Kafka as an ordinary user, you cannot write to this directory.  Perhaps we could write to {{$HOME/kafka-logs}}?  Although that would imply a different location for different users.

I also think a lot of unit tests rely on the {{/tmp}} location.

> Default log.dir=/tmp/kafka-logs is unsafe
> -----------------------------------------
>
>                 Key: KAFKA-3925
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3925
>             Project: Kafka
>          Issue Type: Bug
>          Components: config
>    Affects Versions: 0.10.0.0
>         Environment: Various, depends on OS and configuration
>            Reporter: Peter Davis
>
> Many operating systems are configured to delete files under /tmp.  For example Ubuntu has [tmpreaper|http://manpages.ubuntu.com/manpages/wily/man8/tmpreaper.8.html], others use tmpfs, others delete /tmp on startup. 
> Defaults are OK to make getting started easier but should not be unsafe (risking data loss). 
> Something under /var would be a better default log.dir under *nix.  Or relative to the Kafka bin directory to avoid needing root.  
> If the default cannot be changed, I would suggest a special warning print to the console on broker startup if log.dir is under /tmp. 
> See [users list thread|http://mail-archives.apache.org/mod_mbox/kafka-users/201607.mbox/%3cCAD5tkZb-0MMuWJqHNUJ3i1+xuNPZ4tnQt-RPm65grxE0=0o9VQ@mail.gmail.com%3e].  I've also been bitten by this. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)