opengauss 6.0.3 docker 镜像无法启动

▶ shasum -a 256 openGauss-Docker-6.0.3-x86_64.tar
75e9788490be39e64696bcd44343ab309a9ed14924d12778b75f1a695e34b588  openGauss-Docker-6.0.3-x86_64.tar

▶ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 opengauss:6.0.3
aa81186d58fdb04a14a7c351060107c081a296fb6e461f01dc3fc74eda934be1

~/Downloads
▶ docker logs -f opengauss

                        Message: The supplied GS_PASSWORD is meet requirements.

The files belonging to this database system will be owned by user "omm".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

fixing permissions on existing directory /var/lib/opengauss/data ... ok
creating subdirectories ... in ordinary occasionok
creating configuration files ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 1024MB
Begin init undo subsystem meta.
[INIT UNDO] Init undo subsystem meta successfully.
creating template1 database in /var/lib/opengauss/data/base/1 ... 2026-03-31 01:29:12.914 [unknown] [unknown] localhost 140519025117696 0[0:0#0]  [BACKEND] WARNING:  macAddr is 40584/3104685252, sysidentifier is 2659760397/3167013651, randomNum is 1718668051
ok
initializing pg_authid ... ok
setting password ... ok
initializing dependencies ... ok
loading PL/pgSQL server-side language ... ok
creating system views ... ok
creating performance views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
initialize global configure for bucketmap length ... ok
creating information schema ... ok
loading foreign-data wrapper for distfs access ... ok
loading foreign-data wrapper for log access ... ok
loading hstore extension ... ok
loading foreign-data wrapper for MOT access ... ok
loading security plugin ... ok
update system tables ... ok
creating snapshots catalog ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
freezing database template0 ... ok
freezing database template1 ... ok
freezing database postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run gs_initdb.

Success. You can now start the database server of single node using:

    gaussdb -D /var/lib/opengauss/data --single_node
or
    gs_ctl start -D /var/lib/opengauss/data -Z single_node -l logfile

[2026-03-31 01:29:24.405][180][][gs_ctl]: gs_ctl started,datadir is /var/lib/opengauss/data
[2026-03-31 01:29:24.417][180][][gs_ctl]: waiting for server to start...
.0 LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.

0 LOG:  [Alarm Module]Host Name: aa81186d58fd

0 LOG:  [Alarm Module]Host IP: aa81186d58fd. Copy hostname directly in case of taking 10s to use 'gethostbyname' when /etc/hosts does not contain <HOST IP>

0 LOG:  [Alarm Module]Get ENV GS_CLUSTER_NAME failed!

0 LOG:  [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 57

0 WARNING:  failed to open feature control file, please check whether it exists: FileName=gaussdb.version, Errno=2, Errmessage=No such file or directory.
0 WARNING:  failed to parse feature control file: gaussdb.version.
0 WARNING:  Failed to load the product control file, so gaussdb cannot distinguish product version.
2026-03-31 01:29:24.495 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  when starting as multi_standby mode, we couldn't support data replicaton.
2026-03-31 01:29:24.495 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  base_page_saved_interval is 400, ori is 400.
gaussdb.state does not exist, and skipt setting since it is optional.2026-03-31 01:29:24.501 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.

2026-03-31 01:29:24.501 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Host Name: aa81186d58fd

2026-03-31 01:29:24.501 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Host IP: aa81186d58fd. Copy hostname directly in case of taking 10s to use 'gethostbyname' when /etc/hosts does not contain <HOST IP>

2026-03-31 01:29:24.501 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Get ENV GS_CLUSTER_NAME failed!

2026-03-31 01:29:24.501 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 57

2026-03-31 01:29:24.548 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  loaded library "security_plugin"
2026-03-31 01:29:24.549 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2026-03-31 01:29:24.549 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2026-03-31 01:29:24.605 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  InitNuma numaNodeNum: 1 numa_distribute_mode: none inheritThreadPool: 0.
2026-03-31 01:29:24.605 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  reserved memory for backend threads is: 220 MB
2026-03-31 01:29:24.605 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  reserved memory for WAL buffers is: 128 MB
2026-03-31 01:29:24.605 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  Set max backend reserve memory is: 348 MB, max dynamic memory is: 8120 MB
2026-03-31 01:29:24.605 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  shared memory 3307 Mbytes, memory context 8468 Mbytes, max process memory 12288 Mbytes
2026-03-31 01:29:24.645 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [CACHE] LOG:  set data cache  size(402653184)
2026-03-31 01:29:24.671 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [SEGMENT_PAGE] LOG:  Segment-page constants: DF_MAP_SIZE: 8156, DF_MAP_BIT_CNT: 65248, DF_MAP_GROUP_EXTENTS: 4175872, IPBLOCK_SIZE: 8168, EXTENTS_PER_IPBLOCK: 1021, IPBLOCK_GROUP_SIZE: 4090, BMT_HEADER_LEVEL0_TOTAL_PAGES: 8323072, BktMapEntryNumberPerBlock: 2038, BktMapBlockNumber: 25, BktBitMaxMapCnt: 512
2026-03-31 01:29:24.684 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  gaussdb: fsync file "/var/lib/opengauss/data/gaussdb.state.temp" success
2026-03-31 01:29:24.685 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  create gaussdb state file success: db state(STARTING_STATE), server mode(Normal), connection index(1)
2026-03-31 01:29:24.685 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  max_safe_fds = 976, usable_fds = 1000, already_open = 14
2026-03-31 01:29:24.686 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  user configure file is not found, it will be created.
2026-03-31 01:29:24.689 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  the configure file /usr/local/opengauss/etc/gscgroup_omm.cfg doesn't exist or the size of configure file has changed. Please create it by root user!
2026-03-31 01:29:24.689 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [BACKEND] LOG:  Failed to parse cgroup config file.
2026-03-31 01:29:24.697 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2026-03-31 01:29:24.697 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2026-03-31 01:29:24.697 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2026-03-31 01:29:24.697 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.
2026-03-31 01:29:24.701 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2026-03-31 01:29:24.701 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2026-03-31 01:29:24.701 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2026-03-31 01:29:24.701 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.
2026-03-31 01:29:24.701 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2026-03-31 01:29:24.701 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2026-03-31 01:29:24.701 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2026-03-31 01:29:24.701 [unknown] [unknown] localhost 140645089458688 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.
[2026-03-31 01:29:30.334][180][][gs_ctl]: waitpid 183 failed, exitstatus is 0, ret is 2

[2026-03-31 01:29:30.335][180][][gs_ctl]: stopped waiting
[2026-03-31 01:29:30.335][180][][gs_ctl]: could not start server
Examine the log output.

从报错看是没有加载到环境变量

进入容器这个路径/var/lib/opengauss/data/pg_log,看一下具体日志

日志内容

2026-03-31 06:58:56.754 [unknown] [unknown] localhost 140154066479616 0[0:0#0]  0 [BACKEND] LOG:  auditor process 0 started, pid=140150233359936
2026-03-31 06:58:56.758 [unknown] [unknown] localhost 140150199809600 0[0:0#0]  0 [BACKEND] LOG:  reaper backend started.
2026-03-31 06:58:56.759 [MOT] <TID:00001/-----> <SID:-----/-----> [INFO]     <System>             Startup: Loading configuration from /var/lib/opengauss/data/mot.conf
2026-03-31 06:58:56.759 [MOT] <TID:00001/-----> <SID:-----/-----> [ERROR]    <Configuration>      Libnuma library not installed or not configured
2026-03-31 06:58:56.759 [MOT] <TID:00001/-----> <SID:-----/-----> [WARNING]  <Configuration>      Failed to infer the number of NUMA nodes on current machine, defaulting to 1
2026-03-31 06:58:56.759 [MOT] <TID:00001/-----> <SID:-----/-----> [ERROR]    <Configuration>      Invalid NUMA configuration numa_node_of_cpu(0) => -1
2026-03-31 06:58:56.759 [MOT] <TID:00001/-----> <SID:-----/-----> [WARNING]  <Configuration>      Failed to infer the number of cores on the current machine, defaulting to 8
2026-03-31 06:58:56.759 [unknown] [unknown] localhost 140150233359936 0[0:0#0]  0 [BACKEND] LOG:  audit_process_cxt_init enter
2026-03-31 06:58:56.759 [unknown] [unknown] localhost 140150233359936 0[0:0#0]  0 [BACKEND] LOG:  audit_process_cxt_init pipe init successfully for pipe : 0 file descriptor: 26
2026-03-31 06:58:56.767 [MOT] <TID:00001/-----> <SID:-----/-----> [INFO]     <Configuration>      Configuring total memory for relative memory values to: 12288 MB
2026-03-31 06:58:56.767 [MOT] <TID:00001/-----> <SID:-----/-----> [INFO]     <Configuration>      Loading max_connections from envelope into MOTEngine: 200
2026-03-31 06:58:56.767 [MOT] <TID:00001/-----> <SID:-----/-----> [INFO]     <Configuration>      Adjusted maximum number of threads to 204
2026-03-31 06:58:56.767 [MOT] <TID:00001/-----> <SID:-----/-----> [INFO]     <Configuration>      Configuring synchronous redo-log handler
2026-03-31 06:58:56.767 [MOT] <TID:00001/-----> <SID:-----/-----> [WARNING]  <Configuration>      Adjusting MOT memory limits: global = 5008 MB, local = 940 MB, session large store = 0 MB, total = 5948 MB
2026-03-31 06:58:56.767 [MOT] <TID:00001/-----> <SID:-----/-----> [WARNING]  <System>             NUMA-aware memory allocation is disabled
2026-03-31 06:58:56.767 [MOT] <TID:00001/-----> <SID:-----/-----> [INFO]     <Memory>             Global Memory Limit is configured to: 0 MB --> 5008 MB
2026-03-31 06:58:56.767 [MOT] <TID:00001/-----> <SID:-----/-----> [INFO]     <Memory>             Local Memory Limit is configured to: 0 MB --> 940 MB
2026-03-31 06:58:56.767 [MOT] <TID:00001/-----> <SID:-----/-----> [INFO]     <Memory>             Session Memory Limit is configured to: 0 KB --> 0 KB (maximum 200 sessions)
2026-03-31 06:58:56.767 [MOT] <TID:00001/-----> <SID:-----/-----> [INFO]     <Memory>             Configured automatic chunk allocation policy to 'LOCAL' on single node machine
2026-03-31 06:58:56.787 [MOT] <TID:00001/-----> <SID:-----/-----> [INFO]     <System>             Startup: Affinity initialized - numaNodes = 1, coresPerCpu = 8, sessionAffinityMode = 1, taskAffinityMode = 1
2026-03-31 06:58:56.818 [unknown] [unknown] localhost 140150233359936 0[0:0#0]  0 [BACKEND] LOG:  audit_process_cxt_init success

你宿主机是什么架构的,什么系统?

macOS 13.1 x86

官网的版本启用了mot特性,在你这个操作系统不支持,需要重新打个不带mot的镜像。

Win 11 x86 也是一样的问题

2026-03-18 08:54:19.606 [unknown] [unknown] localhost 140342222326272 0[0:0#0]  0 [BACKEND] LOG:  auditor process 0 started, pid=140338393245248
2026-03-18 08:54:19.615 [unknown] [unknown] localhost 140338393245248 0[0:0#0]  0 [BACKEND] LOG:  audit_process_cxt_init enter
2026-03-18 08:54:19.615 [unknown] [unknown] localhost 140338393245248 0[0:0#0]  0 [BACKEND] LOG:  audit_process_cxt_init pipe init successfully for pipe : 0 file descriptor: 25
2026-03-18 08:54:19.616 [unknown] [unknown] localhost 140338373064256 0[0:0#0]  0 [BACKEND] LOG:  reaper backend started.
2026-03-18 08:54:19.619 [unknown] [unknown] localhost 140338393245248 0[0:0#0]  0 [BACKEND] LOG:  pgaudit_indextbl_init_new first init
2026-03-18 08:54:19.627 [MOT] <TID:00182/-----> <SID:-----/-----> [INFO]     <System>             Startup: Loading configuration from /var/lib/opengauss/data/mot.conf
2026-03-18 08:54:19.627 [MOT] <TID:00182/-----> <SID:-----/-----> [ERROR]    <Configuration>      Libnuma library not installed or not configured
2026-03-18 08:54:19.627 [MOT] <TID:00182/-----> <SID:-----/-----> [WARNING]  <Configuration>      Failed to infer the number of NUMA nodes on current machine, defaulting to 1
2026-03-18 08:54:19.627 [MOT] <TID:00182/-----> <SID:-----/-----> [ERROR]    <Configuration>      Invalid NUMA configuration numa_node_of_cpu(0) => -1
2026-03-18 08:54:19.627 [MOT] <TID:00182/-----> <SID:-----/-----> [WARNING]  <Configuration>      Failed to infer the number of cores on the current machine, defaulting to 8
2026-03-18 08:54:19.657 [MOT] <TID:00182/-----> <SID:-----/-----> [INFO]     <Configuration>      Configuring total memory for relative memory values to: 12288 MB
2026-03-18 08:54:19.660 [MOT] <TID:00182/-----> <SID:-----/-----> [INFO]     <Configuration>      Loading max_connections from envelope into MOTEngine: 200
2026-03-18 08:54:19.660 [MOT] <TID:00182/-----> <SID:-----/-----> [INFO]     <Configuration>      Adjusted maximum number of threads to 204
2026-03-18 08:54:19.660 [MOT] <TID:00182/-----> <SID:-----/-----> [INFO]     <Configuration>      Configuring synchronous redo-log handler
2026-03-18 08:54:19.660 [MOT] <TID:00182/-----> <SID:-----/-----> [WARNING]  <Configuration>      Adjusting MOT memory limits: global = 3269 MB, local = 614 MB, session large store = 0 MB, total = 3883 MB
2026-03-18 08:54:19.660 [MOT] <TID:00182/-----> <SID:-----/-----> [WARNING]  <System>             NUMA-aware memory allocation is disabled
2026-03-18 08:54:19.660 [MOT] <TID:00182/-----> <SID:-----/-----> [INFO]     <Memory>             Global Memory Limit is configured to: 0 MB --> 3269 MB
2026-03-18 08:54:19.660 [MOT] <TID:00182/-----> <SID:-----/-----> [INFO]     <Memory>             Local Memory Limit is configured to: 0 MB --> 614 MB
2026-03-18 08:54:19.660 [MOT] <TID:00182/-----> <SID:-----/-----> [INFO]     <Memory>             Session Memory Limit is configured to: 0 KB --> 0 KB (maximum 200 sessions)
2026-03-18 08:54:19.660 [MOT] <TID:00182/-----> <SID:-----/-----> [INFO]     <Memory>             Configured automatic chunk allocation policy to 'LOCAL' on single node machine
2026-03-18 08:54:19.680 [MOT] <TID:00182/-----> <SID:-----/-----> [INFO]     <System>             Startup: Affinity initialized - numaNodes = 1, coresPerCpu = 8, sessionAffinityMode = 1, taskAffinityMode = 1
2026-03-18 08:54:19.693 [unknown] [unknown] localhost 140338393245248 0[0:0#0]  0 [BACKEND] LOG:  audit_process_cxt_init success

都是一样的原因

你们这个 docker 镜像不应该保持最大兼容性么,6.0 LTS 的镜像有这个问题,7.0 的反倒正常

因为7.0之后,在编译的时候默认把mot禁了,6.0还没有。

这个问题会改吗?遇到同样的问题。

7.0.0的版本这个问题已经解决,之前的版本不改。