2015-02-19 11 views
9

Sono un principiante in Hadoop che tenta di installare Hbase in modalità pseudo distribuita, versione hbase-0.98.10.1-hadoop1-bin, con Hadoop 2.5.2. Non riesco ad aggiungere un tavolo.Il nodo/hbase non è in ZooKeeper

Errore di inseguimento continua quando si tenta di creare una tabella:

client.HConnectionManager$HConnectionImplementation: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master. 

E finalmente dopo la visualizzazione dell'errore molte volte (circa 50 volte) dà l'errore finale come:

ERROR: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master. 

L'ultimo ingresso del file di registro è:

2015-02-23 16:38:39,456 ERROR [main] master.HMasterCommandLine: Master exiting 
java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster 
at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:3017) 
at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:186) 
at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:135) 
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) 
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:126) 
at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:3031) 

Caused by: org.apache.hadoop.ipc.RemoteException: Server IPC version 9 cannot communicate with client version 4 
at org.apache.hadoop.ipc.Client.call(Client.java:1113) 
at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:229) 
at com.sun.proxy.$Proxy8.getProtocolVersion(Unknown Source) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:622) 
at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:85) 
at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:62) 
at com.sun.proxy.$Proxy8.getProtocolVersion(Unknown Source) 
at org.apache.hadoop.ipc.RPC.checkVersion(RPC.java:422) 
at org.apache.hadoop.hdfs.DFSClient.createNamenode(DFSClient.java:183) 
at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:281) 
at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:245) 
at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:100) 
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1446) 
at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:67) 
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1464) 
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:263) 
at org.apache.hadoop.fs.Path.getFileSystem(Path.java:187) 
at org.apache.hadoop.hbase.util.FSUtils.getRootDir(FSUtils.java:942) 
at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:533) 
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) 
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
at java.lang.reflect.Constructor.newInstance(Constructor.java:534) 
at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:3012) 
... 5 more 

Hdbase-sito di file di configurazione:

<configuration> 
<property> 
<name>hbase.rootdir</name> 
<value>hdfs://master:54310/hbase</value> 
</property> 
<property> 
<name>hbase.zookeeper.property.dataDir</name> 
<value>/usr/local/Hbase/zookeeper</value> 
</property> 
<property> 
<name>hbase.cluster.distributed</name> 
<value>true</value> 
</property> 
</configuration> 

uscita di JPS è:

7584 Main 
8532 HQuorumPeer 
4435 SecondaryNameNode 
4880 NodeManager 
4269 DataNode 
7735 FsShell 
4592 ResourceManager 
4141 NameNode 
9128 Jps 
3147 ZKServerTool 
3651 HRegionServer 
2992 HMaster 

quello che potrebbe essere l'errore possibile? Qualsiasi aiuto è apprezzato.

+0

Altre persone guarderanno la tua domanda se si migliora il titolo ... (e si migliora anche la formattazione!) – JonasCz

+0

Non sono in grado di utilizzare lo strumento di formattazione a causa della sua reputazione. – Priyal

+0

Cosa? Puoi formattare correttamente i tuoi post anche con poca reputazione. Basta fare clic su "modifica" sotto la domanda e leggere la [guida alla formattazione] (http://stackoverflow.com/editing-help) – JonasCz

risposta

2

Ha funzionato solo dopo aver utilizzato una versione diversa di hbase. Stavo usando hbase-0.98.10.1-hadoop1-bin, che non era compatibile con il mio hadoop 2.5.2, quindi ho cambiato la versione di hbase in hbase-X.XX.XX.X-hadoop2-bin (che era compatibile con hadoop 2 .X) e ha seguito i passi di installazione di Apache. Grazie a tutti ..

+0

Di fronte allo stesso problema, quando si tenta di eseguire Hbase 1.0.3 in modalità standalone. Eventuali suggerimenti ? – Sarang

+0

Rimuovere la directory della versione precedente e impostare il percorso del nuovo file – UserszrKs

0
<configuration> 
    <property> 
     <name>hbase.rootdir</name> 
     <value>hdfs://master:54310/hbase</value> 
    </property> 
    <property> 
     <name>hbase.zookeeper.property.dataDir</name> 
     <value>/usr/local/Hbase/zookeeper</value> 
    </property> 
    <property> 
     <name>hbase.zookeeper.property.clientPort</name> 
     <value>2181</value> 
    </property> 
    <property> 
     <name>hbase.cluster.distributed</name> 
     <value>true</value> 
    </property> 
    <property> 
     <name>zookeeper.znode.parent</name> 
     <value>/hbase-unsecure</value> 
    </property> 
    <property> 
     <name>hbase.zookeeper.quorum</name> 
     <value>localhost</value> 
    </property> 
    <property> 
     <name>dfs.replication</name> 
     <value>1</value> 
    </property> 
    <property> 
     <name>hbase.zookeeper.quorum</name> 
     <value>localhost</value> 
    </property> 
    <property> 
     <name>hbase.master</name> 
     <value>hadoop-master:60000</value> 
     </property> 
</configuration> 

assicurarsi che lo zookeeper debba essere avviato e dataDir dovrebbe esistere.

+0

Zookeeper si avvia all'avvio di HQuorumPeer e DataDir esiste. Ho provato il tuo file di configurazione ma dà lo stesso errore. Ho aggiornato il file di registro. Grazie per la tua risposta. – Priyal

-1

lo uso in Talend, quando aggiungo connnection HBase nel cluster Hadoop, la fase 2/2, scelgo repository in cluster di Hadoop, quando scrivo server e la porta (default 2181) , puntare il pulsante 'Verifica', il prompt di sistema:

Errore di connessione. È necessario modificare le impostazioni del database. Causato da: org.apache.hadoop.hbase.MasterNotRunningException: Il nodo/hbase non è in ZooKeeper. Dovrebbe essere stato scritto dal maestro. Controlla il valore configurato in "zookeeper.znode.parent". Ci potrebbe essere una mancata corrispondenza con quello configurato nel master

Quindi, è necessario aggiungere le proprietà Hadoop, fare clic sul pulsante e aggiungere alla proprietà

zookeeper.znode.parent =/HBase-unsecure Fare clic su OK, quindi fai clic su "Verifica", il prompt del sistema ha esito positivo.

0

La risposta sopra è corretta ma un po 'più lunga. Sono stato in grado di risolvere questo problema con la sola aggiunta seguente in HBase-site.xml (usato HBase-1.2.1)

<property> 
    <name>hbase.zookeeper.property.dataDir</name> 
    <value>/mnt/data/zookeeper</value> 
</property> 

ho rovinato dovuto creare/mnt/data/Zookeeper sia. Dal momento che stavo usando HBASE come standalone non ho dovuto eseguire Zookeeper e ha dato un errore quando l'ho fatto

il sito completo di hbase.file di configurazione XML assomiglia

<configuration> 
    <property> 
     <name>hbase.rootdir</name> 
     <value>file:///mnt/data/hbase</value> 
    </property> 
    <property> 
     <name>hbase.zookeeper.property.dataDir</name> 
     <value>/mnt/data/zookeeper</value> 
    </property> 
</configuration> 
0

significa che il guardiano dello zoo, non ha il nodo '/ HBase', in modo da creare un nome nodo '/ HBase' in zookeeper.go al zkCli ed eseguire il 'creare/HBase '' 'comando.

Problemi correlati