root@youeran-PC:/home/youeran/opengauss# 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 … 2025-07-28 17:14:42.687 [unknown] [unknown] localhost 140118296484288 0[0:0#0] [BACKEND] WARNING: macAddr is 19001/2923005741, sysidentifier is 1245294137/2267916328, randomNum is 1289398312
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
[2025-07-28 17:15:20.772][176][gs_ctl]: gs_ctl started,datadir is /var/lib/opengauss/data
[2025-07-28 17:15:20.831][176][gs_ctl]: waiting for server to start…
.0 LOG: [Alarm Module]can not read GAUSS_WARNING_TYPE env.
0 LOG: [Alarm Module]Host Name: youeran-PC
0 LOG: [Alarm Module]Host IP: youeran-PC. Copy hostname directly in case of taking 10s to use ‘gethostbyname’ when /etc/hosts does not contain
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.
0 LOG: SSE4.2 is not supported, disable codegen.
2025-07-28 17:15:20.977 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] LOG: when starting as multi_standby mode, we couldn’t support data replicaton.
2025-07-28 17:15:20.977 [unknown] [unknown] localhost 139988243347904 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.2025-07-28 17:15:20.995 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] LOG: [Alarm Module]can not read GAUSS_WARNING_TYPE env.
2025-07-28 17:15:20.995 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] LOG: [Alarm Module]Host Name: youeran-PC
2025-07-28 17:15:20.995 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] LOG: [Alarm Module]Host IP: youeran-PC. Copy hostname directly in case of taking 10s to use ‘gethostbyname’ when /etc/hosts does not contain
2025-07-28 17:15:20.995 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] LOG: [Alarm Module]Get ENV GS_CLUSTER_NAME failed!
2025-07-28 17:15:20.995 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] LOG: [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 57
2025-07-28 17:15:21.041 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] LOG: loaded library “security_plugin”
2025-07-28 17:15:21.043 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] WARNING: could not create any HA TCP/IP sockets
2025-07-28 17:15:21.043 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] WARNING: could not create any HA TCP/IP sockets
2025-07-28 17:15:21.064 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] LOG: InitNuma numaNodeNum: 1 numa_distribute_mode: none inheritThreadPool: 0.
2025-07-28 17:15:21.064 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] LOG: reserved memory for backend threads is: 220 MB
2025-07-28 17:15:21.064 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] LOG: reserved memory for WAL buffers is: 128 MB
2025-07-28 17:15:21.064 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] LOG: Set max backend reserve memory is: 348 MB, max dynamic memory is: 8121 MB
2025-07-28 17:15:21.064 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] LOG: shared memory 3306 Mbytes, memory context 8469 Mbytes, max process memory 12288 Mbytes
2025-07-28 17:15:21.245 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [CACHE] LOG: set data cache size(402653184)
2025-07-28 17:15:21.332 [unknown] [unknown] localhost 139988243347904 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
2025-07-28 17:15:21.408 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] LOG: gaussdb: fsync file “/var/lib/opengauss/data/gaussdb.state.temp” success
2025-07-28 17:15:21.408 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] LOG: create gaussdb state file success: db state(STARTING_STATE), server mode(Normal), connection index(1)
2025-07-28 17:15:21.479 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] LOG: max_safe_fds = 976, usable_fds = 1000, already_open = 14
2025-07-28 17:15:21.484 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] LOG: user configure file is not found, it will be created.
2025-07-28 17:15:21.494 [unknown] [unknown] localhost 139988243347904 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!
2025-07-28 17:15:21.494 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [BACKEND] LOG: Failed to parse cgroup config file.
2025-07-28 17:15:21.559 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [EXECUTOR] WARNING: Failed to obtain environment value $GAUSSLOG!
2025-07-28 17:15:21.559 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [EXECUTOR] DETAIL: N/A
2025-07-28 17:15:21.559 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [EXECUTOR] CAUSE: Incorrect environment value.
2025-07-28 17:15:21.559 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [EXECUTOR] ACTION: Please refer to backend log for more details.
2025-07-28 17:15:21.565 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [EXECUTOR] WARNING: Failed to obtain environment value $GAUSSLOG!
2025-07-28 17:15:21.565 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [EXECUTOR] DETAIL: N/A
2025-07-28 17:15:21.565 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [EXECUTOR] CAUSE: Incorrect environment value.
2025-07-28 17:15:21.565 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [EXECUTOR] ACTION: Please refer to backend log for more details.
2025-07-28 17:15:21.565 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [EXECUTOR] WARNING: Failed to obtain environment value $GAUSSLOG!
2025-07-28 17:15:21.565 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [EXECUTOR] DETAIL: N/A
2025-07-28 17:15:21.565 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [EXECUTOR] CAUSE: Incorrect environment value.
2025-07-28 17:15:21.565 [unknown] [unknown] localhost 139988243347904 0[0:0#0] 0 [EXECUTOR] ACTION: Please refer to backend log for more details.
[2025-07-28 17:15:21.910][176][gs_ctl]: waitpid 179 failed, exitstatus is 0, ret is 2
[2025-07-28 17:15:21.910][176][gs_ctl]: stopped waiting
[2025-07-28 17:15:21.910][176][gs_ctl]: could not start server
Examine the log output.
root@youeran-PC:/home/youeran/opengauss# cat opengauss-dockercompose.yml
version: ‘3.8’
services:
opengauss:
image: opengauss:6.0.2
container_name: opengauss
privileged: true
restart: always
environment:
- GS_PASSWORD=s********* # 密码需满足复杂度要求
- TZ=Asia/Shanghai # 时区配置
#ports:
# - “5432:5432” # 数据库服务端口
# - “9000:9000” # 监控端口(可选)
volumes:
- ./data:/var/lib/opengauss/data # 数据持久化
network_mode: host
root@youeran-PC:/home/youeran/opengauss#