hadoop启动时,报错Name or service not known connect to host the port 22: Connection refused

启动时,报如下内容

It’s highly recommended that you fix the library with 'execstack -c ‘, or link it with ‘-z noexecstack’.
Tony001]
sed: -e expression #1, char 6: unknown option to s' HotSpot(TM): ssh: Could not resolve hostname hotspot(tm): Name or service not known warning:: ssh: Could not resolve hostname warning:: Name or service not known -c: Unknown cipher type 'cd' 'execstack: ssh: Could not resolve hostname 'execstack: Name or service not known noexecstack'.: ssh: Could not resolve hostname noexecstack'.: Name or service not known '-z: ssh: Could not resolve hostname '-z: Name or service not known now.: ssh: Could not resolve hostname now.: Name or service not known It's: ssh: Could not resolve hostname it's: Name or service not known <libfile>',: ssh: Could not resolve hostname <libfile>',: Name or service not known tony@tony001's password: Tony001: starting namenode, logging to /home/tony/app/hadoop-2.4.1/logs/hadoop-tony-namenode-Tony001.out Java: ssh: Could not resolve hostname java: Name or service not known You: ssh: Could not resolve hostname you: Name or service not known to: ssh: Could not resolve hostname to: Name or service not known it: ssh: Could not resolve hostname it: Name or service not known link: ssh: Could not resolve hostname link: Name or service not known you: ssh: Could not resolve hostname you: Name or service not known guard.: ssh: connect to host guard. port 22: Connection refused which: ssh: connect to host which port 22: Connection refused have: ssh: connect to host have port 22: Connection refused VM: ssh: connect to host vm port 22: Connection refused try: ssh: connect to host try port 22: Connection refused 64-Bit: ssh: connect to host 64-bit port 22: Connection refused VM: ssh: connect to host vm port 22: Connection refused Server: ssh: connect to host server port 22: Connection refused have: ssh: connect to host have port 22: Connection refused loaded: ssh: connect to host loaded port 22: Connection refused disabled: ssh: connect to host disabled port 22: Connection refused will: ssh: connect to host will port 22: Connection refused might: ssh: connect to host might port 22: Connection refused The: ssh: connect to host the port 22: Connection refused fix: ssh: connect to host fix port 22: Connection refused library: ssh: connect to host library port 22: Connection refused stack: ssh: connect to host stack port 22: Connection refused the: ssh: connect to host the port 22: Connection refused fix: ssh: connect to host fix port 22: Connection refused that: ssh: connect to host that port 22: Connection refused with: ssh: connect to host with port 22: Connection refused recommended: ssh: connect to host recommended port 22: Connection refused the: ssh: connect to host the port 22: Connection refused highly: ssh: connect to host highly port 22: Connection refused guard: ssh: connect to host guard port 22: Connection refused or: ssh: connect to host or port 22: Connection refused with: ssh: connect to host with port 22: Connection refused library: ssh: connect to host library port 22: Connection refused stack: ssh: connect to host stack port 22: Connection refused tony@tony001's password: Tony001: Connection closed by 192.168.220.128 port 22 Starting secondary namenodes [Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /home/tony/app/hadoop-2.4.1/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now. It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'. 0.0.0.0] sed: -e expression #1, char 6: unknown option tos’
HotSpot™: ssh: Could not resolve hostname hotspot™: Name or service not known
-c: Unknown cipher type ‘cd’
warning:: ssh: Could not resolve hostname warning:: Name or service not known
',: ssh: Could not resolve hostname ',: Name or service not known
‘execstack: ssh: Could not resolve hostname ‘execstack: Name or service not known
It’s: ssh: Could not resolve hostname it’s: Name or service not known
now.: ssh: Could not resolve hostname now.: Name or service not known
noexecstack’.: ssh: Could not resolve hostname noexecstack’.: Name or service not known
'-z: ssh: Could not resolve hostname '-z: Name or service not known
tony@0.0.0.0’s password:
0.0.0.0: starting secondarynamenode, logging to /home/tony/app/hadoop-2.4.1/logs/hadoop-tony-secondarynamenode-Tony001.out
Java: ssh: Could not resolve hostname java: Name or service not known
You: ssh: Could not resolve hostname you: Name or service not known
to: ssh: Could not resolve hostname to: Name or service not known
link: ssh: Could not resolve hostname link: Name or service not known
you: ssh: Could not resolve hostname you: Name or service not known
it: ssh: Could not resolve hostname it: Name or service not known
guard.: ssh: connect to host guard. port 22: Connection refused
stack: ssh: connect to host stack port 22: Connection refused
which: ssh: connect to host which port 22: Connection refused
library: ssh: connect to host library port 22: Connection refused
Server: ssh: connect to host server port 22: Connection refused
have: ssh: connect to host have port 22: Connection refused
might: ssh: connect to host might port 22: Connection refused
loaded: ssh: connect to host loaded port 22: Connection refused
disabled: ssh: connect to host disabled port 22: Connection refused
VM: ssh: connect to host vm port 22: Connection refused
64-Bit: ssh: connect to host 64-bit port 22: Connection refused
the: ssh: connect to host the port 22: Connection refused
that: ssh: connect to host that port 22: Connection refused
fix: ssh: connect to host fix port 22: Connection refused
have: ssh: connect to host have port 22: Connection refused
The: ssh: connect to host the port 22: Connection refused
stack: ssh: connect to host stack port 22: Connection refused
with: ssh: connect to host with port 22: Connection refused
will: ssh: connect to host will port 22: Connection refused
fix: ssh: connect to host fix port 22: Connection refused
or: ssh: connect to host or port 22: Connection refused
VM: ssh: connect to host vm port 22: Connection refused
the: ssh: connect to host the port 22: Connection refused
try: ssh: connect to host try port 22: Connection refused
highly: ssh: connect to host highly port 22: Connection refused
recommended: ssh: connect to host recommended port 22: Connection refused
library: ssh: connect to host library port 22: Connection refused
guard: ssh: connect to host guard port 22: Connection refused
with: ssh: connect to host with port 22: Connection refused
20/03/06 05:09:41 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform… using builtin-java classes where applicable

检查防火墙发现

sudo service iptables status

Redirecting to /bin/systemctl status iptables.service
Unit iptables.service could not be found.

切到root用户安装服务
yum install iptables-services

安装完服务后,关闭hadoop,再次启动hadoop可成功
start-dfs.sh
20/03/06 05:34:19 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform… using builtin-java classes where applicable
Starting namenodes on [Tony001]
tony@tony001’s password:
Tony001: starting namenode, logging to /home/tony/app/hadoop-2.4.1/logs/hadoop-tony-namenode-Tony001.out
tony@tony001’s password:
Tony001: starting datanode, logging to /home/tony/app/hadoop-2.4.1/logs/hadoop-tony-datanode-Tony001.out
Starting secondary namenodes [0.0.0.0]
tony@0.0.0.0’s password:
0.0.0.0: starting secondarynamenode, logging to /home/tony/app/hadoop-2.4.1/logs/hadoop-tony-secondarynamenode-Tony001.out
20/03/06 05:34:55 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform… using builtin-java classes where applicable

启动yarn

start-yarn.sh
starting yarn daemons
starting resourcemanager, logging to /home/tony/app/hadoop-2.4.1/logs/yarn-tony-resourcemanager-Tony001.out
tony@tony001’s password:
Tony001: starting nodemanager, logging to /home/tony/app/hadoop-2.4.1/logs/yarn-tony-nodemanager-Tony001.out

登录浏览器50070无法访问时

检查防火墙状态

firewall-cmd --state

running

关掉防火墙
systemctl stop firewalld.service

再次检查
not running

上一篇:解决使用putty 连接Windows主机与Linux虚拟机出现提示network error:connection refused问题


下一篇:hiveserver2连接出错如下:Error: Could not open client transport with JDBC Uri: jdbc:hive2://hadoop01:10000: