Preface: a friend adds a good friend to discuss some problems with me before, I feel these problems are quite valuable; Therefore, I want to open a q&A column in this public account, which is convenient for technical exchanges and sharing. The column name is: “Letters from Readers”. If I encounter problems that are difficult to solve due to my limited ability, I will forward this article to my resource circle and try my best to seek help from the leaders, and attach the wechat QR code of the questioner, hoping to provide such a platform for each other to solve problems. We also sincerely welcome you to actively discuss solutions in the comments area, boldly express their views ~

From: Yu * Chao

Small apes questions

After the HBase cluster is built, all the HBase Region nodes crash when Phoenix starts. What is the cause?

The ape analysis

Error as follows:

java.sql.SQLException: ERROR 2006 (INT08): Incompatible jars detected between client and server. Ensure that phoenix.jar is put on the classpath of HBase in every region server: org.apache.hadoop.hbase.exceptions.UnknownProtocolException: No registered coprocessor service found for name MetaDataService in region SYSTEM. The CATALOG, and 1421861120199.56856673 d5cff02b55b9ff5955485dba. Ats org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:5579) at org.apache.hadoop.hbase.regionserver.HRegionServer.execServiceOnRegion(HRegionServer.java:3416) at org.apache.hadoop.hbase.regionserver.HRegionServer.execService(HRegionServer.java:3398) ... more Caused by: org.apache.hadoop.hbase.exceptions.UnknownProtocolException: org.apache.hadoop.hbase.exceptions.UnknownProtocolException: No registered coprocessor service found for name MetaDataService in region SYSTEM. The CATALOG, and 1421861120199.56856673 d5cff02b55b9ff5955485dba. Ats org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:5579) at org.apache.hadoop.hbase.regionserver.HRegionServer.execServiceOnRegion(HRegionServer.java:3416) ... more Caused by: org.apache.hadoop.hbase.ipc.RemoteWithExtrasException(org.apache.hadoop.hbase.exceptions.UnknownProtocolException): org.apache.hadoop.hbase.exceptions.UnknownProtocolException: No registered coprocessor service found for name MetaDataService in region SYSTEM. The CATALOG, and 1421861120199.56856673 d5cff02b55b9ff5955485dba. Ats org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:5579) at org.apache.hadoop.hbase.regionserver.HRegionServer.execServiceOnRegion(HRegionServer.java:3416) ... 14 moreCopy the code

Phoenix does a lot of work based on the HBase coprocessor. It is clear that there is no problem when HBase is started independently. An error is reported when the coprocessor step is reached.

# hbase-site.xml
<property>
    <name>hbase.coprocessor.abortonerror</name>
    <value>false</value>
</property>Copy the code

When using HBase coprocessor technology, first set it to False. What does this mean? This means whether to abort HBase when the coprocessor loaded on HBase fails. Certainly not. You can’t load a coprocessor and crash the entire cluster, because hand-written coprocessor code is always buggy.

After setting this parameter, we restart HBase and start Phoenix. This time, HBase is fine, but Phoenix still reports the error. Why? See the little Ape answers below.

Little ape to answer

In fact, at first glance, Phoenix is incompatible with HBase. Most of the answers on the web are incompatible with HBase. After checking the HBase version, there is no problem. There may be many factors leading to this problem, such as version incompatibility is one, here will not circumvent, directly exposed this time encountered the cause of the problem is what.

The cause was that almost all jar packages in the Phoenix compressed package were copied to the HBase/lib directory, causing package conflicts. The official website only requires that Phoenix-version-server.jar be copied to HBase/lib.

To install a pre-built phoenix, use these directions:

  • Download and expand the latest phoenix-[version]-bin.tar.
  • Add the phoenix-[version]-server.jar to the classpath of all HBase region server and master and remove any previous version. An easy way to do this is to copy it into the HBase lib directory (use phoenix-core-[version].jar for Phoenix 3.x)
  • Restart HBase.
  • Add the phoenix-[version]-client.jar to the classpath of any Phoenix client.

Very simple 4-step operation, compared to the original version of the true much simpler. So here we still suggest that we should give priority to the official website tutorials, supplemented by network tutorials, in addition to less into the pit, but also to learn real things, conducive to understanding. This is also the point that this article emphatically wants to declare, do not copy, after all, a same problem may have many different incentives ~

Reprint please indicate the source! Welcome to follow my wechat official account [HBase Work Notes]