我是将Phoenix 4.0.0升级到Phoenix4.2.2时遇到这个问题的。升级后,不仅不能使用Phoenix,连HBase都不能正常运行了,启动之后不到1分钟,所有的regionserver就挂掉了。
<p> 2015-01-11 20:10:41,703 ERROR [RS_OPEN_REGION-ubuntu02:60020-0] coprocessor.CoprocessorHost: The coprocessor org.apache.phoenix.coprocessor.MetaDataEndpointImpl threw java.lang.NoClassDefFoundError: org/apache/hadoop/metrics2/MetricsInfo
java.lang.NoClassDefFoundError: org/apache/hadoop/metrics2/MetricsInfo
at org.apache.phoenix.trace.util.Tracing.addTraceMetricsSource(Tracing.java:315)
at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.start(MetaDataEndpointImpl.java:292)
at org.apache.hadoop.hbase.coprocessor.CoprocessorHost$Environment.startup(CoprocessorHost.java:673)
at org.apache.hadoop.hbase.coprocessor.CoprocessorHost.loadInstance(CoprocessorHost.java:265)
at org.apache.hadoop.hbase.coprocessor.CoprocessorHost.load(CoprocessorHost.java:218)
at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.loadTableCoprocessors(RegionCoprocessorHost.java:227)
at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.<init>(RegionCoprocessorHost.java:183)
at org.apache.hadoop.hbase.regionserver.HRegion.<init>(HRegion.java:623)
at org.apache.hadoop.hbase.regionserver.HRegion.<init>(HRegion.java:530)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.apache.hadoop.hbase.regionserver.HRegion.newHRegion(HRegion.java:4160)
at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:4471)
at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:4444)
at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:4400)
at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:4351)
at org.apache.hadoop.hbase.regionserver.handler.OpenRegionHandler.openRegion(OpenRegionHandler.java:482)
at org.apache.hadoop.hbase.regionserver.handler.OpenRegionHandler.process(OpenRegionHandler.java:145)
at org.apache.hadoop.hbase.executor.EventHandler.run(EventHandler.java:128)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.metrics2.MetricsInfo
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 24 more
2015-01-11 20:10:41,705 FATAL [RS_OPEN_REGION-ubuntu02:60020-0] regionserver.HRegionServer: ABORTING region server ubuntu02,60020,1420978214895: The coprocessor org.apache.phoenix.coprocessor.MetaDataEndpointImpl threw java.lang.NoClassDefFoundError: org/apache/hadoop/metrics2/MetricsInfo
java.lang.NoClassDefFoundError: org/apache/hadoop/metrics2/MetricsInfo
at org.apache.phoenix.trace.util.Tracing.addTraceMetricsSource(Tracing.java:315)
at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.start(MetaDataEndpointImpl.java:292)
at org.apache.hadoop.hbase.coprocessor.CoprocessorHost$Environment.startup(CoprocessorHost.java:673)
at org.apache.hadoop.hbase.coprocessor.CoprocessorHost.loadInstance(CoprocessorHost.java:265)
at org.apache.hadoop.hbase.coprocessor.CoprocessorHost.load(CoprocessorHost.java:218)
at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.loadTableCoprocessors(RegionCoprocessorHost.java:227)
at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.<init>(RegionCoprocessorHost.java:183)
at org.apache.hadoop.hbase.regionserver.HRegion.<init>(HRegion.java:623)
at org.apache.hadoop.hbase.regionserver.HRegion.<init>(HRegion.java:530)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.apache.hadoop.hbase.regionserver.HRegion.newHRegion(HRegion.java:4160)
at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:4471)
at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:4444)
at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:4400)
at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:4351)
at org.apache.hadoop.hbase.regionserver.handler.OpenRegionHandler.openRegion(OpenRegionHandler.java:482)
at org.apache.hadoop.hbase.regionserver.handler.OpenRegionHandler.process(OpenRegionHandler.java:145)
at org.apache.hadoop.hbase.executor.EventHandler.run(EventHandler.java:128)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.metrics2.MetricsInfo
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 24 more
2015-01-11 20:10:41,706 FATAL [RS_OPEN_REGION-ubuntu02:60020-0] regionserver.HRegionServer: RegionServer abort: loaded coprocessors are: [org.apache.phoenix.coprocessor.ServerCachingEndpointImpl, org.apache.phoenix.coprocessor.MetaDataRegionObserver, org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver, org.apache.phoenix.coprocessor.GroupedAggregateRegionObserver, org.apache.phoenix.coprocessor.ScanRegionObserver, org.apache.phoenix.hbase.index.Indexer]
</p> 复制代码