我已经创建了hbase的docker镜像(zookeeper embedded)。 另外,我已经创建了我的应用程序的docker镜像(基本图像:tomcat)。
使用docker-compose我已经启动了两个容器(my_app,hbase)
它工作正常。
但是当我尝试在docker中运行容器(hbase)并使用tomcat从本地运行my_app时。 my_app正在重复调用异常,
Call exception, tries=10, retries=35, started=38358 ms ago, cancelled=false, msg=row 'ApplicationIndex,,99999999999999' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=da996582a9e5,39095,1525328219005, seqNum=0
Call exception, tries=10, retries=35, started=38358 ms ago, cancelled=false, msg=row 'ApplicationIndex,,99999999999999' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=da996582a9e5,39095,1525328219005, seqNum=0
我认为docker-compose文件或我的hbase-site.xml文件没有问题,因为my_app在docker中运行时一切正常。
我假设(因为区域和主机名存在于my_app日志中(上图),并且zookeeper(嵌入在hbase中)在my_app启动时响应)从my_app连接到zookeeper和hbase没有任何问题。但是当hbase回复my_app时出现问题。
有谁知道如何解决这个问题?
docker-compose文件如下。
hbase:
build:
context: .
dockerfile: Dockerfile
args:
- HBASE_VERSION=${HBASE_VERSION}
container_name: ${HBASE_NAME}
networks:
- networks
expose:
# zookeeper
- "2181"
# HBase Master API port
- "60000"
# HBase Master Web UI
- "16010"
# Regionserver API port
- "60020"
# HBase Regionserver web UI
- "16030"
ports:
- 2180:2181
- 60000:60000
- 16010:16010
- 60020:60020
- 16030:16030