Troubleshooting the Content event emitter

If you observe that no events are flowing to Kafka, there might be a problem with the Content event emitter configuration. Check the event handler configuration, the Content Platform Engine log, and the status of the messaging engine.

About this task

At run time, the content event handler processes asynchronously. It emits the document metadata in business event format to the Kafka topic. When no events are flowing to Kafka, there might be a problem in the event handler or with the event emitter configuration. Go through each configuration element in the Content Platform Engine deployment environment.

Procedure

  1. Checking the event handler configuration
  2. Checking the configuration file of the content event emitter
  3. Checking the Content Platform Engine log
  4. Checking the content event processing on the Business Automation Insights server

Checking the event handler configuration

About this task

Check the steps that use the bai-content-emitter.jar to create an event action, event subscription and code module from the Administration Console for Content Platform Engine.

See Configuring the Content event emitter for the first time.

Checking the configuration file of the content event emitter

About this task

Check that your configuration file parameters are correctly set. Customize the parameters to your specifications. To get the Kafka connection information to use as parameters for the configuration file, see Preparing to enable Business Automation Insights. To customize your configuration file, see Customizing the configuration file.

Checking the Content Platform Engine log

Procedure

  1. Check the ce_system0.log, which can be accessed from the Content Platform Engine container by copying from the FileNet logs directory for the Content Platform Engine instance found at /opt/ibm/wlp/usr/servers/defaultServer/FileNet/<CR metaname-cpeNN>. For more information about how to copy files from a container, see Viewing the Content Cortex logs.
    • Missing minimum configuration parameters,
      FNRCE0000E - ERROR P8Domain Content Event Emitter Exception: 
      [contentemitter.output.kafka.topic, contentemitter.input.content.server, 
      contentemitter.output.kafka.bootstrap.servers] minimum configuration 
      parameter(s) not found.
    • Missing securing configuration parameters,
      FNRCE0000E - ERROR P8Domain Content Event Emitter Exception: 
      [contentemitter.output.kafka.security.protocol, 
      contentemitter.output.kafka.sasl.mechanism] 
      securing parameter(s) not found.
    • Missing configuration parameters,
      FNRCE0000E - ERROR P8Domain Content Event Emitter Exception: 
      [contentemitter.output.kafka.ssl.enabled.protocols, 
      contentemitter.output.kafka.ssl.endpoint.identification.algorithm, 
      contentemitter.output.kafka.sasl.jaas.config, 
      contentemitter.output.kafka.ssl.truststore.location, 
      contentemitter.output.kafka.ssl.truststore.password, 
      contentemitter.output.kafka.ssl.truststore.type] 
      configuration parameter(s) not found.
  2. Access the Liberty messages.log file from the Content Platform Engine container by copying it from the logs directory for the Content Platform Engine Liberty instance, located at /opt/ibm/wlp/usr/servers/defaultServer/logs/<pod_name>.
  3. Verify that the content event handler is processing document events and printing log messages from Kafka to the messages.log file. These log messages include the settings specified in the configuration file for the content event handler.
    For example, the message that Kafka prints every time an event is processed, which lists the settings in the configuration file is:
    com.ibm.dba.bai.events.kafka.Transport                       I Building transport with Kafka producer configuration: 
      ssl.enabled.protocols=TLSv1.2,TLSv1.3, 
      acks=all, 
      bootstrap.servers=<kafka_host>:<port>, 
      ssl.truststore.type=PKCS12, 
      key.serializer=org.apache.kafka.common.serialization.StringSerializer, 
      security.protocol=SASL_SSL, 
      retries=10, 
      ssl.truststore.location=/shared/tls/truststore/pkcs12/trusts.p12, 
      value.serializer=org.apache.kafka.common.serialization.StringSerializer, 
      sasl.mechanism=SCRAM-SHA-512, 
      sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="*****" password="*****";, 
      ssl.truststore.password=*****, 
      ssl.endpoint.identification.algorithm=
    
    Note:

    Replace <kafka_host> and <port> with the actual Kafka host and port values.

  4. Inspect the log messages for Kafka configuration settings and verify that these settings match the expected values from the configuration file.
  5. Check the log messages for any error messages from Kafka. If errors are found, analyze the error messages to identify the cause of the issue.
  6. If necessary, adjust the configuration file for the content event handler to correct the issue explained in the error message.
  7. If there are no Kafka messages in the Liberty messages.log and no error messages in ce_system0.log, perform the following steps.
    1. Enable Content Engine server tracing by following the instructions in Enabling and viewing trace logs.
    2. Select Code Module Trace Flags and Events Trace Flags trace flags.
    3. Create, edit, or delete a document to trigger the content event handler.
    4. Check the ce_trace0.log file for messages that indicate the content event handler has run.
      For example, the message must be similar to:
      2024-10-29T23:51:01.550 000016E6 CMOD FNRCE0000D - DEBUG +CodeModuleClassLoader.loadClass(com.ibm.bai.content.event.emitter.eventhandler.ContentEmitterHandler,false) CodeModuleClassLoader:{B18A7C20-6AE0-CF18-8B8F-92D7B8300000}-cn-jboj-awl-{EB6AA49E-EABD-4D1F-AC5E-A937EF119608}-PLc-PLr^0x9f286756^
      2024-10-29T23:51:01.550 000016E6 CMOD FNRCE0000D - DEBUG +CMCL class com.ibm.bai.content.event.emitter.eventhandler.ContentEmitterHandler was found already loaded in JVM
      2024-10-29T23:51:01.550 000016E6 EVNT FNRCE0000D - DEBUG Calling method onEvent(ObjectChangeEvent) of handler com.ibm.bai.content.event.emitter.eventhandler.ContentEmitterHandler
      
    5. If you do not see any messages indicating that the content event handler has run, verify that the event action and subscription have been properly configured as detailed in Configuring the Content event emitter for the first time.

Checking the content event processing on the Business Automation Insights server

Procedure

  1. Install and configure the Business Automation Insights management service command-line interface by following the instructions in Installing and using the management command-line interface External link opens a new window or tab.
  2. Run the following command to check whether the Kafka server is receiving content events on the correct topic:
    management-cli kafka consumer-json --topic=icp4ba-bai-content-ingress

    This command repeats all incoming events to the console window.

  3. Create, update, or delete a document to trigger a content event, then verify that the event is printed to the console window.
  4. Run the following command to verify that the content event processing job with the name dba/bai-content is listed as one of the running processing jobs:
    management-cli processing-jobs list
    For example, the output should be similar to:
    {
      "result": {
        "jobs": [
          {
            "jid": "4e7e31f74ffa5c1f77bd56288fe0019d",
            "name": "dba/bai-content",
            "state": "RUNNING"
          },
          {
            "jid": "d01b3676eed3a74cad0401f25cf26ea8",
            "name": "dba/bai-navigator",
            "state": "RUNNING"
          }
        ]
      }
    }
  5. If the job is not listed or not running, check the status for the pods with names that include the strings bai-setup and bai-content. Confirm that they both have the completed status. If they are not in the completed state, check the logs for those pods. If the pods are in a completed state, see Troubleshooting Apache Flink jobs External link opens a new window or tab.