一、docker-compose部署starrocks
官方的docker-compose地址:docker-compose地址
bash
version: "3.9"
services:
starrocks-fe-0:
image: starrocks/fe-ubuntu:latest
hostname: starrocks-fe-0
container_name: starrocks-fe-0
command:
- /bin/bash
- -c
- |
/opt/starrocks/fe_entrypoint.sh starrocks-fe-0
environment:
- HOST_TYPE=FQDN
- TZ=Asia/Shanghai
ports:
- "1030:8030"
- "2020:9020"
- "3030:9030"
volumes:
- 1fe3be_fe0_data:/opt/starrocks/fe/meta
starrocks-be-0:
image: starrocks/be-ubuntu:latest
hostname: starrocks-be-0
container_name: starrocks-be-0
command:
- /bin/bash
- -c
- |
/opt/starrocks/be_entrypoint.sh starrocks-fe-0
environment:
- HOST_TYPE=FQDN
- TZ=Asia/Shanghai
depends_on:
- starrocks-fe-0
volumes:
- 1fe3be_be0_data:/opt/starrocks/be/storage
starrocks-be-1:
image: starrocks/be-ubuntu:latest
hostname: starrocks-be-1
container_name: starrocks-be-1
command:
- /bin/bash
- -c
- |
/opt/starrocks/be_entrypoint.sh starrocks-fe-0
environment:
- HOST_TYPE=FQDN
- TZ=Asia/Shanghai
depends_on:
- starrocks-fe-0
volumes:
- 1fe3be_be1_data:/opt/starrocks/be/storage
starrocks-be-2:
image: starrocks/be-ubuntu:latest
hostname: starrocks-be-2
container_name: starrocks-be-2
command:
- /bin/bash
- -c
- |
/opt/starrocks/be_entrypoint.sh starrocks-fe-0
environment:
- HOST_TYPE=FQDN
- TZ=Asia/Shanghai
depends_on:
- starrocks-fe-0
volumes:
- 1fe3be_be2_data:/opt/starrocks/be/storage
volumes:
1fe3be_fe0_data:
1fe3be_be0_data:
1fe3be_be1_data:
1fe3be_be2_data:
注意:可以将日志和配置文件全部挂出来。
二、常见问题
1.be启动报错,缺少UTF包!
bash
少了依赖包,需要下载依赖包到be/lib目录下。
把这个包下载下来,解压后可以看到一个java-udf-jar-with-dependencies.jar这个jar包,把他拷贝到be的安装位置:${doris_be_home}/lib/目录下,然后再启动be即可。
2.BE无法启动,file descriptors limit is too small
bash
配置问题,需要修改。
1.修改 /etc/security/limits.conf, 加入
echo "* soft nofile 204800" >> /etc/security/limits.conf
echo "* hard nofile 204800" >> /etc/security/limits.conf
echo "* soft nproc 204800" >> /etc/security/limits.conf
echo "* hard nproc 204800 " >> /etc/security/limits.conf
2.修改 /etc/sysctl.conf, 加入
echo fs.file-max = 6553560 >> /etc/sysctl.conf
3.vi /etc/profile。添加行:ulimit -n 204800
source一下
3.com.sleepycat.je.EnvironmentFailureException: (JE 18.3.12) Environment must be closed, caused by:xxxx
bash
挂载目录磁盘不足4G,会报这个错。
4.be 报错 version already been compacted
看下这篇帖子:lstarrocks论坛