`
lg70124752
  • 浏览: 60875 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

hbase配置、运行错误总结

 
阅读更多
一、执行$ hbase hbck 命令时,出现以下提示:

Invalid maximum heap size: -Xmx4096m
The specified size exceeds the maximum representable size.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

原因:jvm设置的内存过大,减小配置文件hbase-env.sh内的设置即可。例如:

export HBASE_HEAPSIZE=1024

二、无法启动hbase,regionserver log里会有这样的错误,zookeeper也有初始化问题的错误

FATAL org.apache.hadoop.hbase.regionserver.HRegionServer: ABORTING region server 10.210.70.57,60020,1340088145399: Initialization of RS failed. Hence aborting RS.

因为之前安装配置的时候是好好的,中间经历过强行kill daemon的过程,又是报错初始化问题,所以估计是有缓存影响了,所以清理了tmp里的数据,然后发现HRegionServer依然无法启动,不过还好的是zookeeper启动了,一怒之下把hdfs里的hbase数据也都清理了,同时再清理tmp,检查各个节点是否有残留hbase进程,kill掉,重启hbase,然后这个世界都正常了。不知道具体哪里影响了,不推荐这种暴力解决办法,如果有谁知道原因请告之。

三、无法启动reginserver daemon,报错如下:

Exception in thread “main” java.lang.RuntimeException: Failed construction of Regionserver: class org.apache.hadoop.hbase.regionserver.HRegionServer

Caused by: java.net.BindException: Problem binding to /10.210.70.57:60020 : Cannot assign requested address

根据错误提示,检查ip对应的机器是否正确,如果出错机器的ip正确,检查60020端口是否被占用。

四、执行hbase程序orshell命令出现如下提示:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hbase-0.92.1/lib/slf4j-log4j12-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hadoop-1.0.3/lib/slf4j-log4j12-1.4.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

是因为hbase和hadoop里都有这个jar包,选择其一移除即可。

五、执行hbase的mapreduce作业,有些节点无任何报错正常执行,有些节点总报类似Status : FAILED
java.lang.NullPointerException的错误,查看tasktracker的log日志有如下错误:

WARN org.apache.zookeeper.ClientCnxn: Session 0×0 for server null, unexpected error, closing socket connection and attempting reconnect

caused by java.net.ConnectException: Connection refused

官方对这个错误给了说明,

Errors like this… are either due to ZooKeeper being down, or unreachable due to network issues.

当初配置zookeeper时只说尽量配置奇数节点防止down掉一个节点无法选出leader,现在看这个问题貌似所以想执行任务的节点都必须配置zookeeper啊。

六、报告找不到方法异常,但是报告的函数并非自己定义的,也并没有调用这样的函数,类似信息如下:

java.lang.RuntimeException: java.lang.NoSuchMethodException: com.google.hadoop.examples.Simple$MyMapper.()
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:45)
at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:32)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:53)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:209)
at org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java:1210)
Caused by: java.lang.NoSuchMethodException: com.google.hadoop.examples.Simple$MyMapper.()
at java.lang.Class.getConstructor0(Class.java:2705)
at java.lang.Class.getDeclaredConstructor(Class.java:1984)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:41)
… 4 more

网上找到解决方法如下:

This is actually the() function. The display on the web page doesn’t translate into html, but dumps plain text, sois treated as a (nonexistant) tag by your browser. This function is created as a default initializer for non-static classes. This is most likely caused by having a non-static Mapper or Reducer class. Try adding the static keyword to your class declaration, ie:

意思是缺少static关键字~添加上即可。如下:

public static class MyMapper extends MapReduceBase implements Mapper {…}

七、使用mapreduce程序写HFile操作hbase时,可能会有这样的错误:


java.lang.IllegalArgumentException: Can’t read partitions file

Caused by: java.io.IOException: wrong key class: org.apache.hadoop.io.*** is not class org.apache.hadoop.hbase.io.ImmutableBytesWritable

这里需要注意的是无论是map还是reduce作为最终的输出结果,输出的key和value的类型应该是:< ImmutableBytesWritable, KeyValue> 或者< ImmutableBytesWritable, Put>。改成这样的类型就行了。

八、如果启动hbase集群出现regionserver无法启动,日志报告如下类似错误时,说明是集群的时间不同步,只需要同步即可解决。

FATAL org.apache.hadoop.hbase.regionserver.HRegionServer: ABORTING region server 10.210.78.22,60020,1344329095415: Unhandled exceptio
n: org.apache.hadoop.hbase.ClockOutOfSyncException: Server 10.210.78.22,60020,1344329095415 has been rejected; Reported time is too far out of sync with mast
er. Time difference of 90358ms > max allowed of 30000ms
org.apache.hadoop.hbase.ClockOutOfSyncException: org.apache.hadoop.hbase.ClockOutOfSyncException: Server 10.210.78.22,60020,1344329095415 has been rejected;
Reported time is too far out of sync with master. Time difference of 90358ms > max allowed of 30000ms
……
Caused by: org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.hbase.ClockOutOfSyncException: Server 10.210.78.22,60020,1344329095415 has been rejected;
Reported time is too far out of sync with master. Time difference of 90358ms > max allowed of 30000ms

只需要执行一下这条命令即可同步国际时间:

/usr/sbin/ntpdate tick.ucla.edu tock.gpsclock.com ntp.nasa.gov timekeeper.isi.edu usno.pa-x.dec.com;/sbin/hwclock –systohc > /dev/null

转自http://blog.pureisle.net/archives/1859.html
分享到:
评论

相关推荐

    hbase优化总结

    Linux 系统最大可打开文件数的默认参数值是 1024,如果不进行修改,在并发量上来的时候会出现“Too Many Open Files”的错误,导致整个 HBase 不可运行。可以通过修改 ulimit 命令来临时或持久地修改最大文件数。...

    Hbase实验报告.pdf

    如果出现错误,应检查Hadoop和HBase的配置文件,如`hbase-site.xml`和`hbase-env.sh`,确保它们指向正确的路径和服务端口。 通过这个实验,我们不仅掌握了HBase的基本操作,还理解了NoSQL数据库在大数据处理中的...

    经过测试,总结出可运行成功的C#For HBase示例代码

    2. **启动HBase REST服务**: 在HBase配置中启用REST接口,并启动对应的服务器。 3. **C#客户端库**: 使用如`SharpHBase`或`HBase.Net`这样的C#客户端库,它们提供了与HBase交互的类和方法。 4. **连接HBase**: ...

    hbase常见错误整理3年运维经验整理

    ### HBase常见错误及解决方案:3年运维经验总结 #### 一、配置第三方依赖包HADOOP_CLASSPATH和HBase问题 **问题描述** 在本地开发HBase程序时,虽然本地编译能够通过(因为在IDE中已经导入了必要的jar包),但在...

    Hadoop(Hbase)的安装部署与配置实验

    ### Hadoop(Hbase)的安装部署与配置实验知识点总结 #### 一、实验环境准备 1. **硬件配置** - CPU: Intel Core i5-3317U @ 1.7GHz - Memory: 8GB - OS: Windows 8 + Ubuntu 12.04 LTS (64-bit on VMware) 2. ...

    第8章 HBase组件安装配置.pdf

    HBase 组件安装配置知识点总结 本章节主要讲述 HBase 组件的安装和配置过程。下面是对应的知识点总结: 1. HBase 组件安装的实验目的: * 掌握 HBase 安装与配置 * 掌握 HBase 常用 Shell 命令 2. HBase 组件...

    Hadoop3.1.1集成hbase2.1.1

    - 如果HBase和Hadoop集群都运行在同一台机器上,则可能需要确保hbase-site.xml中的配置能够反映正确的主机名和端口号。 2. 具体配置项说明: - hbase.zookeeper.quorum:这是一个指定ZooKeeper集群的配置,定义了...

    Hbase集群部署.pdf

    HBase配置文件主要涉及到hbase-site.xml文件,这里需要配置HBase的数据存储路径(hbase.rootdir),指向HDFS上一个预先创建的目录。此外,还需要配置HBase依赖的Zookeeper集群,确保集群中至少有一个Zookeeper节点。...

    Elasticsearch-HBase-sep机制

    总结,`SEP`机制通过`hbase-indexer`组件实现了HBase与Elasticsearch之间的数据实时同步,让用户能够在保持HBase强大存储能力的同时,享受到Elasticsearch的搜索与分析优势。在实际部署和使用过程中,需根据业务需求...

    hbase-1.3.0.tar.gz

    HBase依赖于HDFS来持久化数据,Hadoop 2.x版本引入了YARN(Yet Another Resource Negotiator),优化了资源管理,使得HBase可以在多任务并行运行的环境中高效地处理数据。 Hive 2.3.6是基于Hadoop的数据仓库工具,...

    springboot集成phoenix+hbase

    此外,确保HBase和Phoenix服务器已经正确配置并运行是必要的。你可以通过`phoenix-queryserver`启动Query Server,然后使用Phoenix的SQL客户端(如Phoenix SQL shell)验证连接和查询功能。 总结,Spring Boot集成...

    MapReduce on Hbase

    这使得开发者可以在Hadoop集群上运行MapReduce作业,以批量处理存储在HBase中的大量数据。由于HBase和Hadoop都是基于HDFS(Hadoop文件系统)构建的,所以它们之间的这种集成是无缝的。 HBase提供了一些特定的类和...

    Elasticsearch-HBase-River同步

    总结,Elasticsearch-HBase-River是连接HBase与Elasticsearch的重要桥梁,它使得我们在享受HBase强大的数据存储能力的同时,也能充分利用Elasticsearch的搜索和分析特性。正确配置和优化这个插件,可以帮助我们构建...

    hadoop2.2 hbase0.96 hive0.12安装整合详细高可靠文档及经验总结

    - **启动失败**: 检查HMaster和RegionServer的日志,通常是因为权限问题或配置错误。 - **数据不一致**: 检查HBase集群的配置是否正确,以及Zookeeper的服务状态。 **4.3 Hive安装常见问题** - **元数据问题**: ...

    大数据平台及编程实践--HBase

    1. HBase安装与配置:遵循指导步骤,完成HBase的伪分布式部署,确保所有服务正常运行,可以通过Web UI(localhost:16010)查看状态。 2. HBase操作实践:创建名为“person”的表,然后执行一系列操作,如列出所有表...

    HBase完全分布式搭建-new.docx

    - **配置错误**:仔细检查所有配置文件,确保没有遗漏或错误的设置。 #### 七、总结 本文档详细介绍了HBase完全分布式集群的搭建过程,包括Hadoop集群的基础构建、JDK的安装、HBase的配置以及集群的启动和验证。...

Global site tag (gtag.js) - Google Analytics