When trying to run the following command from my EC2 instance in AWS I get the following:
hadoop-2.6.5/bin/hadoop fs -ls /hbase
ls: `/hbase': No such file or directory
I have the following:
core-site.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://nn:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>file:/home/ubuntu/hadoop-2.6.5/tmp</value>
</property>
</configuration>
hbase-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hbase.rootdir</name>
<value>file:/home/ubuntu/hadoop-2.6.5/HBase/HFiles</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://nn:9000/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/ubuntu/hadoop-2.6.5/zookeeper</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
</configuration>
An additional thing that I noticed was that this path does not exist in my filesystem:
/home/ubuntu/hadoop-2.6.5/HBase/HFiles
and I don't know if I should make it because the zookeeper path was made on its own.
I have been reading this question and to no avail have I actually gotten the HBase working:
HBase can't creates its directory in HDFS
This is part of an error log that I notice when I viewing the hbase logs folder:
hbase-ubuntu-master-ip-xx-xxx-xx-xx.out.5
2025-03-27 23:11:08,822 INFO [main] zookeeper.ZooKeeper: Client environment:os.name=Linux
2025-03-27 23:11:08,822 INFO [main] zookeeper.ZooKeeper: Client environment:os.arch=amd64
2025-03-27 23:11:08,822 INFO [main] zookeeper.ZooKeeper: Client environment:os.version=6.8.0-1024-aws
2025-03-27 23:11:08,822 INFO [main] zookeeper.ZooKeeper: Client environment:user.name=ubuntu
2025-03-27 23:11:08,822 INFO [main] zookeeper.ZooKeeper: Client environment:user.home=/home/ubuntu
2025-03-27 23:11:08,822 INFO [main] zookeeper.ZooKeeper: Client environment:user.dir=/home/ubuntu
2025-03-27 23:11:08,822 INFO [main] zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=90000 watcher=hconnection-0xf79e0x0, quorum=localhost:2181, baseZNode=/hbase
2025-03-27 23:11:08,896 INFO [main-SendThread(localhost:2181)] zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2025-03-27 23:11:08,921 INFO [main-SendThread(localhost:2181)] zookeeper.ClientCnxn: Socket connection established to localhost/127.0.0.1:2181, initiating session
2025-03-27 23:11:08,972 INFO [main-SendThread(localhost:2181)] zookeeper.ClientCnxn: Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x195d9df2b900004, negotiated timeout = 90000
2025-03-27 23:11:08,994 INFO [main] client.ZooKeeperRegistry: ClusterId read in ZooKeeper is null
2025-03-27 23:11:09,102 ERROR [main] master.HMasterCommandLine: Failed to stop master
.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=1, exceptions:
Thu Mar 27 23:11:09 UTC 2025, RpcRetryingCaller{globalStartTime=1743117069056, pause=100, retries=1}, .apache.hadoop.hbase.MasterNotRunningException: java.io.IOException: Can't get master address from ZooKeeper; znode data == null
at .apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:147)
at .apache.hadoop.hbase.client.HBaseAdmin.executeCallable(HBaseAdmin.java:3917)
at .apache.hadoop.hbase.client.HBaseAdmin.shutdown(HBaseAdmin.java:2566)
at .apache.hadoop.hbase.master.HMasterCommandLine.stopMaster(HMasterCommandLine.java:269)
at .apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:141)
at .apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at .apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:126)
at .apache.hadoop.hbase.master.HMaster.main(HMaster.java:2304)
Caused by: .apache.hadoop.hbase.MasterNotRunningException: java.io.IOException: Can't get master address from ZooKeeper; znode data == null
at .apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$StubMaker.makeStub(ConnectionManager.java:1533)
at .apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$MasterServiceStubMaker.makeStub(ConnectionManager.java:1553)
at .apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.getKeepAliveMasterService(ConnectionManager.java:1704)
at .apache.hadoop.hbase.client.MasterCallable.prepare(MasterCallable.java:38)
at .apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:124)
... 7 more
Caused by: java.io.IOException: Can't get master address from ZooKeeper; znode data == null
at .apache.hadoop.hbase.zookeeper.MasterAddressTracker.getMasterAddress(MasterAddressTracker.java:154)
at .apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$StubMaker.makeStubNoRetries(ConnectionManager.java:1484)
at .apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$StubMaker.makeStub(ConnectionManager.java:1526)
... 11 more
I am expecting to launch the HBase shell, create tables, and insert data into them, but I am still unable to insert data because it says that the server is not running. Is there any property that could prevent the folder creation in HDFS?