0

I run bash as administrator like recomended in Cannot create kafka topic , but It did not help (

In http://logging.apache.org/log4j/1.2/faq.html#noconfig :

Why do I see a warning about "No appenders found for logger" and "Please configure log4j properly"? This occurs when the default configuration files log4j.properties and log4j.xml can not be found and the application performs no explicit configuration. log4j uses Thread.getContextClassLoader().getResource() to locate the default configuration files and does not directly check the file system. Knowing the appropriate location to place log4j.properties or log4j.xml requires understanding the search strategy of the class loader in use. log4j does not provide a default configuration since output to the console or to the file system may be prohibited in some environments. Also see FAQ: Why can't log4j find my properties in a J2EE or WAR application?.

In bash:

$ bin/kafka-topics.sh --create --topic quickstart-events --bootstrap-server localhost:9092
log4j:ERROR Could not read configuration file from URL [file:/c/portable/kafka_2.13-3.2.0/bin/../config/tools-log4j.properties].
java.io.FileNotFoundException: \c\portable\kafka_2.13-3.2.0\bin\..\config\tools-log4j.properties (▒▒▒▒▒▒▒ ▒▒ ▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒▒)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(FileInputStream.java:195)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at java.io.FileInputStream.<init>(FileInputStream.java:93)
        at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
        at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:557)
        at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:504)
        at org.apache.log4j.LogManager.<clinit>(LogManager.java:119)
        at org.slf4j.impl.Reload4jLoggerFactory.<init>(Reload4jLoggerFactory.java:67)
        at org.slf4j.impl.StaticLoggerBinder.<init>(StaticLoggerBinder.java:72)
        at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:45)
        at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
        at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
        at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
        at com.typesafe.scalalogging.Logger$.apply(Logger.scala:31)
        at kafka.utils.Log4jControllerRegistration$.<clinit>(Logging.scala:25)
        at kafka.admin.TopicCommand$.<clinit>(TopicCommand.scala:44)
        at kafka.admin.TopicCommand.main(TopicCommand.scala)
log4j:ERROR Ignoring configuration file [file:/c/portable/kafka_2.13-3.2.0/bin/../config/tools-log4j.properties].
log4j:WARN No appenders could be found for logger (kafka.utils.Log4jControllerRegistration$).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Created topic quickstart-events.
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Grimax
  • 1
  • 1

1 Answers1

0

The output clearly says Created topic quickstart-events.

Log4j issues are completely separate issue, and can be ignored if the command actually worked.

Ideally, don't put Kafka installation on the C drive. Instead, put it in /opt of your WSL2 session, for example

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245