hadoop namenode -format 格式化失败及解决方案
1. 使用命令hadoop namenode -format 对namenode进行格式化,报错如下所示:
[hadoop@bj05-ops-photo04 bin]$ ./hadoop namenode -format DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it. 18/07/30 10:33:00 INFO namenode.NameNode: STARTUP_MSG: /************************************************************ STARTUP_MSG: Starting NameNode STARTUP_MSG: user = hadoop STARTUP_MSG: host = bj05-ops-photo04.dev.gomeplus.com/10.112.178.129 STARTUP_MSG: args = [-format] STARTUP_MSG: version = 2.8.4 STARTUP_MSG: classpath = /opt/hadoop-2.8.4/etc/hadoop:/opt/hadoop-2.8.4/share/hadoop/common/lib/jersey-server-1.9.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/commons-compress-1.4.1.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/zookeeper-3.4.6.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/commons-collections-3.2.2.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/xmlenc-0.52.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/jsr305-3.0.0.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/protobuf-java-2.5.0.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/servlet-api-2.5.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/jaxb-api-2.2.2.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/httpclient-4.5.2.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/paranamer-2.3.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/jsch-0.1.54.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/stax-api-1.0-2.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/jettison-1.1.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/jersey-core-1.9.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/commons-logging-1.1.3.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/slf4j-api-1.7.10.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/curator-framework-2.7.1.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/jetty-util-6.1.26.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/junit-4.11.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/hamcrest-core-1.3.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/avro-1.7.4.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/log4j-1.2.17.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/asm-3.2.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/jersey-json-1.9.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/nimbus-jose-jwt-4.41.1.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/jackson-jaxrs-1.9.13.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/mockito-all-1.8.5.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/apacheds-kerberos-codec-2.0.0-M15.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/hadoop-annotations-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/commons-digester-1.8.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/htrace-core4-4.0.1-incubating.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/netty-3.6.2.Final.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/commons-configuration-1.6.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/jcip-annotations-1.0-1.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/api-asn1-api-1.0.0-M20.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/xz-1.0.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/apacheds-i18n-2.0.0-M15.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/api-util-1.0.0-M20.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/jackson-xc-1.9.13.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/jetty-sslengine-6.1.26.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/commons-beanutils-core-1.8.0.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/commons-cli-1.2.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/activation-1.1.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/hadoop-auth-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/curator-client-2.7.1.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/jackson-mapper-asl-1.9.13.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/commons-lang-2.6.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/jackson-core-asl-1.9.13.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/jets3t-0.9.0.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/commons-io-2.4.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/commons-codec-1.4.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/jetty-6.1.26.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/commons-math3-3.1.1.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/commons-net-3.1.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/commons-beanutils-1.7.0.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/guava-11.0.2.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/json-smart-1.3.1.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/jsp-api-2.1.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/gson-2.2.4.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/httpcore-4.4.4.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/snappy-java-1.0.4.1.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/java-xmlbuilder-0.4.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/jaxb-impl-2.2.3-1.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar:/opt/hadoop-2.8.4/share/hadoop/common/lib/curator-recipes-2.7.1.jar:/opt/hadoop-2.8.4/share/hadoop/common/hadoop-nfs-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/common/hadoop-common-2.8.4-tests.jar:/opt/hadoop-2.8.4/share/hadoop/common/hadoop-common-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/jersey-server-1.9.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/leveldbjni-all-1.8.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/xmlenc-0.52.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/jsr305-3.0.0.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/protobuf-java-2.5.0.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/servlet-api-2.5.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/okhttp-2.4.0.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/xml-apis-1.3.04.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/jersey-core-1.9.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/commons-logging-1.1.3.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/commons-daemon-1.0.13.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/jetty-util-6.1.26.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/netty-all-4.0.23.Final.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/log4j-1.2.17.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/asm-3.2.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/htrace-core4-4.0.1-incubating.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/netty-3.6.2.Final.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/xercesImpl-2.9.1.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/commons-cli-1.2.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/jackson-mapper-asl-1.9.13.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/commons-lang-2.6.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/jackson-core-asl-1.9.13.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/hadoop-hdfs-client-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/commons-io-2.4.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/commons-codec-1.4.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/jetty-6.1.26.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/guava-11.0.2.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/lib/okio-1.4.0.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/hadoop-hdfs-client-2.8.4-tests.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/hadoop-hdfs-nfs-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/hadoop-hdfs-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/hadoop-hdfs-native-client-2.8.4-tests.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/hadoop-hdfs-client-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/hadoop-hdfs-2.8.4-tests.jar:/opt/hadoop-2.8.4/share/hadoop/hdfs/hadoop-hdfs-native-client-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/jersey-server-1.9.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/commons-compress-1.4.1.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/zookeeper-3.4.6.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/java-util-1.9.0.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/leveldbjni-all-1.8.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/commons-collections-3.2.2.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/jsr305-3.0.0.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/protobuf-java-2.5.0.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/servlet-api-2.5.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/jaxb-api-2.2.2.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/guice-servlet-3.0.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/stax-api-1.0-2.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/jettison-1.1.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/jersey-core-1.9.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/fst-2.50.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/commons-logging-1.1.3.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/javax.inject-1.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/commons-math-2.2.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/jetty-util-6.1.26.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/log4j-1.2.17.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/asm-3.2.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/zookeeper-3.4.6-tests.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/jersey-json-1.9.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/jackson-jaxrs-1.9.13.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/netty-3.6.2.Final.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/xz-1.0.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/jackson-xc-1.9.13.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/commons-cli-1.2.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/activation-1.1.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/aopalliance-1.0.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/javassist-3.18.1-GA.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/jersey-guice-1.9.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/jersey-client-1.9.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/curator-client-2.7.1.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/jackson-mapper-asl-1.9.13.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/commons-lang-2.6.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/jackson-core-asl-1.9.13.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/commons-io-2.4.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/guice-3.0.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/commons-codec-1.4.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/jetty-6.1.26.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/guava-11.0.2.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/curator-test-2.7.1.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/json-io-2.5.1.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/lib/jaxb-impl-2.2.3-1.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/hadoop-yarn-server-nodemanager-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/hadoop-yarn-applications-distributedshell-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/hadoop-yarn-server-tests-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/hadoop-yarn-server-timeline-pluginstorage-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/hadoop-yarn-applications-unmanaged-am-launcher-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/hadoop-yarn-client-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/hadoop-yarn-server-resourcemanager-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/hadoop-yarn-server-applicationhistoryservice-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/hadoop-yarn-api-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/hadoop-yarn-server-sharedcachemanager-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/hadoop-yarn-server-common-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/hadoop-yarn-server-web-proxy-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/hadoop-yarn-common-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/yarn/hadoop-yarn-registry-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/jersey-server-1.9.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/commons-compress-1.4.1.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/leveldbjni-all-1.8.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/protobuf-java-2.5.0.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/guice-servlet-3.0.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/paranamer-2.3.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/jersey-core-1.9.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/javax.inject-1.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/junit-4.11.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/hamcrest-core-1.3.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/avro-1.7.4.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/log4j-1.2.17.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/asm-3.2.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/hadoop-annotations-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/netty-3.6.2.Final.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/xz-1.0.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/aopalliance-1.0.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/jersey-guice-1.9.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/jackson-mapper-asl-1.9.13.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/jackson-core-asl-1.9.13.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/commons-io-2.4.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/guice-3.0.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/lib/snappy-java-1.0.4.1.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-plugins-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/hadoop-mapreduce-client-app-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/hadoop-mapreduce-client-common-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/hadoop-mapreduce-client-shuffle-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.8.4.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.8.4-tests.jar:/opt/hadoop-2.8.4/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.8.4.jar:/contrib/capacity-scheduler/*.jar:/contrib/capacity-scheduler/*.jar STARTUP_MSG: build = https://git-wip-us.apache.org/repos/asf/hadoop.git -r 17e75c2a11685af3e043aa5e604dc831e5b14674; compiled by 'jdu' on 2018-05-08T02:50Z STARTUP_MSG: java = 1.8.0_65 ************************************************************/ 18/07/30 10:33:00 INFO namenode.NameNode: registered UNIX signal handlers for [TERM, HUP, INT] 18/07/30 10:33:00 INFO namenode.NameNode: createNameNode [-format] Formatting using clusterid: CID-4c9eb15c-81aa-4371-b61e-b217ac35d15b 18/07/30 10:33:01 INFO namenode.FSEditLog: Edit logging is async:true 18/07/30 10:33:01 INFO namenode.FSNamesystem: KeyProvider: null 18/07/30 10:33:01 INFO namenode.FSNamesystem: fsLock is fair: true 18/07/30 10:33:01 INFO namenode.FSNamesystem: Detailed lock hold time metrics enabled: false 18/07/30 10:33:01 INFO blockmanagement.DatanodeManager: dfs.block.invalidate.limit=1000 18/07/30 10:33:01 INFO blockmanagement.DatanodeManager: dfs.namenode.datanode.registration.ip-hostname-check=true 18/07/30 10:33:01 INFO blockmanagement.BlockManager: dfs.namenode.startup.delay.block.deletion.sec is set to 000:00:00:00.000 18/07/30 10:33:01 INFO blockmanagement.BlockManager: The block deletion will start around 2018 Jul 30 10:33:01 18/07/30 10:33:01 INFO util.GSet: Computing capacity for map BlocksMap 18/07/30 10:33:01 INFO util.GSet: VM type = 64-bit 18/07/30 10:33:01 INFO util.GSet: 2.0% max memory 889 MB = 17.8 MB 18/07/30 10:33:01 INFO util.GSet: capacity = 2^21 = 2097152 entries 18/07/30 10:33:01 INFO blockmanagement.BlockManager: dfs.block.access.token.enable=false 18/07/30 10:33:01 INFO blockmanagement.BlockManager: defaultReplication = 2 18/07/30 10:33:01 INFO blockmanagement.BlockManager: maxReplication = 512 18/07/30 10:33:01 INFO blockmanagement.BlockManager: minReplication = 1 18/07/30 10:33:01 INFO blockmanagement.BlockManager: maxReplicationStreams = 2 18/07/30 10:33:01 INFO blockmanagement.BlockManager: replicationRecheckInterval = 3000 18/07/30 10:33:01 INFO blockmanagement.BlockManager: encryptDataTransfer = false 18/07/30 10:33:01 INFO blockmanagement.BlockManager: maxNumBlocksToLog = 1000 18/07/30 10:33:01 INFO namenode.FSNamesystem: fsOwner = hadoop (auth:SIMPLE) 18/07/30 10:33:01 INFO namenode.FSNamesystem: supergroup = supergroup 18/07/30 10:33:01 INFO namenode.FSNamesystem: isPermissionEnabled = false 18/07/30 10:33:01 INFO namenode.FSNamesystem: Determined nameservice ID: namenodeHaclusterDev 18/07/30 10:33:01 INFO namenode.FSNamesystem: HA Enabled: true 18/07/30 10:33:01 INFO namenode.FSNamesystem: Append Enabled: true 18/07/30 10:33:01 INFO util.GSet: Computing capacity for map INodeMap 18/07/30 10:33:01 INFO util.GSet: VM type = 64-bit 18/07/30 10:33:01 INFO util.GSet: 1.0% max memory 889 MB = 8.9 MB 18/07/30 10:33:01 INFO util.GSet: capacity = 2^20 = 1048576 entries 18/07/30 10:33:01 INFO namenode.FSDirectory: ACLs enabled? false 18/07/30 10:33:01 INFO namenode.FSDirectory: XAttrs enabled? true 18/07/30 10:33:01 INFO namenode.NameNode: Caching file names occurring more than 10 times 18/07/30 10:33:01 INFO util.GSet: Computing capacity for map cachedBlocks 18/07/30 10:33:01 INFO util.GSet: VM type = 64-bit 18/07/30 10:33:01 INFO util.GSet: 0.25% max memory 889 MB = 2.2 MB 18/07/30 10:33:01 INFO util.GSet: capacity = 2^18 = 262144 entries 18/07/30 10:33:01 INFO namenode.FSNamesystem: dfs.namenode.safemode.threshold-pct = 0.9990000128746033 18/07/30 10:33:01 INFO namenode.FSNamesystem: dfs.namenode.safemode.min.datanodes = 0 18/07/30 10:33:01 INFO namenode.FSNamesystem: dfs.namenode.safemode.extension = 30000 18/07/30 10:33:01 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.window.num.buckets = 10 18/07/30 10:33:01 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.num.users = 10 18/07/30 10:33:01 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.windows.minutes = 1,5,25 18/07/30 10:33:01 INFO namenode.FSNamesystem: Retry cache on namenode is enabled 18/07/30 10:33:01 INFO namenode.FSNamesystem: Retry cache will use 0.03 of total heap and retry cache entry expiry time is 600000 millis 18/07/30 10:33:01 INFO util.GSet: Computing capacity for map NameNodeRetryCache 18/07/30 10:33:01 INFO util.GSet: VM type = 64-bit 18/07/30 10:33:01 INFO util.GSet: 0.029999999329447746% max memory 889 MB = 273.1 KB 18/07/30 10:33:01 INFO util.GSet: capacity = 2^15 = 32768 entries 18/07/30 10:33:02 INFO ipc.Client: Retrying connect to server: bj05-ops-photo04.dev.gomeplus.com/10.112.178.129:8485. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:02 INFO ipc.Client: Retrying connect to server: bj05-ops-photo02.dev.gomeplus.com/10.112.178.127:8485. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:02 INFO ipc.Client: Retrying connect to server: bj05-ops-photo03.dev.gomeplus.com/10.112.178.128:8485. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:03 INFO ipc.Client: Retrying connect to server: bj05-ops-photo04.dev.gomeplus.com/10.112.178.129:8485. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:03 INFO ipc.Client: Retrying connect to server: bj05-ops-photo03.dev.gomeplus.com/10.112.178.128:8485. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:03 INFO ipc.Client: Retrying connect to server: bj05-ops-photo02.dev.gomeplus.com/10.112.178.127:8485. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:04 INFO ipc.Client: Retrying connect to server: bj05-ops-photo04.dev.gomeplus.com/10.112.178.129:8485. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:04 INFO ipc.Client: Retrying connect to server: bj05-ops-photo03.dev.gomeplus.com/10.112.178.128:8485. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:04 INFO ipc.Client: Retrying connect to server: bj05-ops-photo02.dev.gomeplus.com/10.112.178.127:8485. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:05 INFO ipc.Client: Retrying connect to server: bj05-ops-photo04.dev.gomeplus.com/10.112.178.129:8485. Already tried 3 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:05 INFO ipc.Client: Retrying connect to server: bj05-ops-photo02.dev.gomeplus.com/10.112.178.127:8485. Already tried 3 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:05 INFO ipc.Client: Retrying connect to server: bj05-ops-photo03.dev.gomeplus.com/10.112.178.128:8485. Already tried 3 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:06 INFO ipc.Client: Retrying connect to server: bj05-ops-photo04.dev.gomeplus.com/10.112.178.129:8485. Already tried 4 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:06 INFO ipc.Client: Retrying connect to server: bj05-ops-photo03.dev.gomeplus.com/10.112.178.128:8485. Already tried 4 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:06 INFO ipc.Client: Retrying connect to server: bj05-ops-photo02.dev.gomeplus.com/10.112.178.127:8485. Already tried 4 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:07 INFO ipc.Client: Retrying connect to server: bj05-ops-photo04.dev.gomeplus.com/10.112.178.129:8485. Already tried 5 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:07 INFO ipc.Client: Retrying connect to server: bj05-ops-photo02.dev.gomeplus.com/10.112.178.127:8485. Already tried 5 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:07 INFO ipc.Client: Retrying connect to server: bj05-ops-photo03.dev.gomeplus.com/10.112.178.128:8485. Already tried 5 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:08 INFO ipc.Client: Retrying connect to server: bj05-ops-photo04.dev.gomeplus.com/10.112.178.129:8485. Already tried 6 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:08 INFO ipc.Client: Retrying connect to server: bj05-ops-photo02.dev.gomeplus.com/10.112.178.127:8485. Already tried 6 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:08 INFO ipc.Client: Retrying connect to server: bj05-ops-photo03.dev.gomeplus.com/10.112.178.128:8485. Already tried 6 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:09 INFO ipc.Client: Retrying connect to server: bj05-ops-photo04.dev.gomeplus.com/10.112.178.129:8485. Already tried 7 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:09 INFO ipc.Client: Retrying connect to server: bj05-ops-photo03.dev.gomeplus.com/10.112.178.128:8485. Already tried 7 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:09 INFO ipc.Client: Retrying connect to server: bj05-ops-photo02.dev.gomeplus.com/10.112.178.127:8485. Already tried 7 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:10 INFO ipc.Client: Retrying connect to server: bj05-ops-photo04.dev.gomeplus.com/10.112.178.129:8485. Already tried 8 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:10 INFO ipc.Client: Retrying connect to server: bj05-ops-photo02.dev.gomeplus.com/10.112.178.127:8485. Already tried 8 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:10 INFO ipc.Client: Retrying connect to server: bj05-ops-photo03.dev.gomeplus.com/10.112.178.128:8485. Already tried 8 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:11 INFO ipc.Client: Retrying connect to server: bj05-ops-photo04.dev.gomeplus.com/10.112.178.129:8485. Already tried 9 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:11 INFO ipc.Client: Retrying connect to server: bj05-ops-photo02.dev.gomeplus.com/10.112.178.127:8485. Already tried 9 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:11 INFO ipc.Client: Retrying connect to server: bj05-ops-photo03.dev.gomeplus.com/10.112.178.128:8485. Already tried 9 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 18/07/30 10:33:11 WARN ipc.Client: Failed to connect to server: bj05-ops-photo04.dev.gomeplus.com/10.112.178.129:8485: retries get failed due to exceeded maximum allowed retries number: 10 java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206) at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:531) at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:685) at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:788) at org.apache.hadoop.ipc.Client$Connection.access$3500(Client.java:410) at org.apache.hadoop.ipc.Client.getConnection(Client.java:1550) at org.apache.hadoop.ipc.Client.call(Client.java:1381) at org.apache.hadoop.ipc.Client.call(Client.java:1345) at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:227) at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:116) at com.sun.proxy.$Proxy7.isFormatted(Unknown Source) at org.apache.hadoop.hdfs.qjournal.protocolPB.QJournalProtocolTranslatorPB.isFormatted(QJournalProtocolTranslatorPB.java:101) at org.apache.hadoop.hdfs.qjournal.client.IPCLoggerChannel$4.call(IPCLoggerChannel.java:333) at org.apache.hadoop.hdfs.qjournal.client.IPCLoggerChannel$4.call(IPCLoggerChannel.java:330) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 18/07/30 10:33:11 WARN ipc.Client: Failed to connect to server: bj05-ops-photo02.dev.gomeplus.com/10.112.178.127:8485: retries get failed due to exceeded maximum allowed retries number: 10 java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206) at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:531) at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:685) at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:788) at org.apache.hadoop.ipc.Client$Connection.access$3500(Client.java:410) at org.apache.hadoop.ipc.Client.getConnection(Client.java:1550) at org.apache.hadoop.ipc.Client.call(Client.java:1381) at org.apache.hadoop.ipc.Client.call(Client.java:1345) at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:227) at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:116) at com.sun.proxy.$Proxy7.isFormatted(Unknown Source) at org.apache.hadoop.hdfs.qjournal.protocolPB.QJournalProtocolTranslatorPB.isFormatted(QJournalProtocolTranslatorPB.java:101) at org.apache.hadoop.hdfs.qjournal.client.IPCLoggerChannel$4.call(IPCLoggerChannel.java:333) at org.apache.hadoop.hdfs.qjournal.client.IPCLoggerChannel$4.call(IPCLoggerChannel.java:330) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 18/07/30 10:33:11 WARN ipc.Client: Failed to connect to server: bj05-ops-photo03.dev.gomeplus.com/10.112.178.128:8485: retries get failed due to exceeded maximum allowed retries number: 10 java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206) at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:531) at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:685) at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:788) at org.apache.hadoop.ipc.Client$Connection.access$3500(Client.java:410) at org.apache.hadoop.ipc.Client.getConnection(Client.java:1550) at org.apache.hadoop.ipc.Client.call(Client.java:1381) at org.apache.hadoop.ipc.Client.call(Client.java:1345) at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:227) at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:116) at com.sun.proxy.$Proxy7.isFormatted(Unknown Source) at org.apache.hadoop.hdfs.qjournal.protocolPB.QJournalProtocolTranslatorPB.isFormatted(QJournalProtocolTranslatorPB.java:101) at org.apache.hadoop.hdfs.qjournal.client.IPCLoggerChannel$4.call(IPCLoggerChannel.java:333) at org.apache.hadoop.hdfs.qjournal.client.IPCLoggerChannel$4.call(IPCLoggerChannel.java:330) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 18/07/30 10:33:11 WARN namenode.NameNode: Encountered exception during format: org.apache.hadoop.hdfs.qjournal.client.QuorumException: Unable to check if JNs are ready for formatting. 3 exceptions thrown: 10.112.178.129:8485: Call From bj05-ops-photo04.dev.gomeplus.com/10.112.178.129 to bj05-ops-photo04.dev.gomeplus.com:8485 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused 10.112.178.127:8485: Call From bj05-ops-photo04.dev.gomeplus.com/10.112.178.129 to bj05-ops-photo02.dev.gomeplus.com:8485 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused 10.112.178.128:8485: Call From bj05-ops-photo04.dev.gomeplus.com/10.112.178.129 to bj05-ops-photo03.dev.gomeplus.com:8485 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused at org.apache.hadoop.hdfs.qjournal.client.QuorumException.create(QuorumException.java:81) at org.apache.hadoop.hdfs.qjournal.client.QuorumCall.rethrowException(QuorumCall.java:286) at org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager.hasSomeData(QuorumJournalManager.java:233) at org.apache.hadoop.hdfs.server.common.Storage.confirmFormat(Storage.java:917) at org.apache.hadoop.hdfs.server.namenode.FSImage.confirmFormat(FSImage.java:189) at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1121) at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1567) at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1694) 18/07/30 10:33:11 ERROR namenode.NameNode: Failed to start namenode. org.apache.hadoop.hdfs.qjournal.client.QuorumException: Unable to check if JNs are ready for formatting. 3 exceptions thrown: 10.112.178.129:8485: Call From bj05-ops-photo04.dev.gomeplus.com/10.112.178.129 to bj05-ops-photo04.dev.gomeplus.com:8485 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused 10.112.178.127:8485: Call From bj05-ops-photo04.dev.gomeplus.com/10.112.178.129 to bj05-ops-photo02.dev.gomeplus.com:8485 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused 10.112.178.128:8485: Call From bj05-ops-photo04.dev.gomeplus.com/10.112.178.129 to bj05-ops-photo03.dev.gomeplus.com:8485 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused at org.apache.hadoop.hdfs.qjournal.client.QuorumException.create(QuorumException.java:81) at org.apache.hadoop.hdfs.qjournal.client.QuorumCall.rethrowException(QuorumCall.java:286) at org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager.hasSomeData(QuorumJournalManager.java:233) at org.apache.hadoop.hdfs.server.common.Storage.confirmFormat(Storage.java:917) at org.apache.hadoop.hdfs.server.namenode.FSImage.confirmFormat(FSImage.java:189) at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1121) at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1567) at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1694) 18/07/30 10:33:11 INFO util.ExitUtil: Exiting with status 1 18/07/30 10:33:11 INFO namenode.NameNode: SHUTDOWN_MSG: /************************************************************ SHUTDOWN_MSG: Shutting down NameNode at bj05-ops-photo04.dev.gomeplus.com/10.112.178.129 ************************************************************/ [hadoop@bj05-ops-photo04 bin]$
截图如下所示:
2. 解决方案:
在sbin目录下,使用【./hadoop-daemon.sh start journalnode】命令启动各个namenode上的 JournalNode进程。再进行格式化即可解决。
确认各个NameNode的节点IP,可查看etc/hadoop/hdfs-core.xml文件,如下所示:
<property> <name>dfs.namenode.shared.edits.dir</name>
<value>qjournal://10.112.178.129:8485;10.112.178.128:8485;10.112.178.127:8485/namenodeHaclusterDev</value> </property>
启动后查看进程,如下所示:
完成上述命令后,再次格式化即可(./hadoop namenode -format):
如下截图所示: