几个因为hadoop配置文件不当造成的错误
192.168.1.20: Exception in thread "main" java.lang.IllegalArgumentException
192.168.1.20: at java.net.URI.create(URI.java:841)
192.168.1.20: at org.apache.hadoop.fs.FileSystem.getDefaultUri(FileSystem.java:132)
192.168.1.20: at org.apache.hadoop.hdfs.server.namenode.NameNode.getAddress(NameNode.java:244)
192.168.1.20: at org.apache.hadoop.hdfs.server.namenode.NameNode.getServiceAddress(NameNode.java:236)
192.168.1.20: at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.initialize(SecondaryNameNode.java:194)
192.168.1.20: at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.<init>(SecondaryNameNode.java:150)
192.168.1.20: at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.main(SecondaryNameNode.java:676)
192.168.1.20: Caused by: java.net.URISyntaxException: Illegal character in authority at index 7: hdfs://192.168.1.20:9000
192.168.1.20: at java.net.URI$Parser.fail(URI.java:2810)
The reason is in core-site.xml hdfs://master:9000 </value>多了一个空格。
[hadoop@Master bin]$ start-all.sh
Warning: $HADOOP_HOME is deprecated.
starting namenode, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-namenode-Master.Hadoop.out
192.168.1.23: starting datanode, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-datanode-Slave3.Hadoop.out
192.168.1.21: starting datanode, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-datanode-Slave1.Hadoop.out
192.168.1.22: starting datanode, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-datanode-Slave2.Hadoop.out
192.168.1.21: [Fatal Error] core-site.xml:24:1: Content is not allowed in trailing section.
192.168.1.20: starting secondarynamenode, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-secondarynamenode-Master.Hadoop.out
starting jobtracker, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-jobtracker-Master.Hadoop.out
192.168.1.23: starting tasktracker, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-tasktracker-Slave3.Hadoop.out
192.168.1.22: starting tasktracker, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-tasktracker-Slave2.Hadoop.out
192.168.1.21: starting tasktracker, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-tasktracker-Slave1.Hadoop.out
192.168.1.21: [Fatal Error] core-site.xml:24:1: Content is not allowed in trailing section.
core-site.xml 后边有空格或者空行
[hadoop@Master bin]$ start-all.sh
Warning: $HADOOP_HOME is deprecated.
starting namenode, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-namenode-Master.Hadoop.out
192.168.1.23: starting datanode, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-datanode-Slave3.Hadoop.out
192.168.1.21: starting datanode, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-datanode-Slave1.Hadoop.out
192.168.1.22: starting datanode, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-datanode-Slave2.Hadoop.out
192.168.1.20: starting secondarynamenode, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-secondarynamenode-Master.Hadoop.out
starting jobtracker, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-jobtracker-Master.Hadoop.out
192.168.1.22: starting tasktracker, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-tasktracker-Slave2.Hadoop.out
192.168.1.23: starting tasktracker, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-tasktracker-Slave3.Hadoop.out
192.168.1.21: starting tasktracker, logging to /usr/hadoop/libexec/../logs/hadoop-hadoop-tasktracker-Slave1.Hadoop.out
[hadoop@Master bin]$ cd
[hadoop@Master ~]$ ll /usr/hadoop/tmp
total 4
drwxrwxr-x 4 hadoop hadoop 4096 Oct 29 13:31 dfs
succeed in Master!
BUT not open MapReduce in Slaves
Last login: Tue Oct 29 11:26:27 2013 from superserver.home
[hadoop@Slave3 ~]$ ll /usr/hadoop/tmp/
total 4
drwxrwxr-x 3 hadoop hadoop 4096 Oct 29 13:31 dfs
[hadoop@Slave3 ~]$
Problable Solution:
The reason is in mapred-site.xml http://192.168.1.20:9000 </value>多了一个空格