Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E8083200C04 for ; Mon, 9 Jan 2017 23:52:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E6DFE160B2F; Mon, 9 Jan 2017 22:52:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E43D7160B3E for ; Mon, 9 Jan 2017 23:52:00 +0100 (CET) Received: (qmail 78151 invoked by uid 500); 9 Jan 2017 22:51:58 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 77575 invoked by uid 99); 9 Jan 2017 22:51:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jan 2017 22:51:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 89D152C2A6D for ; Mon, 9 Jan 2017 22:51:58 +0000 (UTC) Date: Mon, 9 Jan 2017 22:51:58 +0000 (UTC) From: "Masatake Iwasaki (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-11308) NameNode doFence state judgment problem MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 09 Jan 2017 22:52:02 -0000 [ https://issues.apache.org/jira/browse/HDFS-11308?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1581= 3108#comment-15813108 ]=20 Masatake Iwasaki commented on HDFS-11308: ----------------------------------------- nc is alias of ncat which does not have "-z" option in CentOS 7. There seem= s to be some replacement by using bash. http://stackoverflow.com/questions/4922943/test-from-shell-script-if-remote= -tcp-port-is-open > NameNode doFence state judgment problem > --------------------------------------- > > Key: HDFS-11308 > URL: https://issues.apache.org/jira/browse/HDFS-11308 > Project: Hadoop HDFS > Issue Type: Bug > Components: auto-failover > Affects Versions: 2.7.1 > Environment: CentOS Linux release 7.1.1503 (Core) > Reporter: tangshangwen > > In our Cluster, I found some abnormal in ZKFC log > {noformat} > [2017-01-10T01:42:37.168+08:00] [INFO] hadoop.ha.SshFenceByTcpPort.doFenc= e(SshFenceByTcpPort.java 147) [Health Monitor for NameNode at xxx-xxx-172xx= x.hadoop.xxx.com/xxx.xxx.172.xxx:8021-EventThread] : Indeterminate response= from trying to kill service. Verifying whether it is running using nc... > [2017-01-10T01:42:37.234+08:00] [WARN] hadoop.ha.SshFenceByTcpPort.pump(S= treamPumper.java 88) [nc -z xxx-xxx-172xx.hadoop.xx.com 8021 via ssh: Strea= mPumper for STDERR] : nc -z xxx-xxx-172xx.hadoop.xxx.com 8021 via ssh: nc: = invalid option -- 'z' > [2017-01-10T01:42:37.235+08:00] [WARN] hadoop.ha.SshFenceByTcpPort.pump(S= treamPumper.java 88) [nc -z xxx-xxx-172xx.hadoop.xxx.com 8021 via ssh: Stre= amPumper for STDERR] : nc -z xxx-xxx-17224.hadoop.xxx.com 8021 via ssh: Nca= t: Try `--help' or man(1) ncat for more information, usage options and help= . QUITTING. > {noformat} > When I perform nc an exception occurs, the return value is 2, and cannot = confirm sshfence success=EF=BC=8Cthis may lead to some problems > {code:title=3DSshFenceByTcpPort.java|borderStyle=3Dsolid} > rc =3D execCommand(session, "nc -z " + serviceAddr.getHostName() + > " " + serviceAddr.getPort()); > if (rc =3D=3D 0) { > // the service is still listening - we are unable to fence > LOG.warn("Unable to fence - it is running but we cannot kill it= "); > return false; > } else { > LOG.info("Verified that the service is down."); > return true; =20 > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org