EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

How to enable debugging level logs for Kafka in MicroStrategy 2021


Danfeng Zhan

Principal Product Specialist • Strategy


This article outlines the steps to enable debugging level logs for Kafka in MicroStrategy 2021.

By default, Kafka only logs info-level messages to the log files. Below shows the Kafka startup instance with INFO entries only: 

[2021-04-01 22:54:08,349] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)[2021-04-01 22:54:09,365] INFO starting (kafka.server.KafkaServer)[2021-04-01 22:54:09,367] INFO Connecting to zookeeper on localhost:2181 (kafka.server.KafkaServer)[2021-04-01 22:54:09,408] INFO [ZooKeeperClient] Initializing a new session to localhost:2181. (kafka.zookeeper.ZooKeeperClient)[2021-04-01 22:54:09,423] INFO Client environment:zookeeper.version=3.4.13-2d71af4dbe22557fda74f9a9b4309b15a7487f03, built on 06/29/2018 00:39 GMT (org.apache.zookeeper.ZooKeeper)[2021-04-01 22:54:09,423] INFO Client environment:host.name=xxxxxxxxxxxx.Strategy.com (org.apache.zookeeper.ZooKeeper)[2021-04-01 22:54:09,423] INFO Client environment:java.version=1.8.0_252 (org.apache.zookeeper.ZooKeeper)[2021-04-01 22:54:09,423] INFO Client environment:java.vendor=AdoptOpenJDK (org.apache.zookeeper.ZooKeeper)[2021-04-01 22:54:09,424] INFO Client environment:java.home=C:\Program Files (x86)\Common Files\Strategy\JRE\180_252\Win64 (org.apache.zookeeper.ZooKeeper)[2021-04-01 22:54:09,424] INFO Client environment:java.class.path=C:\Program Files (x86)\Strategy\Messaging 

 

To log debug-level messages to the log files, follow the steps below:

  1.  In the log4j.properties, change the value of two fields from info to debug.

log4j.logger.kafka=INFO
 to
 log4j.logger.kafka=DEBUG

NOTE:

  • In Strategy 2020 and prior versions, log4j.properties locates in C:\Program Files (x86)\Strategy\Messaging Services\Kafka\kafka_2.12-2.2.3\config
  • Start from Strategy 2021 and forward, log4j.properties located in C:\Program Files (x86)\Strategy\Messaging Services\Kafka\kafka_2.13-2.6.1\config


 

  1.  Restart Kafka to apply the change.

Refer to Knowledge Base Article below on how to stop and start the Kafka (Telemetry Server).
KB483019: Troubleshooting: How to Check Platform Analytics Services
 
DEBUG level entries are available during the startup as shown below:

[2021-04-01 23:25:47,548] INFO [ExpirationReaper-0-topic]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)[2021-04-01 23:25:47,547] INFO [ExpirationReaper-0-Heartbeat]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)[2021-04-01 23:25:47,576] DEBUG [ZooKeeperClient] Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/controller (kafka.zookeeper.ZooKeeperClient)[2021-04-01 23:25:47,615] INFO [TransactionCoordinator id=0] Starting up. (kafka.coordinator.transaction.TransactionCoordinator)[2021-04-01 23:25:47,673] DEBUG Initializing task scheduler. (kafka.utils.KafkaScheduler)[2021-04-01 23:25:47,691] DEBUG Scheduling task transaction-abort with initial delay 60000 ms and period 60000 ms. (kafka.utils.KafkaScheduler)[2021-04-01 23:25:47,748] DEBUG Scheduling task transactionalId-expiration with initial delay 3600000 ms and period 3600000 ms. (kafka.utils.KafkaScheduler)[2021-04-01 23:25:47,784] INFO [TransactionCoordinator id=0] Startup complete. (kafka.coordinator.transaction.TransactionCoordinator)[2021-04-01 23:25:47,784] INFO [Transaction Marker Channel Manager 0]: Starting (kafka.coordinator.transaction.TransactionMarkerChannelManager)[2021-04-01 23:25:48,070] INFO [/config/changes-event-process-thread]: Starting (kafka.common.ZkNodeChangeNotificationListener$ChangeEventProcessThread)[2021-04-01 23:25:48,059] DEBUG Accepted connection from /xx.xx.xx.xx:57356 on /xx.xx.xx.xx:9092 and assigned it to processor 1, sendBufferSize [actual|requested]: [102400|102400] recvBufferSize [actual|requested]: [102400|102400] (kafka.network.Acceptor)[2021-04-01 23:25:48,093] DEBUG Initializing task scheduler. (kafka.utils.KafkaScheduler)[2021-04-01 23:25:48,128] DEBUG Scheduling task auto-leader-rebalance-task with initial delay 5000 ms and period -1000 ms. (kafka.utils.KafkaScheduler)

 

  1.  Reset the fields back to info after debugging.

log4j.logger.kafka=DEBUG
 to 
log4j.logger.kafka=INFO


Comment

0 comments

Details

Knowledge Article

Published:

April 14, 2021

Last Updated:

April 14, 2021