YARN-8211. Yarn registry dns log finds BufferUnderflowException on port ping. Contributed by Eric Yang

(cherry picked from commit 9ab3f97089)
This commit is contained in:
Billie Rinaldi 2018-04-27 07:58:43 -07:00
parent b20f68ddaa
commit 90a31dc61c
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}