netstat --numeric-ports -a -t -p 排查hadoop主从节点是否建立通信

 

 

tcp  通信

[root@hadoop2 logs]# netstat --numeric-ports -a -t
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:9864 *:* LISTEN
tcp 0 0 *:25672 *:* LISTEN
tcp 0 0 localhost:9000 *:* LISTEN
tcp 0 0 *:9866 *:* LISTEN
tcp 0 0 *:9867 *:* LISTEN
tcp 0 0 *:111 *:* LISTEN
tcp 0 0 *:80 *:* LISTEN
tcp 0 0 localhost:45105 *:* LISTEN
tcp 0 0 *:81 *:* LISTEN
tcp 0 0 *:4369 *:* LISTEN
tcp 0 0 *:82 *:* LISTEN
tcp 0 0 *:83 *:* LISTEN
tcp 0 0 *:22 *:* LISTEN
tcp 0 0 localhost:631 *:* LISTEN
tcp 0 0 *:15672 *:* LISTEN
tcp 0 0 localhost:25 *:* LISTEN
tcp 0 0 *:37051 *:* LISTEN
tcp 0 0 localhost:4369 localhost:38801 ESTABLISHED
tcp 0 0 hadoop2:4369 hadoop2:41207 TIME_WAIT
tcp 0 0 hadoop2:58050 hadoop1:27017 ESTABLISHED
tcp 0 64 hadoop2:22 192.168.2.102:51676 ESTABLISHED
tcp 0 0 localhost:38801 localhost:4369 ESTABLISHED
tcp 0 0 hadoop2:22 192.168.2.95:50018 ESTABLISHED
tcp 0 0 *:5672 *:* LISTEN
tcp 0 0 *:111 *:* LISTEN
tcp 0 0 *:22 *:* LISTEN
tcp 0 0 localhost:631 *:* LISTEN
tcp 0 0 *:52887 *:* LISTEN
[root@hadoop2 logs]#

 

 

 

 

 

端口号记录
[root@hadoop3 hadoop]# cat etc/hadoop/hdfs-site.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> 

<!-- Put site-specific property overrides in this file. -->

<configuration>
<property>
<name>dfs.replication</name>
<value>3</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:///usr/local/hadoop/mydatanode</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:///usr/local/hadoop/mynamenode</value>
</property>
<property>
<name>dfs.namenode.rpc-address</name>
<value>hadoop3:9933</value>
</property>
<property>
<name>dfs.namenode.servicerpc-address</name>
<value>hadoop3:9666</value>
</property>

</configuration>
[root@hadoop3 hadoop]#

 

hadoop2
tcp 0 0 hadoop2:56312 hadoop3:9666 ESTABLISHED

hadoop1
tcp 0 0 hadoop1:57227 hadoop3:9666 ESTABLISHED


hadoop3
tcp 0 0 hadoop3:9666 0.0.0.0:* LISTEN

tcp 0 0 hadoop3:9666 hadoop1:57227 ESTABLISHED

tcp 0 0 hadoop3:60667 hadoop3:9666 ESTABLISHED

tcp 0 0 hadoop3:9666 hadoop2:56312 ESTABLISHED

 

 

 

而日志记录为

Caused by: java.net.BindException: Problem binding to [hadoop3:8096] java.net.BindException: 无法指定被请求的地址; For more details see: http://wiki.apache.org/hadoop/BindException

 

 但是主节点

tcp 0 0 hadoop3:8096 0.0.0.0:* LISTEN

 

8096端口再监听任意ip的任意端口

 

 

 

 

[root@hadoop3 hadoop]# cat etc/hadoop/yarn-site.xml
<?xml version="1.0"?>

<configuration>

<!-- Site specific YARN configuration properties -->
<property>
<name>yarn.resourcemanager.address</name>
<value>hadoop3:8032</value>
</property>
<property>
<name>yarn.nodemanager.address</name>
<value>hadoop3:8096</value>
</property>
<property>
<name>yarn.scheduler.minimum-allocation-mb</name>
<value>2048</value>
</property>
</configuration>
[root@hadoop3 hadoop]#

 

 

yarn.nodemanager出现了问题

 

 

netstat -atp 

netstat -a -t -p

 

posted @ 2017-12-28 14:11  papering  阅读(263)  评论(0编辑  收藏  举报