HBase 2.1.3 集群 web 报错InvalidProtocolBufferException 解决方法

搭建好HBase 集群后,各种后台进程都正常,搭建手册参考:

Hbase 2.1.3 集群搭建手册
https://www.cndba.cn/dave/article/3322

但是通过web访问,却报如下错误:

2019-03-05 23:13:49,508 WARN  [qtp1911600942-82] servlet.ServletHandler: /master-status
java.lang.IllegalArgumentException: org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException: CodedInputStream encountered an embedded string or message which claimed to have negative size.
    at org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream.newInstance(CodedInputStream.java:155)
    at org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream.newInstance(CodedInputStream.java:133)
    at org.apache.hbase.thirdparty.com.google.protobuf.AbstractParser.parsePartialFrom(AbstractParser.java:162)
    at org.apache.hbase.thirdparty.com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:197)
    at org.apache.hbase.thirdparty.com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:203)
    at org.apache.hbase.thirdparty.com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49)
    at org.apache.hadoop.hbase.zookeeper.MasterAddressTracker.parse(MasterAddressTracker.java:251)
    at org.apache.hadoop.hbase.zookeeper.MasterAddressTracker.getMasterInfoPort(MasterAddressTracker.java:87)
    at org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmplImpl.renderNoFlush(BackupMasterStatusTmplImpl.java:50)
    at org.apache.hadoop.hbase.tmpl.master.BackupMasterStatusTmpl.renderNoFlush(BackupMasterStatusTmpl.java:119)
    at org.apache.hadoop.hbase.tmpl.master.MasterStatusTmplImpl.renderNoFlush(MasterStatusTmplImpl.java:423)
    at org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl.renderNoFlush(MasterStatusTmpl.java:397)
    at org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl.render(MasterStatusTmpl.java:388)
    at org.apache.hadoop.hbase.master.MasterStatusServlet.doGet(MasterStatusServlet.java:81)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1780)
    at org.apache.hadoop.hbase.http.lib.StaticUserWebFilter$StaticUserFilter.doFilter(StaticUserWebFilter.java:112)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1767)
    at org.apache.hadoop.hbase.http.ClickjackingPreventionFilter.doFilter(ClickjackingPreventionFilter.java:48)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1767)
    at org.apache.hadoop.hbase.http.HttpServer$QuotingInputFilter.doFilter(HttpServer.java:1374)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1767)
    at org.apache.hadoop.hbase.http.NoCacheFilter.doFilter(NoCacheFilter.java:49)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1767)
    at org.apache.hadoop.hbase.http.NoCacheFilter.doFilter(NoCacheFilter.java:49)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1767)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:513)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
    at org.eclipse.jetty.server.Server.handle(Server.java:539)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
    at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException: CodedInputStream encountered an embedded string or message which claimed to have negative size.
    at org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException.negativeSize(InvalidProtocolBufferException.java:94)
    at org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream$ArrayDecoder.pushLimit(CodedInputStream.java:1212)
    at org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream.newInstance(CodedInputStream.java:146)
    ... 50 more

从日志看是java 函数异常了,此时查看Master日志:

2019-03-05 23:02:31,284 INFO  [main] server.AbstractConnector: Started [email protected]{HTTP/1.1,[http/1.1]}{0.0.0.0:16010}
2019-03-05 23:02:31,284 INFO  [main] server.Server: Started @8427ms
2019-03-05 23:02:31,290 INFO  [main] master.HMaster: hbase.rootdir=hdfs://192.168.56.100:9000/hbase, hbase.cluster.distributed=true
2019-03-05 23:02:31,340 INFO  [master/hadoopMaster:16000:becomeActiveMaster] master.HMaster: Adding backup master ZNode /hbase/backup-masters/hadoopmaster,16000,1551798143799
2019-03-05 23:02:31,555 INFO  [master/hadoopMaster:16000:becomeActiveMaster] master.ActiveMasterManager: Another master is the active master, null; waiting to become the next active master

注意这里的最后一行:

master.ActiveMasterManager: Another master is the active master, null; waiting to become the next active master
这里的null值是导致异常的主要原因。

因为Hbase的信息是存储在Zookeeper中的,之前测试的结果可能对这里产生了影响,所以连上Zookeeper,把/hbase目录删除了。

ZK的命令参考如下博客:

Zookeeper 客户端 zkCLI 命令详解
https://www.cndba.cn/dave/article/3300

[zk: 192.168.56.100:2181(CONNECTED) 0] ls /
[newacl, zookeeper, oracle0000000002, oracle0000000001, acl, ustc, cndba, hbase]
[zk: 192.168.56.100:2181(CONNECTED) 1] rmr /hbase
Node not empty: /hbase
[zk: 192.168.56.100:2181(CONNECTED) 2] get /hbase

cZxid = 0x200000009
ctime = Mon Mar 04 00:46:33 CST 2019
mZxid = 0x200000009
mtime = Mon Mar 04 00:46:33 CST 2019
pZxid = 0xe00000075
cversion = 21
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 1
[zk: 192.168.56.100:2181(CONNECTED) 3] ls /
[newacl, zookeeper, oracle0000000002, oracle0000000001, acl, ustc, cndba, hbase]
[zk: 192.168.56.100:2181(CONNECTED) 4] rmr /hbase
[zk: 192.168.56.100:2181(CONNECTED) 5]

再次启动HMaster:

[[email protected] ~]$ hbase-daemon.sh start master
running master, logging to /home/hadoop/hbase/logs/hbase-hadoop-master-hadoopMaster.out
[[email protected] ~]$

查看日志:

