hadoop安装错误

3qpi33ja  于 2021-06-03  发布在  Hadoop
关注(0)|答案(2)|浏览(474)

我正在尝试安装 Hadoop 在软呢帽机上看到这里
已安装java(并验证java是否存在) java -version )它是存在的
我安装了ssh(因为它是linux)
已下载最新版本 hadoop 1.0.4 从这里开始
我遵循了安装教程(上面给出的链接)中所示的过程,如下所示

$ mkdir input 
$ cp conf/*.xml input 
$ bin/hadoop jar hadoop-examples.1.0.4.jar grep input output 'dfs[a-z.]+'

然后我得到了下面的错误,我无法理解

sh-4.2$ bin/hadoop jar hadoop-examples-1.0.4.jar grep input output 'dfs[a-z.]+'
12/10/31 16:14:35 INFO util.NativeCodeLoader: Loaded the native-hadoop library
12/10/31 16:14:35 WARN snappy.LoadSnappy: Snappy native library not loaded
12/10/31 16:14:35 INFO mapred.FileInputFormat: Total input paths to process : 8
12/10/31 16:14:35 INFO mapred.JobClient: Cleaning up the staging area file:/tmp/hadoop-thomas/mapred/staging/shivakrishnab-857393825/.staging/job_local_0001
12/10/31 16:14:35 ERROR security.UserGroupInformation: PriviledgedActionException as:thomas cause:java.io.IOException: Not a file: file:/home/local/thomas/Hadoop/hadoop-1.0.4/input/conf
java.io.IOException: Not a file: file:/home/local/thomas/Hadoop/hadoop-1.0.4/input/conf
    at org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:215)
    at org.apache.hadoop.mapred.JobClient.writeOldSplits(JobClient.java:989)
    at org.apache.hadoop.mapred.JobClient.writeSplits(JobClient.java:981)
    at org.apache.hadoop.mapred.JobClient.access$600(JobClient.java:174)
    at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:897)
    at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:850)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:416)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
    at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:850)
    at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:824)
    at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1261)
    at org.apache.hadoop.examples.Grep.run(Grep.java:69)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
    at org.apache.hadoop.examples.Grep.main(Grep.java:93)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
    at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
    at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:64)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:156)

有人能告诉我我的机器/或代码有什么问题,如何避免这个错误吗?

bz4sfanl

bz4sfanl1#

首先,ssh预安装并不意味着它已经配置好了。您需要ssh和sshd以及一个密钥对。它应该是无密码的,'最好'。只要确保您能够ssh到主机没有任何错误。此外,确保所有hadoop守护进程运行良好。如果我们可以看看您的错误日志会更好。我已经在这里编写了配置hadoop的完整过程,以防您需要任何帮助。

r9f1avp5

r9f1avp52#

这可能与jvm有关,在hadoop(某些版本)中存在关于文件权限的已知问题。。所以请查看以下链接:

https://issues.apache.org/jira/browse/HADOOP-7682

希望这有帮助

相关问题