hadoop格式化namenode时报异常: URI has an authority component

今天部署2.7.1时在格式化namenode时遇到下面的错误

省略前面部分.......
16/10/26 18:32:45 ERROR namenode.NameNode: Failed to start namenode.
java.lang.IllegalArgumentException: URI has an authority component
	at java.io.File.<init>(File.java:423)
	at org.apache.hadoop.hdfs.server.namenode.NNStorage.getStorageDirectory(NNStorage.java:329)
	at org.apache.hadoop.hdfs.server.namenode.FSEditLog.initJournals(FSEditLog.java:276)
	at org.apache.hadoop.hdfs.server.namenode.FSEditLog.initJournalsForWrite(FSEditLog.java:247)
	at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:985)
	at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1429)
	at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1554)
16/10/26 18:32:45 INFO util.ExitUtil: Exiting with status 1
16/10/26 18:32:45 INFO namenode.NameNode: SHUTDOWN_MSG: 
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at poseidon01/192.168.61.120
************************************************************/

错误的原因是hdfs-site.xml配置文件中dfs.namenode.name.dir配置的有问题:

错误配置:

<property>
	<name>dfs.namenode.name.dir</name>
	<value>file://data01/hadoop/dfs/name</value>
</property>

正确配置:

<property>
	<name>dfs.namenode.name.dir</name>
	<value>file:/data01/hadoop/dfs/name</value>
</property>

说明:上面只是列出了hdfs-site.xml配置文件中关于dfs.namenode.name.dir的配置项。


再次格式化namenode,成功了:

省略前面部分....
16/10/26 18:41:32 INFO namenode.FSNamesystem: dfs.namenode.safemode.threshold-pct = 0.9990000128746033
16/10/26 18:41:32 INFO namenode.FSNamesystem: dfs.namenode.safemode.min.datanodes = 0
16/10/26 18:41:32 INFO namenode.FSNamesystem: dfs.namenode.safemode.extension     = 30000
16/10/26 18:41:32 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.window.num.buckets = 10
16/10/26 18:41:32 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.num.users = 10
16/10/26 18:41:32 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.windows.minutes = 1,5,25
16/10/26 18:41:32 INFO namenode.FSNamesystem: Retry cache on namenode is enabled
16/10/26 18:41:32 INFO namenode.FSNamesystem: Retry cache will use 0.03 of total heap and retry cache entry expiry time is 600000 millis
16/10/26 18:41:32 INFO util.GSet: Computing capacity for map NameNodeRetryCache
16/10/26 18:41:32 INFO util.GSet: VM type       = 64-bit
16/10/26 18:41:32 INFO util.GSet: 0.029999999329447746% max memory 966.7 MB = 297.0 KB
16/10/26 18:41:32 INFO util.GSet: capacity      = 2^15 = 32768 entries
16/10/26 18:41:32 INFO namenode.FSImage: Allocated new BlockPoolId: BP-380982764-192.168.61.120-1477478492348
16/10/26 18:41:32 INFO common.Storage: Storage directory /data01/hadoop/dfs/name has been successfully formatted.
16/10/26 18:41:33 INFO namenode.NNStorageRetentionManager: Going to retain 1 images with txid >= 0
16/10/26 18:41:33 INFO util.ExitUtil: Exiting with status 0
16/10/26 18:41:33 INFO namenode.NameNode: SHUTDOWN_MSG: 
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at poseidon01/192.168.61.120
************************************************************/










阅读更多
个人分类: hadoop
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