Got it

Producer Fails to Send Data and NullPointerException Is Thrown

93 0 0 0 0

Hello, everyone! 

I will share with you how to deal with the problem that producer fails to send data and NullPointerException is thrown when using Kafka.

Symptom

When Producer sends data to Kafka, the client throws NullPointerException.

Possible Causes

  1. The Kafka service is abnormal.

  2. The Jass and Keytab files configured on the Producer client are incorrect.

Fault Locating

The possible reasons why Producer fails to send data to Kafka may be related to Producer or Kafka.

  1. On the FusionInsight Manager page, choose Services > Kafka Status. The current status of the Kafka cluster is Good and the monitoring indicators show no errors.

  2. Check the Producer client log. The log contains NullPointerException information, as shown in the following.

    1_en-us_image_0228243523.jpg

    Alternatively, the log contains only NullPointerException information and no stack

    information. The problem is caused by JDK self-protection. If much information is printed for the same stack, the JDK self-protection is triggered and stack information is no longer printed.

    1_en-us_image_0228243524.jpg

  3. Check the Producer client log. The log contains Failed to configure SaslClientAuthenticator information, as shown in the following.

    1_en-us_image_0228243526.jpg

  4. Therefore, KafkaChannel fails to be created due to authentication failure. The KafkaChannel obtained through the channel (key) is empty and NullPointerException is excessively printed. The preceding log shows that authentication failure is due to an empty password. The reason why the password is empty may be that the password does not match the username.

  5. Check the Jaas and Keytab files. The principal parameter is set to stream in the Jaas file.

    1_en-us_image_0228243527.jpg

    The principal parameter is set to zmk_kafka in the user.keytab file.

    The principal in the Jaas file does not correspond to that in the user.keytab file.


We warmly welcome you to enjoy our community!




Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.