docker-compose部署更换端口之后无法启动,不更换端口可以正常启动

Viewed 130
  • fe.conf部分配置文件
...
http_port = 18030
rpc_port = 19020
query_port = 19030
edit_log_port = 19010
arrow_flight_sql_port = -1
...
  • be.conf部分配置文件
...
be_port = 19060
webserver_port = 18040
heartbeat_service_port = 19050
brpc_port = 18060
arrow_flight_sql_port = -1
...
  • docker-compose部分配置

# fe
...
    environment:
      - TZ=Asia/Shanghai
      - FE_SERVERS=fe1:10.20.183.81:19010
      - FE_ID=1
    volumes:
      - /data/dorisfe/conf/fe.conf:/opt/apache-doris/fe/conf/fe.conf:rw
    network_mode: host
...

# be

    environment:
      - TZ=Asia/Shanghai
      - FE_SERVERS=fe1:10.20.183.81:19010
      - BE_ADDR=10.20.183.81:19050
    volumes:
      - /data/dorisbe/conf/be.conf:/opt/apache-doris/be/conf/be.conf:rw
    network_mode: host

dorisfe启动报错:


2024-05-18 12:59:50,239 INFO (InternalSchemaInitializer|113) [InternalCatalog.createDb():427] create database[__internal_schema] which already exists
2024-05-18 12:59:50,242 WARN (InternalSchemaInitializer|113) [InternalSchemaInitializer.run():81] Statistics storage initiated failed, will try again later
org.apache.doris.common.DdlException: errCode = 2, detailMessage = System has no available disk capacity or no available BE nodes
        at org.apache.doris.system.SystemInfoService.checkAvailableCapacity(SystemInfoService.java:820) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.datasource.InternalCatalog.createTable(InternalCatalog.java:1101) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.InternalSchemaInitializer.createTbl(InternalSchemaInitializer.java:159) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.InternalSchemaInitializer.run(InternalSchemaInitializer.java:79) ~[doris-fe.jar:1.2-SNAPSHOT]
...

dorisbe启动日志:

...

2024-05-18T12:59:02+08:00 [Warn] [Entrypoint]: FE_SERVERS fe1:10.20.183.81:19010
2024-05-18T12:59:02+08:00 [Warn] [Entrypoint]: BE_ADDR 10.20.183.81:19050
2024-05-18T12:59:02+08:00 [Note] [Entrypoint]: MASTER_FE_IP 10.20.183.81
2024-05-18T12:59:02+08:00 [Note] [Entrypoint]: CURRENT_BE_IP 10.20.183.81
2024-05-18T12:59:02+08:00 [Note] [Entrypoint]: CURRENT_BE_PORT 19050
2024-05-18T12:59:02+08:00 [Note] [Entrypoint]: PRIORITY_NETWORKS 10.20.183.0/24
2024-05-18T12:59:02+08:00 [Note] [Entrypoint]: MASTER FE is not started. retry.
2024-05-18T12:59:22+08:00 [Note] [Entrypoint]: MASTER FE is not started. retry.
2024-05-18T12:59:43+08:00 [Note] [Entrypoint]: MASTER FE is not started. retry.
2024-05-18T13:00:03+08:00 [Note] [Entrypoint]: MASTER FE is not started. retry.
2024-05-18T13:00:23+08:00 [Note] [Entrypoint]: MASTER FE is not started. retry.
2024-05-18T13:00:43+08:00 [Note] [Entrypoint]: MASTER FE is not started. retry.

...

系统参数什么的都配置过了,依旧不行,不改端口可以正常启动.

2 Answers

fe这块的日志不是报错,只是说be没有加进去,你把be启动就行了,然后端口的话,你只需要在fe里面写上正确的be的heartbeat_service_port就行

BE一直检测到FE没有启动,所以自己也一直没启动,实际fe已经启动了。

我怀疑be启动的时候是不是只能检测FE的9010端口?在环境变量里面配了FE_SERVERS的19010端口,一直检测不到fe启动。我把FE的端口换成默认的9010端口之后,就能检测到FE启动了.

下面是我的最小配置:

  • fe.conf(除了修改端口,其他默认)

CUR_DATE=`date +%Y%m%d-%H%M%S`

LOG_DIR = ${DORIS_HOME}/log


JAVA_OPTS="-Djavax.security.auth.useSubjectCredsOnly=false -Xss4m -Xmx8192m -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:$DORIS_HOME/log/fe.gc.log.$CUR_DATE -Dlog4j2.formatMsgNoLookups=true"


JAVA_OPTS_FOR_JDK_9="-Djavax.security.auth.useSubjectCredsOnly=false -Xss4m -Xmx8192m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xlog:gc*:$DORIS_HOME/log/fe.gc.log.$CUR_DATE:time -Dlog4j2.formatMsgNoLookups=true"

JAVA_OPTS_FOR_JDK_17="-Djavax.security.auth.useSubjectCredsOnly=false -XX:+UseZGC -Xmx8192m -Xms8192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$DORIS_HOME/log/ -Xlog:gc*:$DORIS_HOME/log/fe.gc.log.$CUR_DATE:time"


sys_log_level = INFO

sys_log_mode = NORMAL

http_port = 18030
rpc_port = 19020
query_port = 19030
edit_log_port = 19010
arrow_flight_sql_port = -1


priority_networks = 10.20.183.0/24

  • be.conf(除了修改端口,其他默认)

CUR_DATE=`date +%Y%m%d-%H%M%S`

PPROF_TMPDIR="$DORIS_HOME/log/"

JAVA_OPTS="-Xmx8g -DlogPath=$DORIS_HOME/log/jni.log -Xloggc:$DORIS_HOME/log/be.gc.log.$CUR_DATE -Djavax.security.auth.useSubjectCredsOnly=false -Dsun.security.krb5.debug=true -Dsun.java.command=DorisBE -XX:-CriticalJNINatives"

JAVA_OPTS_FOR_JDK_9="-Xmx8g -DlogPath=$DORIS_HOME/log/jni.log -Xlog:gc:$DORIS_HOME/log/be.gc.log.$CUR_DATE -Djavax.security.auth.useSubjectCredsOnly=false -Dsun.security.krb5.debug=true -Dsun.java.command=DorisBE -XX:-CriticalJNINatives"

JAVA_OPTS_FOR_JDK_17="-Xmx8g -DlogPath=$DORIS_HOME/log/jni.log -Xlog:gc:$DORIS_HOME/log/be.gc.log.$CUR_DATE -Djavax.security.auth.useSubjectCredsOnly=false -Dsun.security.krb5.debug=true -Dsun.java.command=DorisBE -XX:-CriticalJNINatives --add-opens=java.base/java.net=ALL-UNNAMED"


JEMALLOC_CONF="percpu_arena:percpu,background_thread:true,metadata_thp:auto,muzzy_decay_ms:15000,dirty_decay_ms:15000,oversize_threshold:0,prof:false,lg_prof_interval:32,lg_prof_sample:19,prof_gdump:false,prof_accum:false,prof_leak:false,prof_final:false"
JEMALLOC_PROF_PRFIX=""

sys_log_level = INFO

be_port = 19060
webserver_port = 18040
heartbeat_service_port = 19050
brpc_port = 18060
arrow_flight_sql_port = -1

enable_https = false
ssl_certificate_path = "$DORIS_HOME/conf/cert.pem"
ssl_private_key_path = "$DORIS_HOME/conf/key.pem"

jdbc_drivers_dir=${DORIS_HOME}/../jdbc_drivers/
aws_log_level=0
AWS_EC2_METADATA_DISABLED=true
priority_networks = 10.20.183.0/24

  • docker-compose文件:

version: "3"
services:
  fe:
    image: ailpha-registry:25000/doris.fe-ubuntu:2.1.1
    hostname: fe
    environment:
     - FE_SERVERS=fe1:10.20.183.81:19010
     - FE_ID=1
#     - FE_MASTER_IP=10.20.183.81
#     - FE_MASTER_PORT=19010
#     - FE_CURRENT_IP=10.20.183.81
#     - FE_CURRENT_PORT=19010
    volumes:
     - /tmp/doris/data/fe.conf:/opt/apache-doris/fe/conf/fe.conf:rw
    network_mode: host
  be:
    image: ailpha-registry:25000/doris.be-ubuntu:2.1.1
    hostname: be
    environment:
     - FE_SERVERS=fe1:10.20.183.81:19010
     - BE_ADDR=10.20.183.81:19050
#     - FE_MASTER_IP=10.20.183.81
#     - FE_MASTER_PORT=19010
#     - BE_IP=10.20.183.81
#     - BE_PORT=19050
    volumes:
     - /tmp/doris/data/be.conf:/opt/apache-doris/be/conf/be.conf:rw
    depends_on:
      - fe
    network_mode: host

如果注释docker-compose中fe的挂载配置文件fe.conf,也就是使用默认的配置文件9010端口,能够正常启动,即使FE_SERVERS的端口是19010.

您那边有好的解决方案吗?还是说我配置的有问题.