2017-06-01 3 views
1

Je travaille avec hadoop teragen pour vérifier le benchmark hadoop mapreduce avec le terasort. Mais quand je lance la commande suivante,Appel De kv.local/172.20.12.168 à localhost: 8020 Échec de l'exception de connexion, lors de l'utilisation de la tera gen

pot Hadoop /Users/**/Documents/hadoop-2.6.4/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.4.jar teragen - Dmapreduce.job.maps = 100 1T données aléatoires

Je suis l'exception suivante,

17/06/01 15:09:21 WARN util.NativeCodeLoader: Unable to load native-hadoop 
library for your platform... using builtin-java classes where applicable 
17/06/01 15:09:22 INFO client.RMProxy: Connecting to ResourceManager at /127.0.0.1:8032 
17/06/01 15:09:23 INFO terasort.TeraSort: Generating -727379968 using 100 
17/06/01 15:09:23 INFO mapreduce.JobSubmitter: number of splits:100 
17/06/01 15:09:23 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1496303775726_0003 
17/06/01 15:09:23 INFO impl.YarnClientImpl: Submitted application application_1496303775726_0003 
17/06/01 15:09:23 INFO mapreduce.Job: The url to track the job: http://localhost:8088/proxy/application_1496303775726_0003/ 
17/06/01 15:09:23 INFO mapreduce.Job: Running job: job_1496303775726_0003 
17/06/01 15:09:27 INFO mapreduce.Job: Job job_1496303775726_0003 running in uber mode : false 
17/06/01 15:09:27 INFO mapreduce.Job: map 0% reduce 0% 
17/06/01 15:09:27 INFO mapreduce.Job: Job job_1496303775726_0003 failed with state FAILED due to: Application application_1496303775726_0003 failed 2 times due to AM Container for appattempt_1496303775726_0003_000002 exited with exitCode: -1000 
For more detailed output, check application tracking page:http://localhost:8088/proxy/application_1496303775726_0003/Then, click on links to logs of each attempt. 
Diagnostics: Call From KV.local/172.20.12.168 to localhost:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused 
java.net.ConnectException: Call From KV.local/172.20.12.168 to localhost:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
    at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:791) 
    at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:731) 
    at org.apache.hadoop.ipc.Client.call(Client.java:1473) 
    at org.apache.hadoop.ipc.Client.call(Client.java:1400) 
    at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:232) 
    at com.sun.proxy.$Proxy34.getFileInfo(Unknown Source) 
    at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(ClientNamenodeProtocolTranslatorPB.java:752) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:498) 
    at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:187) 
    at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102) 
    at com.sun.proxy.$Proxy35.getFileInfo(Unknown Source) 
    at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:1977) 
    at org.apache.hadoop.hdfs.DistributedFileSystem$18.doCall(DistributedFileSystem.java:1118) 
    at org.apache.hadoop.hdfs.DistributedFileSystem$18.doCall(DistributedFileSystem.java:1114) 
    at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81) 
    at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1114) 
    at org.apache.hadoop.yarn.util.FSDownload.copy(FSDownload.java:251) 
    at org.apache.hadoop.yarn.util.FSDownload.access$000(FSDownload.java:61) 
    at org.apache.hadoop.yarn.util.FSDownload$2.run(FSDownload.java:359) 
    at org.apache.hadoop.yarn.util.FSDownload$2.run(FSDownload.java:357) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at javax.security.auth.Subject.doAs(Subject.java:422) 
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1656) 
    at org.apache.hadoop.yarn.util.FSDownload.call(FSDownload.java:356) 
    at org.apache.hadoop.yarn.util.FSDownload.call(FSDownload.java:60) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
    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) 
Caused by: 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:530) 
    at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:494) 
    at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:608) 
    at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:706) 
    at org.apache.hadoop.ipc.Client$Connection.access$2800(Client.java:369) 
    at org.apache.hadoop.ipc.Client.getConnection(Client.java:1522) 
    at org.apache.hadoop.ipc.Client.call(Client.java:1439) 
    ... 31 more 

Comme le montrent d'erreur, il ne peut pas se connecter à localhost: 8020, mais quand je Chech l'interface web de namenode, elle montre que le namenode est actif. S'il vous plaît voir la capture d'écran ci-dessous:

enter image description here

J'ai trouvé beaucoup de commentaires à propos, mais aucun ne m'a aidé. J'ai aussi vérifié le fichier hosts, qui contient la ligne suivante:

127.0.0.1 localhost

172.20.12.168 localhost

Quelqu'un peut me aider trier ce problème?

+0

Pouvez-vous exécuter un exemple simple de wordcount? Combien de nœuds sont en cluster? Je suppose que le noeud unique. –

+0

Oui wordcound simple fonctionne bien. C'est un cluster de nœud unique – KayV

+0

quel est le nom d'hôte? KV.local? –

Répondre

1

La procédure suivante m'a aidé à résoudre le problème:

  1. Arrêtez tous les services.

  2. Supprimez les répertoires namenode et datanode comme indiqué dans hdfs-site.xml.

  3. Créez de nouveaux répertoires de nom de noeud et de noeud de données et modifiez hdfs-site.xml en conséquence.

  4. dans le noyau-site.xml, effectuez les modifications suivantes ou ajoutez les propriétés suivantes:

    <property> 
        <name>fs.defaultFS</name> 
        <value>hdfs://172.20.12.168/</value> 
    </property> 
    <property> 
        <name>fs.default.name</name> 
        <value>hdfs://172.20.12.168:8020</value> 
    </property> 
    
  5. Effectuez les modifications suivantes dans Hadoop 2.6.4/etc/Hadoop/hadoop-env.sh fichier:

    export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home 
    
  6. DSF de redémarrage, fils et mr comme suit:

    start-dfs.sh 
    start-yarn.sh 
    mr-jobhistory-daemon.sh start historyserver