2019-03-05 23:27:53,834 INFO  [main] server.AbstractConnector: Started [email protected]{HTTP/1.1,[http/1.1]}{0.0.0.0:16010}
2019-03-05 23:27:53,834 INFO  [main] server.Server: Started @3884ms
2019-03-05 23:27:53,839 INFO  [main] master.HMaster: hbase.rootdir=hdfs://192.168.56.100:9000/hbase, hbase.cluster.distributed=true
2019-03-05 23:27:53,894 INFO  [master/hadoopMaster:16000:becomeActiveMaster] master.HMaster: Adding backup master ZNode /hbase/backup-masters/hadoopmaster,16000,1551799670771
2019-03-05 23:27:53,934 INFO  [master/hadoopMaster:16000] regionserver.HRegionServer: ClusterId : c64d0ebc-85ed-4e44-aba4-e8986351bb2c
2019-03-05 23:27:54,099 INFO  [master/hadoopMaster:16000:becomeActiveMaster] master.ActiveMasterManager: Another master is the active master, slave2,16000,1551799615662; waiting to become the next active master

这里终于有值了,再次查看web页面,恢复正常:

原文地址:https://www.cnblogs.com/liuys635/p/11299690.html

时间: 2024-10-10 21:58:55

HBase 2.1.3 集群 web 报错InvalidProtocolBufferException 解决方法的相关文章

zookeeper集群启动报错:Cannot open channel to * at election address /ip:3888

zookeeper集群启动报错:Cannot open channel to * at election address /ip:3888 2018年04月06日 20:52:55 中单大魔王 阅读数:729 标签: zookeeper 下面几点需要注意的: 1.确认在每个$zookeeper_home/data/myid中有对应数字 2.是否关闭防火墙:systemctl stop firewalld,systemctl disable firewalld 3.zoo.cfg中的server需

rabbimq集群搭建报错:Error: unable TO perform an operation ON node '[email protected]'. Please see diagnostics information AND suggestions below.

在搭建rabbitmq集群的时候,添加内存节点时,抛出异常:Error: unable TO perform an operation ON node '[email protected]'. Please see diagnostics information AND suggestions below. 首先,假设当前服务器为A,我们在A服务器执行rabbitmqctl join_cluster [email protected] --ram,就是说我们要将A服务器作为内存节点加入到B中,然

ASP.NET MV3 部署网站 报"Could not load file or assembly ' System.Web.Helpers “ 错的解决方法

转自:http://www.cnblogs.com/taven/archive/2011/08/14/2138077.html 国内很多网站空间都只支持.NET 2.0 和 .NET 3.0 3.5,很少有空间商支持.NET 4的,即使有个别支持.NET 4,但是不支持MVC的默认路由访问形式. Go Daddy 的主机支持,并且费用很低,系统为 Win 2008 R2 64位,10GB网站空间,网站并发最便宜的也支持100个,PHP支持5.2和5.3,.NET支持 ASP.NET v1.0/2

ArcGIS API for Silverlight 调用WebService出现跨域访问报错的解决方法

原文:ArcGIS API for Silverlight 调用WebService出现跨域访问报错的解决方法 群里好几个朋友都提到过这样的问题,说他们在Silverlight中调用了WebService方法,总报这个错误,贴图如下: 解决办法: 1.确定你的Silverlight项目及承载Silverlight的Web程序根目录下都包含2个跨域文件,分别是crossdomain.xml和clientaccesspolicy.xml: crossdomain.xml文件,如下: <?xml ve

金蝶财务软件帐套属性设置保存和帐套启用报错的解决方法

金蝶财务软件新建立帐套,在帐套属性设置完毕保存提示如下图的提示,所以帐套也就启用不了,在启用的时候也会提示下图的错误: 查找原因的时候,一直提示"NT AUTHORITY\NETWORK SERVICE"登陆失败,就突然想到了,是不是登陆数据库的时候,默认以管理员登陆,管理员能登陆成功,是不是得把这个用户加入到管理员组才可以呢,结果就试了下,最后发现还真是这个情况,把这个用户加入管理员后,帐套启用成功.以下是用户加入管理员组的步骤,可以参考以下: 进入计算机管理 找到组 双击管理员组

centos编译libpng报错,解决方法

/usr/local/lib/libz.a: could not read symbols: Bad value 一般是64 位 电脑才会出现. 解决方法如下: 1 cd zlib-1.2.3 //进入zlib目录 2 3 CFLAGS="-O3 -fPIC" ./configure //使用64位元的方法进行编译 4 5 make 6 7 make install 8 9 make clean centos编译libpng报错,解决方法,布布扣,bubuko.com

svn“Previous operation has not finished; run &#39;cleanup&#39; if it was interrupted“报错的解决方法

今天碰到了个郁闷的问题,svn执行clean up命令时报错“Previous operation has not finished; run 'cleanup' if it was interrupted”.无论你到那个父层次的目录执行“clean up “,都是报一样的错.执行cleanup时候,提示要cleanup.看来是进入死循环了. 可能是频繁做了一些改名,文件打开的时候更新或者提交操作,导致svn罢工了.这个也该算是svn的bug吧.类似的情况,其实之前也碰到过.之前都是图省事,把整

MySQL 5.7 Invalid default value for &#39;CREATE_TIME&#39;报错的解决方法

出处:http://blog.itpub.net/15498/viewspace-2136006/ 由于数据库的升级,今天在执行从MySQL 5.6导出来的SQL文件时报错: mysql> source cms_user.sqlQuery OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected, 1 warning (0.04 sec) ERROR 1067 (42000): Invalid default value for 'CREA

Linux---RPM安装报错以及解决方法

安装Samba服务器时候使用CD挂载安装的,结果遇到如下报错 not an rpm package (or package manifest):Input/output error                   //报错信息 解决方法:重新下载新的RPM安装包,原因是因为RPM包有损坏,多发生在挂在CD的情况下 下载RPM包地址 http://rpm.pbone.net/