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

JmxReporter can't handle windows style directory paths

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.0.0
    • 1.1.0
    • metrics
    • None
    • JDK 8u152 (64 Bit), Windows 10 (64 Bit)

    Description

      com.yammer.metrics.reporting.JmxReporter complains about special characters in windows log directory path. Following warning is printed during startup -

      [2017-11-01 20:39:24,567] INFO Loading logs. (kafka.log.LogManager)
      [2017-11-01 20:39:24,583] INFO Logs loading complete in 16 ms. (kafka.log.LogManager)
      [2017-11-01 20:39:24,630] WARN Error processing kafka.log:type=LogManager,name=LogDirectoryOffline,logDirectory=D:\tmp\kafka-logs (com.yammer.metrics.reporting.JmxReporter)
      javax.management.MalformedObjectNameException: Invalid character ':' in value part of property
              at javax.management.ObjectName.construct(ObjectName.java:618)
              at javax.management.ObjectName.<init>(ObjectName.java:1382)
              at com.yammer.metrics.reporting.JmxReporter.onMetricAdded(JmxReporter.java:395)
              at com.yammer.metrics.core.MetricsRegistry.notifyMetricAdded(MetricsRegistry.java:516)
              at com.yammer.metrics.core.MetricsRegistry.getOrAdd(MetricsRegistry.java:491)
              at com.yammer.metrics.core.MetricsRegistry.newGauge(MetricsRegistry.java:79)
              at kafka.metrics.KafkaMetricsGroup.newGauge(KafkaMetricsGroup.scala:74)
              at kafka.metrics.KafkaMetricsGroup.newGauge$(KafkaMetricsGroup.scala:73)
              at kafka.log.LogManager.newGauge(LogManager.scala:50)
              at kafka.log.LogManager.$anonfun$new$1(LogManager.scala:122)
              at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:59)
              at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:52)
              at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
              at kafka.log.LogManager.<init>(LogManager.scala:116)
              at kafka.log.LogManager$.apply(LogManager.scala:814)
              at kafka.server.KafkaServer.startup(KafkaServer.scala:222)
              at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)
              at kafka.Kafka$.main(Kafka.scala:92)
              at kafka.Kafka.main(Kafka.scala)
      

      Complete log is attached.

      Attachments

        1. Kafka.log
          7 kB
          Kedar Joshi

        Issue Links

          Activity

            People

              huxi_2b huxihx
              kedarjoshi Kedar Joshi
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: