【修复中】BE 启动包错 meet error status: [NOT_FOUND]Could not find subsystem memory in /proc/self/cgroup

Viewed 37

Apple M2
macos 14.4
Version : doris-2.1.3-rc09

be dockerfile

FROM ubuntu:22.04

ARG TARGETARCH

ARG DORIS_VERSION="2.1.3"

RUN sed -i -e 's/^APT/# APT/' -e 's/^DPkg/# DPkg/' /etc/apt/apt.conf.d/docker-clean && swapoff -a && \
    apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
    patchelf gdb binutils binutils-common mysql-client \
    curl wget less vim htop iproute2 numactl jq iotop sysstat tzdata \
    tcpdump iputils-ping dnsutils strace lsof blktrace \
    bpfcc-tools linux-headers-realtime linux-tools-realtime silversearcher-ag \
    net-tools openjdk-8-jdk && \
    rm -rf /var/lib/apt/lists/*

# RUN sysctl -w vm.max_map_count=2000000
RUN echo "vm.max_map_count = 2000000" >> /etc/sysctl.conf

# set environment variables
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-${TARGETARCH:-arm64} \
        PATH="/opt/apache-doris/be/bin:${PATH}"

# apache-doris/be from doris release xxxx.tar.gz.please update the version in follows x.x.x.
ADD resource/apache-doris-2.1.3-bin-arm64/be /opt/apache-doris/be

COPY resource/be_*.sh /opt/apache-doris/

COPY resource/entry_point.sh /usr/local/bin/

COPY resource/init_be.sh /usr/local/bin/

#RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

WORKDIR /opt/apache-doris

ENTRYPOINT ["bash","entry_point.sh"]

启动脚步:

docker network create --driver bridge --subnet=172.20.80.0/24 doris-3-3-network

docker run -itd \
    --name=doris-runtime-fe-01 \
    --env FE_SERVERS="fe1:172.20.80.2:9010" \
    --env FE_ID=1 \
    --privileged \
    -p 8030:8030 \
    -p 9010:9010 \
    -p 9030:9030 \
    -v /Users/brin/data/runtime/fe-01/doris-meta:/opt/apache-doris/fe/doris-meta \
    -v /Users/brin/data/runtime/fe-01/log:/opt/apache-doris/fe/log \
    --network=doris-3-3-network \
    --ip=172.20.80.2 \
    doris-runtime-fe-arm64

docker run -itd \
    --name=doris-runtime-be-01 \
    --env FE_SERVERS="fe1:172.20.80.2:9010" \
    --env BE_ADDR="172.20.80.3:9050" \
    --privileged \
    -p 8040:8040 \
    -p 9050:9050 \
    -v /Users/brin/data/runtime/be-01/storage:/opt/apache-doris/be/storage \
    -v /Users/brin/data/runtime/be-01/log:/opt/apache-doris/be/log \
    --network=doris-3-3-network \
    --ip=172.20.80.3 \
    doris-runtime-be-arm64

错误日志信息:

I20240611 11:47:31.750169  1957 task_worker_pool.cpp:1387] successfully create tablet|signature=10100|tablet_id=10100
I20240611 11:47:31.750911  1958 tablet_manager.cpp:346] success to create tablet. tablet_id=10102, tablet_path=/opt/apache-doris/be/storage/data/17/10102/1299529229
I20240611 11:47:31.750948  1958 task_worker_pool.cpp:1387] successfully create tablet|signature=10102|tablet_id=10102
W20240611 11:47:31.757452  2629 status.h:412] meet error status: [NOT_FOUND]Could not find subsystem memory in /proc/self/cgroup

        0#  doris::CGroupUtil::find_global_cgroup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)
        1#  doris::CGroupUtil::find_abs_cgroup_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)
        2#  doris::CGroupUtil::find_cgroup_mem_limit(long*)
        3#  doris::MemInfo::refresh_proc_meminfo()
        4#  doris::Daemon::memory_maintenance_thread()
        5#  doris::Thread::supervise_thread(void*)
        6#  ?
        7#  ?
W20240611 11:47:31.758066  2629 status.h:412] meet error status: [NOT_FOUND]Could not find subsystem memory in /proc/self/cgroup

        0#  doris::CGroupUtil::find_global_cgroup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)
        1#  doris::CGroupUtil::find_abs_cgroup_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)
        2#  doris::CGroupUtil::find_cgroup_mem_usage(long*)
        3#  doris::MemInfo::refresh_proc_meminfo()
        4#  doris::Daemon::memory_maintenance_thread()
        5#  doris::Thread::supervise_thread(void*)
        6#  ?
        7#  ?
1 Answers

关联 issue:https://github.com/apache/doris/issues/32842

可以关注下发版,Doris 2.1.4 版本修复了系统没有配置 cgroup 导致BE获取cgroup.memory失败的问题

升级 Doris 2.1.4 后,也可以在 be.conf 中增加 enable_use_cgroup_memory_info=false,从而避免不必要的检查