After I have installed and configured hadoop and hbase (For details, refer to here), I started the shell interaction mode of hbase. the following error occurs when I input the command:
Error: org. Apache. hadoop. hbase. masternotrunningexception: retried 7 times
Why? Why is the master not started?
View the master log under the logs directory and find the following information:
14:41:52, 867 fatal org. Apache. hadoop. hbase. master. hmaster: unhandled exception. Starting shutdown.
Org. Apache. hadoop. IPC. RPC $ versionmismatch: Protocol org. Apache. hadoop. HDFS. Protocol. clientprotocol version mismatch. (Client = 42, Server = 41)
At org. Apache. hadoop. IPC. rpc. getproxy (rpc. Java: 364)
At org. Apache. hadoop. HDFS. dfsclient. createrpcnamenode (dfsclient. Java: 113)
At org. Apache. hadoop. HDFS. dfsclient. <init> (dfsclient. Java: 215)
At org. Apache. hadoop. HDFS. dfsclient. <init> (dfsclient. Java: 177)
At org. Apache. hadoop. HDFS. distributedfilesystem. initialize (distributedfilesystem. Java: 82)
At org. Apache. hadoop. fs. filesystem. createfilesystem (filesystem. Java: 1378)
At org. Apache. hadoop. fs. filesystem. Access $200 (filesystem. Java: 66)
At org. Apache. hadoop. fs. filesystem $ cache. Get (filesystem. Java: 1390)
At org. Apache. hadoop. fs. filesystem. Get (filesystem. Java: 196)
At org. Apache. hadoop. fs. Path. getfilesystem (path. Java: 175)
At org. Apache. hadoop. hbase. util. fsutils. getrootdir (fsutils. Java: 363)
At org. Apache. hadoop. hbase. master. masterfilesystem. <init> (masterfilesystem. Java: 81)
At org. Apache. hadoop. hbase. master. hmaster. finishinitialization (hmaster. Java: 342)
At org. Apache. hadoop. hbase. master. hmaster. Run (hmaster. Java: 279)
14:41:52, 870 info org. Apache. hadoop. hbase. master. hmaster: aborting
14:41:52, 870 debug org. Apache. hadoop. hbase. master. hmaster: stopping service threads
Obviously, the log says that the RPC protocol is inconsistent, and it is clear that I set rootdir to HDFS in the hbase configuration file, if the two RPC protocols are inconsistent, this problem will occur.
Solution:
Delete the hadoop-core JAR file under the hbase/lib directory, copy the hadoop-0.20.2-core.jar under the hadoop directory to hbase/lib, and then restart hbase.
Above.