Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Example Analysis of HiveServer2 Service exception

Shulou Source: shulou.com Published: 2022-06-01 15:21:13 10月02日 Update

This article mainly introduces the example analysis of HiveServer2 service exception, which has a certain reference value. Interested friends can refer to it. I hope you will learn a lot after reading this article.

1. Problem description

The HiveServer2 service often throws the following exception log at run time:

[HiveServer2-Handler-Pool: Thread-53]: Error occurred during processing of message.

Java.lang.RuntimeException: org.apache.thrift.transport.TSaslTransportException: No data or no sasl data in the stream

At org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport (TSaslServerTransport.java:219)

At org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run (TThreadPoolServer.java:269)

At java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142)

At java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617)

At java.lang.Thread.run (Thread.java:748)

Caused by: org.apache.thrift.transport.TSaslTransportException: No data or no sasl data in the stream

At org.apache.thrift.transport.TSaslTransport.open (TSaslTransport.java:328)

At org.apache.thrift.transport.TSaslServerTransport.open (TSaslServerTransport.java:41)

At org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport (TSaslServerTransport.java:216)

... 4 more

(can slide left and right)

two。 Abnormal analysis

1. This is a negligible exception that does not affect the normal use of the HiveServer2 service.

two。 This exception occurs on Thrift0.9.2 and earlier HiveServer2 services.

3. Caused by Tcp checking by the load balancer on the HiveServer2 service, it is mainly used to assess the health status of the service. (see THRIFT-2268 for details)

Https://issues.apache.org/jira/browse/THRIFT-2268?attachmentSortBy=dateTime

(can slide left and right)

3. Exception handling

In Fayson's eyes, seeing ERROR-level logs is annoying, even if there are no exceptions that affect it. Here Fayson tells you how to block such ERROR logs.

1. Log in to CM to enter the configuration page of the Hive service and select "HiveServer2" in the category.

two。 Search the search bar for "HiveServer2 logging advanced configuration code snippet (safety valve)" and add the following configuration:

Log4j.appender.RFA.filter.1=org.apache.log4j.filter.ExpressionFilter

Log4j.appender.RFA.filter.1.Expression=EXCEPTION ~ = org.apache.thrift.transport.TSaslTransportException

Log4j.appender.RFA.filter.1.AcceptOnMatch=false

(can slide left and right)

3. Just restart the HiveServer2 service after saving the configuration

Thank you for reading this article carefully. I hope the article "sample Analysis of HiveServer2 Service anomalies" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Services logs articles configuration analysis examples impact advanced health balance security code value interest and at the same time safety valve that is more friends version Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Docker Shulou Tech Info Microsoft OPPO Reno