You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HBASE-24825 Add UncaughtExceptionHandler for NettyRpcConnection Relogin thread - #2206
We encountered a problem. The client access to the server kept reporting "Can not send request because relogin is in progress.", and there was no obvious exception log. Finally, it was found that an exception that could not be caught occurred during the execution of relogin(), causing the thread to exit silently, After this patch can get the exception below
2020-08-06 14:59:51.664 WARN org.apache.hadoop.hbase.ipc.NettyRpcConnection - relogin failed java.lang.NoSuchMethodError: org.apache.hadoop.security.UserGroupInformation.isLoginKerberosKeyBased()Z at org.apache.hadoop.hbase.ipc.RpcConnection.relogin(RpcConnection.java:180) ~[zjyprc-hadoop-flink1.9-xmpush-log-to-trace-span-xmpush-flink-talos-task-1.3-SNAPSHOT.jar:?] at org.apache.hadoop.hbase.ipc.NettyRpcConnection$1.run(NettyRpcConnection.java:162) ~[zjyprc-hadoop-flink1.9-xmpush-log-to-trace-span-xmpush-flink-talos-task-1.3-SNAPSHOT.jar:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_202] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_202] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_202] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:1.8.0_202] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_202] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_202] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
I think this is a Xiaomi specific problem? Seems you have compiled with a customized hadoop library but then someone introduces a official library?
Yes. But we still have chance to meet other incompatibility problem or other RuntimeException? And when meet this problem, it will be hard to find the root cause.
nyl3532016
changed the title
HBASE-24825 NettyRpcConnection.scheduleRelogin method should catch Throwable exception
HBASE-24825 Add UncaughtExceptionHandler for NettyRpcConnection Relogin thread
Aug 8, 2020
@virajjasani when submitting this patch, I find maybe the default UncaughtExceptionHandler (Threads.LOGGING_EXCEPTION_HANDLER) will unset in ThreadFactoryBuilder.dobuild after HBASE-24750, It will be an Inconsistent ?
@virajjasani when submitting this patch, I find maybe the default UncaughtExceptionHandler (Threads.LOGGING_EXCEPTION_HANDLER) will unset in ThreadFactoryBuilder.dobuild after HBASE-24750, It will be an Inconsistent ?
We are not planning to remove Threads.LOGGING_EXCEPTION_HANDLER, it will stay. I hope the expectation for this patch is to handle the exception and just log it, and to not propagate it back to caller. If so, using this default UncaughtExceptionHandler from Threads class is fine.
Do you think using default UncaughtExceptionHandler will provide better warn logs if something goes wrong with relogin()? Maybe try creating a custom UncaughtExceptionHandler with NettyRpcConnection specific log message so that it is easier to figure out the issue runtime?
Do you think using default UncaughtExceptionHandler will provide better warn logs if something goes wrong with relogin()? Maybe try creating a custom UncaughtExceptionHandler with NettyRpcConnection specific log message so that it is easier to figure out the issue runtime?
I think LOGGING_EXCEPTION_HANDLER is fine, It will log Thread name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We encountered a problem. The client access to the server kept reporting "Can not send request because relogin is in progress.", and there was no obvious exception log. Finally, it was found that an exception that could not be caught occurred during the execution of relogin(), causing the thread to exit silently, After this patch can get the exception below
2020-08-06 14:59:51.664 WARN org.apache.hadoop.hbase.ipc.NettyRpcConnection - relogin failed java.lang.NoSuchMethodError: org.apache.hadoop.security.UserGroupInformation.isLoginKerberosKeyBased()Z at org.apache.hadoop.hbase.ipc.RpcConnection.relogin(RpcConnection.java:180) ~[zjyprc-hadoop-flink1.9-xmpush-log-to-trace-span-xmpush-flink-talos-task-1.3-SNAPSHOT.jar:?] at org.apache.hadoop.hbase.ipc.NettyRpcConnection$1.run(NettyRpcConnection.java:162) ~[zjyprc-hadoop-flink1.9-xmpush-log-to-trace-span-xmpush-flink-talos-task-1.3-SNAPSHOT.jar:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_202] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_202] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_202] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:1.8.0_202] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_202] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_202] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]