I need to launch Kafka Rest Proxy on kubernetes. When I used docker-compose to start it on local machine with a local Kafka broker and zookeeper it went well and I got the last log output stating that Kafka Rest is running and waiting for requests. When I launch it on kubernetes I get only the following output:
===> User
uid=1000(appuser) gid=1000(appuser) groups=1000(appuser)
===> Configuring ...
===> Running preflight checks ...
===> Check if Kafka is healthy ...
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/share/java/cp-base-new/slf4j-log4j12- 1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/share/java/cp-base-new/slf4j-simple-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory[]
log4j:WARN No appenders could be found for logger (io.confluent.admin.utils.cli.KafkaReadyCommand).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
And then the pod exits with error code 1 and in in CrashLoopBackOff state.
For the environmental variables I've set up KAFKA_REST_BOOTSTRAP_SERVERS
with format of PLAINTEXT://{host1},PLAINTEXT://{host2}
and KAFKA_REST_LOG4J_ROOT_LOGLEVEL = DEBUG
but it didn't make any additional output to appear.
Did anyone have the same problem?
There indeed seems to be an issue with the Log Config in latest versions of the Proxy. I had the same issue and reverted to 5.1.0, which gave me good log output and pointed out that it was missing the environment property KAFKA_REST_HOST_NAME
.
I had exactly the same problem with Kafka REST Proxy in Docker container and my reason was misspell in IP address and port, something like '192.168.100:14:9092' and after replacement to '192.168.100.14:9092' all started to work and I even saw logs, but failure logs was exactly like yours (no meaningful logs and no info why it was failing).