From 90a31dc61c747645d6a969ec6c807d6b83d3cac4 Mon Sep 17 00:00:00 2001 From: Billie Rinaldi Date: Fri, 27 Apr 2018 07:58:43 -0700 Subject: [PATCH] YARN-8211. Yarn registry dns log finds BufferUnderflowException on port ping. Contributed by Eric Yang (cherry picked from commit 9ab3f9708923b3429209006a12695f4826a045b9) --- .../org/apache/hadoop/registry/server/dns/RegistryDNS.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/server/dns/RegistryDNS.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/server/dns/RegistryDNS.java index c31ce891d68..c322023682e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/server/dns/RegistryDNS.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/server/dns/RegistryDNS.java @@ -76,6 +76,7 @@ import java.net.Socket; import java.net.SocketAddress; import java.net.SocketException; import java.net.UnknownHostException; +import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; import java.nio.channels.DatagramChannel; import java.nio.channels.ServerSocketChannel; @@ -802,6 +803,8 @@ public class RegistryDNS extends AbstractService implements DNSOperations, ch.socket().getPort(), ch.socket().getLocalAddress().getHostName(), ch.socket().getLocalPort(), e); + } catch (BufferUnderflowException e) { + // Ignore system monitor ping packets } finally { IOUtils.closeStream(ch); }