“hadoop namenode -format” renvoie une java.net.UnknownHostException

Je suis actuellement en apprentissage hadoop et je suis en train de configurer un seul nœud de test tel que défini dans http://hadoop.apache.org/common/docs/current/single_node_setup.html

J'ai configuré ssh (je peux me connecter sans mot de passe).

Mon serveur est sur notre intranet, derrière un proxy.

Quand j'essaie de l'exécuter

bin/hadoop namenode -format

J'ai le java.net.UnknownHostException exception:

$ bin/hadoop namenode -format
11/06/10 15:36:47 INFO namenode.NameNode: STARTUP_MSG: 
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG:   host = java.net.UnknownHostException: srv-clc-04.univ-nantes.prive3: srv-clc-04.univ-nantes.prive3
STARTUP_MSG:   args = [-format]
STARTUP_MSG:   version = 0.20.203.0
STARTUP_MSG:   build = http://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-203 -r 1099333; compiled by 'oom' on Wed May  4 07:57:50 PDT 2011
************************************************************/
Re-format filesystem in /home/lindenb/tmp/HADOOP/dfs/name ? (Y or N) Y
11/06/10 15:36:50 INFO util.GSet: VM type       = 64-bit
11/06/10 15:36:50 INFO util.GSet: 2% max memory = 19.1675 MB
11/06/10 15:36:50 INFO util.GSet: capacity      = 2^21 = 2097152 entries
11/06/10 15:36:50 INFO util.GSet: recommended=2097152, actual=2097152
11/06/10 15:36:50 INFO namenode.FSNamesystem: fsOwner=lindenb
11/06/10 15:36:50 INFO namenode.FSNamesystem: supergroup=supergroup
11/06/10 15:36:50 INFO namenode.FSNamesystem: isPermissionEnabled=true
11/06/10 15:36:50 INFO namenode.FSNamesystem: dfs.block.invalidate.limit=100
11/06/10 15:36:50 INFO namenode.FSNamesystem: isAccessTokenEnabled=false accessKeyUpdateInterval=0 min(s), accessTokenLifetime=0 min(s)
11/06/10 15:36:50 INFO namenode.NameNode: Caching file names occuring more than 10 times 
11/06/10 15:36:50 INFO common.Storage: Image file of size 113 saved in 0 seconds.
11/06/10 15:36:50 INFO common.Storage: Storage directory /home/lindenb/tmp/HADOOP/dfs/name has been successfully formatted.
11/06/10 15:36:50 INFO namenode.NameNode: SHUTDOWN_MSG: 
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at java.net.UnknownHostException: srv-clc-04.univ-nantes.prive3: srv-clc-04.univ-nantes.prive3
************************************************************/

Après, hadoop a commencé

./bin/start-all.sh

mais il y a une autre nouvelle exception quand j'ai essayé de copier un fichier local:

 bin/hadoop fs  -copyFromLocal ~/file.txt  file.txt
DataStreamer Exception: org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /user/lindenb/file.txt could only be replicated to 0 nodes, instead of 1
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1417)

comment puis-je résoudre ce problème s'il vous plaît ?

Grâce

Je reçois une erreur similaire lors du formatage de mon NameNode sur la distribution Cloudera dans un CentOS machine virtuelle. Pouvez-vous s'il vous plaît dites-moi ce que vous avez fait à votre fichier /etc/hosts? Actuellement j'ai les lignes suivantes:
127.0.0.1 localhost.localdomain localhost et ::1 localhost6.localdomain6 localhost6

OriginalL'auteur Pierre | 2011-06-10