Introduction
HBase is a non-relational column-oriented database management system that works on top of the Hadoop Distributed File System (HDFS). HBase provides a fault-tolerant method of storing sparse data sets, common in many big data applications. It's suitable for real-time data processing or random read/write access to enormous amounts of data.
HBase systems are intended to scale linearly. It is made up of regular tables with rows and columns, similar to a typical database. Each table must have a primary key declared, and all access attempts to HBase tables must utilize this primary key.
While working with HBase, a variety of issues may arise.
HBase Troubleshooting
Table Creation Fails after Installing LZO
You won't be able to construct a table with LZO compression until you restart the RegionServer if you install LZO after starting it.
Cause
When the RegionServer begins, CompressionTest is conducted, and the results are cached. It refers to such results when you try to create a table with a certain type of compression. Because you installed LZO after starting the RegionServer, the create fails because the cached results predate LZO.
Solution
The RegionServer should be restarted. LZO table creation will now be successful.
Thrift Server Crashes after Receiving Invalid Data
A Thrift server may crash if it gets a substantial quantity of incorrect data as a result of a buffer overrun.
Cause
The Thrift server uses memory to validate the data it receives. It may need to allocate more memory than is available if it gets a significant volume of invalid data. This is because of a constraint in the Thrift library.
Solution
- Use the framed and compact transport protocols to avoid any problems caused by buffer overruns.
- Because they may need changes to your client code, these protocols are disabled by default.
- hbase.regionserver.thrift.framed and hbase.regionserver.thrift.compact are two options to include in your hbase-site.xml.
- As seen in the XML below, set each of these to true. You may also use the hbase.regionserver.thrift.framed.max_frame_size_in_mb option to specify the maximum frame size.
<property> <name>hbase.regionserver.thrift.framed</name> <value>true</value> </property> <property> <name>hbase.regionserver.thrift.framed.max_frame_size_in_mb</name> <value>2</value> </property> <property> <name>hbase.regionserver.thrift.compact</name> <value>true</value> </property> |
Master server initializes, but region servers do not initialize
Communication between master and region servers takes place mainly through their IP addresses. Master will listen to see whether any region servers are running or have the IP address 127.0.0.1.
Cause
In dual communication between region servers and master servers, region servers regularly tell the Master server about their IP addresses, which are 127.0.0.1.
Solution
Remove the master server name node from localhost, which is present in the hosts file.
Go to the Host file location /etc/hosts and after opening /etc./hosts,
Go to,
127.0.0.1 fully.qualified.regionservernameregionservernamelocalhost.localdomain localhost
: : 1 localhost3.localdomain3 localdomain3
Now modify the above configuration as:
127.0.0.1 localhost.localdomainlocalhost
: : 1 localhost3.localdomain3 localdomain3
Couldn’t find my address: ABC in the list of Zookeeper quorum servers
Causes
- The ZooKeeper server will raise an error with the suffix .abc in the server's name and will also fail to start.
- In addition, HBase tries to launch a ZooKeeper server on some machines, but the machines cannot locate the quorum configuration.
Solution
- Its solution is to substitute the hostname with a hostname that is presented in the error message.
- The following parameters can be configured in HBase-site.xml, but only if we assume that we have a DNS server.
- HBase.zookeeper.dns.interface
- HBase.zookeeper.dns.nameserver
Created Root Directory for HBase through Hadoop DFS
As we must execute the HBase migrations script. When the HBase migrations script is executed, it responds as if there are no files in the root directory.
Cause
Upon creating a new directory for HBase using the Hadoop Distributed file system. There are two possibilities:
- The root directory does not exist.
-
Previously, just the previous running instance of HBase was initialized.
Solution
Ascertain that the HBase root directory does not currently exist or that it has been initialized by a previous execution of the HBase instance.
- Using Hadoop dfs, remove the HBase root directory.
- HBase creates and initializes the directory on its own.
Zookeeper session expired events
Cause
Exceptions cause HMaster or HRegion servers to stop down.
Furthermore, by inspecting logs, we may learn about the thrown exceptions.
The following exception is thrown as a result of the Zookeeper expired event:
WARN org.apache.zookeeper.ClientCnxn: Exception closing session 0x278bd16a96000f to sun.nio.ch.SelectionKeyImpl@355811ec java.io.IOException: TIMED OUT at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:906) WARN org.apache.hadoop.hbase.util.Sleeper: We slept 79410ms, ten times longer than scheduled: 5000 INFO org.apache.zookeeper.ClientCnxn: Attempting connection to server hostname/IP:PORT INFO org.apache.zookeeper.ClientCnxn: Priming connection to java.nio.channels.SocketChannel[connected local=/IP:PORT remote=hostname/IP:PORT] INFO org.apache.zookeeper.ClientCnxn: Server connection successful WARN org.apache.zookeeper.ClientCnxn: Exception closing session 0x278bd16a96000d to sun.nio.ch.SelectionKeyImpl@3544d65e java.io.IOException: Session Expired at org.apache.zookeeper.ClientCnxn$SendThread.readConnectResult(ClientCnxn.java:589) at org.apache.zookeeper.ClientCnxn$SendThread.doIO(ClientCnxn.java:709) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:945) ERROR org.apache.hadoop.hbase.regionserver.HRegionServer: ZooKeeper session expired |
Solution
- By default, the RAM size is 1 GB. As a result, we've kept RAM capacity over 1 GB for long-running imports.
- Zookeeper's session timeout must be increased. To increase the session time out of Zookeeper, we must edit the following value in "hbase-site.xml," located in the hbase /conf folder path.
- The session timeout is set to 60 seconds by default. So,we may alter it to 120 seconds.
<property> <name> zookeeper.session.timeout </name> <value>1200000</value> </property> <property> <name> hbase.zookeeper.property.tickTime </name> <value>6000</value> </property> |