Uploaded image for project: 'Bigtop'
  1. Bigtop
  2. BIGTOP-1886

Kafka server can not create a log-cleaner.log file

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.8.0, 1.0.0
    • Fix Version/s: 1.0.0, 1.1.0
    • Component/s: None
    • Labels:
      None

      Description

      $ cat /var/log/kafka/kafka-server.out
      
      log4j:ERROR setFile(null,true) call failed.
      java.io.FileNotFoundException: log-cleaner.log (Permission denied)
      	at java.io.FileOutputStream.open(Native Method)
      	at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
      	at java.io.FileOutputStream.<init>(FileOutputStream.java:142)
      	at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
      	at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
      	at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
      	at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
      	at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
      	at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
      	at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:809)
      	at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
      	at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:639)
      	at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:504)
      	at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:547)
      	at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:483)
      	at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
      	at org.apache.log4j.Logger.getLogger(Logger.java:104)
      	at kafka.utils.Logging$class.logger(Logging.scala:24)
      	at kafka.utils.VerifiableProperties.logger$lzycompute(VerifiableProperties.scala:24)
      	at kafka.utils.VerifiableProperties.logger(VerifiableProperties.scala:24)
      	at kafka.utils.Logging$class.info(Logging.scala:67)
      	at kafka.utils.VerifiableProperties.info(VerifiableProperties.scala:24)
      	at kafka.utils.VerifiableProperties.verify(VerifiableProperties.scala:197)
      	at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:32)
      	at kafka.Kafka$.main(Kafka.scala:35)
      	at kafka.Kafka.main(Kafka.scala)
      ...
      

      The 'log-cleaner.log' should be

      ${kafka.logs.dir}/log-cleaner.log

      . Like this:

      log4j.appender.cleanerAppender.File=${kafka.logs.dir}/log-cleaner.log
      

      This is fixed by KAFKA-1251 but 0.8.1.x does not have that.

      1. BIGTOP-1886.patch
        1.0 kB
        YoungWoo Kim

        Activity

        Hide
        warwithin YoungWoo Kim added a comment -

        A patch attached. BIGTOP-1886.patch

        Show
        warwithin YoungWoo Kim added a comment - A patch attached. BIGTOP-1886.patch
        Hide
        warwithin YoungWoo Kim added a comment -

        I think this issue does not break the functionality of Kafka server, so it would not block 1.0.0 release
        But if someone review and test it I believe it does not take too long to include it therefore I do not specify the 'Fix Version'.

        Show
        warwithin YoungWoo Kim added a comment - I think this issue does not break the functionality of Kafka server, so it would not block 1.0.0 release But if someone review and test it I believe it does not take too long to include it therefore I do not specify the 'Fix Version'.
        Hide
        warwithin YoungWoo Kim added a comment -

        It's ready to review for current master branch!

        Show
        warwithin YoungWoo Kim added a comment - It's ready to review for current master branch!
        Hide
        evans_ye Evans Ye added a comment -

        +1. The patch fix the issue. I'd like to commit but I feel this should to be fixed in 1.0, otherwise we'll have bad user experience. in addition, I discovered that the redhat-lsb package requirement is missing in the kafka rpm package, which also need to be fixed as well(BIGTOP-1937).
        If is still not too late, I'd like to bring this and BIGTOP-1937 in. Konstantin Boudnik if we'd like to add more patches into current 1.0 branch, I think we better stick with cherry-pick. If we switch to the feature branch model at this moment, then those cherry-picked commits will be merged in master and cause duplication. Do you agree?

        Show
        evans_ye Evans Ye added a comment - +1. The patch fix the issue. I'd like to commit but I feel this should to be fixed in 1.0, otherwise we'll have bad user experience. in addition, I discovered that the redhat-lsb package requirement is missing in the kafka rpm package, which also need to be fixed as well( BIGTOP-1937 ). If is still not too late, I'd like to bring this and BIGTOP-1937 in. Konstantin Boudnik if we'd like to add more patches into current 1.0 branch, I think we better stick with cherry-pick. If we switch to the feature branch model at this moment, then those cherry-picked commits will be merged in master and cause duplication. Do you agree?
        Hide
        cos Konstantin Boudnik added a comment -

        If this needs to go to 1.0 - please cherry pick it in there. As I mentioned on the dev@ discussion - it's too late to save branch-1.0 and start making the proper merges, so let's finish it the same way we've started.

        Show
        cos Konstantin Boudnik added a comment - If this needs to go to 1.0 - please cherry pick it in there. As I mentioned on the dev@ discussion - it's too late to save branch-1.0 and start making the proper merges, so let's finish it the same way we've started.
        Hide
        evans_ye Evans Ye added a comment -

        Committed to master and branch-1.0. Thanks for the patch and sorry to keep you waiting, YoungWoo Kim.

        Show
        evans_ye Evans Ye added a comment - Committed to master and branch-1.0. Thanks for the patch and sorry to keep you waiting, YoungWoo Kim .

          People

          • Assignee:
            warwithin YoungWoo Kim
            Reporter:
            warwithin YoungWoo Kim
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development