thrift+hbase异常(在docker容器中)

xyhw6mcr  于 2021-06-10  发布在  Hbase
关注(0)|答案(1)|浏览(645)

我正在尝试将hbase和php模块组合的遗留系统拆分为两个单独的容器,其中包含以下docker compose文件:

version: '2'
services:
  php:
    image: my-legacy-php
    volumes:
      - ~/workspace/php:/workspace/php
    ports:
      - "80:80"
    links:
      - hbase:hbase-docker
  hbase:
    image: dajobe/hbase
    hostname: hbase-docker
    ports:
      - "43590-44000:43590-44000"
      - "8085:8085"
      - "2181:2181"
      - "8080:8080"
      - "16010:16010"
      - "9095:9095"
      - "9090:9091"
      - "16020:16020"
      - "16030:16030"
      - "60000:60000"
    volumes:
      - ~/workspace/hbase-docker/data:/data

我正在使用dajobe/hbase中hbase的公共docker映像。现在,我尝试向php模块发送一些事件(http get请求),并在php模块(thrift lib)中获取以下异常:

ERROR HBaseFacade - exception in handling rcomEvent: Internal error processing increment, trace is: #0 /workspace/php/libs/thrift-0.8.0/packages/Hbase/THBaseService.php(536): THBaseServiceClient->recv_increment()

在hbase容器中,我看到以下异常(在/data/log/hbase-thrift.log中):

2016-11-21 09:13:29,620 ERROR [thrift-worker-0] thrift.ProcessFunction: Internal error processing increment
java.lang.NullPointerException
    at org.apache.hadoop.hbase.thrift.ThriftServerRunner$HBaseHandler.increment(ThriftServerRunner.java:1747)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.hadoop.hbase.thrift.HbaseHandlerMetricsProxy.invoke(HbaseHandlerMetricsProxy.java:67)
    at com.sun.proxy.$Proxy9.increment(Unknown Source)
    at org.apache.hadoop.hbase.thrift.generated.Hbase$Processor$increment.getResult(Hbase.java:4537)
    at org.apache.hadoop.hbase.thrift.generated.Hbase$Processor$increment.getResult(Hbase.java:4521)
    at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
    at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
    at org.apache.hadoop.hbase.thrift.TBoundedThreadPoolServer$ClientConnnection.run(TBoundedThreadPoolServer.java:289)
    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)

有什么想法吗?
编辑:我的上一个本地hbase版本(与我的php模块一起工作)是0.94.26,hbase docker运行1.1.4

vwoqyblh

vwoqyblh1#

我的解决办法是逃跑 thrift2 而不是 thrift 在hbase容器中。
从https://github.com/dajobe/hbase-docker/blob/master/hbase-server:我改变了:

hbase thrift start > $logs_dir/hbase-thrift.log 2>&1 &

收件人:

hbase thrift2 start > $logs_dir/hbase-thrift.log 2>&1 &

相关问题