我们的hadoop集群中有两个namenode
这是返回良好状态的名称节点之一的好例子
第一个 namenode 机器 IP -92.3.44.2
curl -v http://92.3.44.2:50070/jmx?qry=Hadoop:service=NameNode,name=NameNodeStatus
* About to connect() to 92.3.44.2 port 50070 (#0)
* Trying 92.3.44.2...
* Connected to 92.3.44.2 (92.3.44.2) port 50070 (#0)
> GET /jmx?qry=Hadoop:service=NameNode,name=NameNodeStatus HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 92.3.44.2:50070
> Accept: */*
>
< HTTP/1.1 200 OK
< Cache-Control: no-cache
< Expires: Mon, 27 Jan 2020 15:39:57 GMT
< Date: Mon, 27 Jan 2020 15:39:57 GMT
< Pragma: no-cache
< Expires: Mon, 27 Jan 2020 15:39:57 GMT
< Date: Mon, 27 Jan 2020 15:39:57 GMT
< Pragma: no-cache
< Content-Type: application/json; charset=utf-8
< X-FRAME-OPTIONS: SAMEORIGIN
< Access-Control-Allow-Methods: GET
< Access-Control-Allow-Origin: *
< Transfer-Encoding: chunked
< Server: Jetty(6.1.26.hwx)
<
{
"beans" : [ {
"name" : "Hadoop:service=NameNode,name=NameNodeStatus",
"modelerType" : "org.apache.hadoop.hdfs.server.namenode.NameNode",
"State" : "active",
"NNRole" : "NameNode",
"HostAndPort" : "namenode.kuku.com:8020",
"SecurityEnabled" : false,
"LastHATransitionTime" : 1579019610100,
"BytesWithFutureGenerationStamps" : 0,
"SlowPeersReport" : null,
"SlowDisksReport" : null
} ]
* Connection #0 to host 92.3.44.2 left intact
但在第二个名称节点上,图片是不同的
例子
curl -v http://92.3.44.3:50070/jmx?qry=Hadoop:service=NameNode,name=NameNodeStatus
* About to connect() to 92.3.44.3 port 50070 (#0)
* Trying 92.3.44.3...
* Connected to 92.3.44.2 (92.3.44.2) port 50070 (#0)
> GET /jmx?qry=Hadoop:service=NameNode,name=NameNodeStatus HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 92.3.44.2:50070
> Accept: */*
>
我们可以看到命令curl被卡住了
如何确定curl卡住的原因?