Chapter 11. Troubleshooting and Debugging HBase

Table of Contents

11.1. General Guidelines
11.2. Logs
11.2.1. Log Locations
11.2.2. Log Levels
11.2.3. JVM Garbage Collection Logs
11.3. Resources
11.3.1. search-hadoop.com
11.3.2. Mailing Lists
11.3.3. IRC
11.3.4. JIRA
11.4. Tools
11.4.1. Builtin Tools
11.4.2. External Tools
11.5. Client
11.5.1. ScannerTimeoutException or UnknownScannerException
11.5.2. Shell or client application throws lots of scary exceptions during normal operation
11.5.3. Long Client Pauses With Compression
11.5.4. ZooKeeper Client Connection Errors
11.5.5. Client running out of memory though heap size seems to be stable (but the off-heap/direct heap keeps growing)
11.5.6. Client Slowdown When Calling Admin Methods (flush, compact, etc.)
11.5.7. Secure Client Cannot Connect ([Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)])
11.6. MapReduce
11.6.1. You Think You're On The Cluster, But You're Actually Local
11.7. NameNode
11.7.1. HDFS Utilization of Tables and Regions
11.7.2. Browsing HDFS for HBase Objects
11.8. Network
11.8.1. Network Spikes
11.8.2. Loopback IP
11.9. RegionServer
11.9.1. Startup Errors
11.9.2. Runtime Errors
11.9.3. Shutdown Errors
11.10. Master
11.10.1. Startup Errors
11.10.2. Shutdown Errors
11.11. ZooKeeper
11.11.1. Startup Errors
11.11.2. ZooKeeper, The Cluster Canary
11.12. Amazon EC2
11.12.1. ZooKeeper does not seem to work on Amazon EC2
11.12.2. Instability on Amazon EC2
11.12.3. Remote Java Connection into EC2 Cluster Not Working
11.13. HBase and Hadoop version issues
11.13.1. NoClassDefFoundError when trying to run 0.90.x on hadoop-0.20.205.x (or hadoop-1.0.x)

11.1. General Guidelines

Always start with the master log (TODO: Which lines?). Normally it’s just printing the same lines over and over again. If not, then there’s an issue. Google or search-hadoop.com should return some hits for those exceptions you’re seeing.

An error rarely comes alone in HBase, usually when something gets screwed up what will follow may be hundreds of exceptions and stack traces coming from all over the place. The best way to approach this type of problem is to walk the log up to where it all began, for example one trick with RegionServers is that they will print some metrics when aborting so grepping for Dump should get you around the start of the problem.

RegionServer suicides are “normal”, as this is what they do when something goes wrong. For example, if ulimit and xcievers (the two most important initial settings, see Section 2.2.5, “ ulimit and nproc) aren’t changed, it will make it impossible at some point for DataNodes to create new threads that from the HBase point of view is seen as if HDFS was gone. Think about what would happen if your MySQL database was suddenly unable to access files on your local file system, well it’s the same with HBase and HDFS. Another very common reason to see RegionServers committing seppuku is when they enter prolonged garbage collection pauses that last longer than the default ZooKeeper session timeout. For more information on GC pauses, see the 3 part blog post by Todd Lipcon and Section 10.3.1.1, “Long GC pauses” above.