Resolving problems when using Kafka nodes
Use the advice given here to help you to avoid or resolve problems that might arise when you are using KafkaConsumer or KafkaProducer nodes.
Connecting to a Kafka cluster
Procedure
- When you set the Kafka user ID and password by using the mqsisetdbparms command, ensure that you used the form
kafka::KAFKA::integrationServerName.For more information, see Configuring security credentials for connecting to Kafka. - If you are connecting to IBM® Event Streams in IBM Cloud, ensure that the Security protocol property on the Kafka node is set to SASL_SSL. For more information about configuring the security credentials for connecting to Event Streams, see Using Kafka nodes with IBM Event Streams.
Using log4j 2 to investigate connection and configuration problems
About this task
If you have a problem when you connect to Kafka, and the problem persists after you validate that the configuration of the nodes is correct, you might find more information by enabling tracing from the Kafka client.
The Kafka client uses the log4j 2 component to capture trace information. The lib subdirectory of the IBM App Connect Enterprise installation directory contains a log4j2.properties file, which contains an example of how tracing can be enabled for the Kafka client:
############################################################################
## Kafka logger, un-comment the following section to write Kafka log messages
## to a file.
## The logging level, currently 'DEBUG' is the most detailed level of
## logging available. The 'log4j.appender.kafkaAppender.Threshold' value may
## be set to one of
## ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, and OFF.
## to configure the detail level of the information written to the log file.
############################################################################
rootLogger.level=OFF
#appender.file.type=File
#appender.file.name=fileLogger
#appender.file.fileName=/var/mqsi/kafka.log
#appender.file.layout.type=PatternLayout
#appender.file.layout.pattern=[%d] %p %m (%c)%n
#rootLogger.appenderRef.file.ref=fileLogger
Procedure
Complete the following steps to enable tracing from the Kafka client:
Enabling JSSE trace to troubleshoot issues
About this task
If you have a problem when you connect to Kafka and are using an SSL connection, you might find more information by enabling JSSE trace.
Procedure
You can enable JSSE trace by setting the environment variable IBM_JAVA_OPTIONS as follows:
export IBM_JAVA_OPTIONS=-Djavax.net.debug=allAlternatively, enable JSSE trace by completing the following steps: