我正在通过 VMware 在 ubuntu 14.04 上设置 Hadoop-2.7.2。
按照 michael g. noll 的教程中描述的步骤,当我尝试这样做时,
/usr/local/hadoop/sbin/start-all.sh
我得到了这个东西,
Instead use start-dfs.sh and start-yarn.sh
16/07/22 04:16:01 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [OpenJDK Client VM warning: You have loaded library /usr/local/hadoop/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'.
localhost]
sed: -e expression #1, char 6: unknown option to `s'
guard.: ssh: Could not resolve hostname guard.: Name or service not known
-c: Unknown cipher type 'cd'
now.: ssh: Could not resolve hostname now.: Name or service not known
noexecstack'.: ssh: Could not resolve hostname noexecstack'.: Name or service not known
localhost: starting namenode, logging to /usr/local/hadoop/logs/hadoop-hduser-namenode-ubuntu.out
have: ssh: Could not resolve hostname have: Name or service not known
might: ssh: Could not resolve hostname might: Name or service not known
library: ssh: Could not resolve hostname library: Name or service not known
which: ssh: Could not resolve hostname which: Name or service not known
loaded: ssh: Could not resolve hostname loaded: Name or service not known
VM: ssh: Could not resolve hostname vm: Name or service not known
try: ssh: Could not resolve hostname try: Name or service not known
stack: ssh: Could not resolve hostname stack: Name or service not known
have: ssh: Could not resolve hostname have: Name or service not known
You: ssh: Could not resolve hostname you: Name or service not known
The: ssh: Could not resolve hostname the: Name or service not known
to: ssh: Could not resolve hostname to: Name or service not known
Client: ssh: Could not resolve hostname client: Name or service not known
disabled: ssh: Could not resolve hostname disabled: Name or service not known
OpenJDK: ssh: Could not resolve hostname openjdk: Name or service not known
will: ssh: Could not resolve hostname will: Name or service not known
fix: ssh: Could not resolve hostname fix: Name or service not known
VM: ssh: Could not resolve hostname vm: Name or service not known
the: ssh: Could not resolve hostname the: Name or service not known
that: ssh: Could not resolve hostname that: Name or service not known
guard: ssh: Could not resolve hostname guard: Name or service not known
stack: ssh: Could not resolve hostname stack: Name or service not known
recommended: ssh: Could not resolve hostname recommended: Name or service not
known
you: ssh: Could not resolve hostname you: Name or service not known
highly: ssh: Could not resolve hostname highly: Name or service not known
library: ssh: Could not resolve hostname library: Name or service not known
link: ssh: Could not resolve hostname link: Name or service not known
the: ssh: Could not resolve hostname the: Name or service not known
fix: ssh: Could not resolve hostname fix: Name or service not known
with: ssh: Could not resolve hostname with: Name or service not known
or: ssh: Could not resolve hostname or: Name or service not known
with: ssh: Could not resolve hostname with: Name or service not known
it: ssh: Could not resolve hostname it: Name or service not known
warning:: ssh: Could not resolve hostname warning:: 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
'execstack: ssh: Could not resolve hostname 'execstack: Name or service not
known
'-z: ssh: Could not resolve hostname '-z: Name or service not known
The authenticity of host '0.0.0.0 (0.0.0.0)' can't be established.
ECDSA key fingerprint is 12:89:78:95:e5:a9:e8:84:1d:6b:c5:c9:29:16:3b:f3.
Are you sure you want to continue connecting (yes/no)? have: ssh: Could not
resolve hostname have: Name or service not known
localhost: starting nodemanager, logging to /usr/local/hadoop/logs/yarn-hduser-nodemanager-ubuntu.out
当我执行 stop-all.sh 时,它给出了同样的错误
我尝试通过安装 execstack 并运行命令来修复它
execstack -c /usr/local/hadoop/lib/native/lib-hadoop.so.1.0.
这个内容传达了同样的信息,
localhost: namenode running as process 6003. Stop it first.
'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
warning:: ssh: Could not resolve hostname warning:: Name or service not known
'-z: ssh: Could not resolve hostname '-z: Name or service not known
<libfile>',: ssh: Could not resolve hostname <libfile>',: Name or service not known
localhost: starting datanode, logging to /usr/local/hadoop/logs/hadoop-hduser-datanode-ubuntu.out
Starting secondary namenodes [OpenJDK Client VM warning: You have loaded library /usr/local/hadoop/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]
除此之外,我可以连接到我的 namenode Web UI,但无法连接到 Jobtracker 和 Tasktracker。
这可能是 Linux 错误。不知道如何解决。
答案1
编辑主机文件
sudo nano /etc/hosts
查看您的设备名称是否与 hosts 文件中的设备名称匹配
例如 kingpc 是与 hosts 文件中的名称匹配的设备名称