首页 > 其他分享 >启停openGauss

启停openGauss

时间:2024-05-13 14:41:23浏览次数:20  
标签:11 01 unknown 08 09 启停 2022 openGauss

启停openGauss

启动openGauss

  1. 以操作系统用户omm登录数据库主节点。

  2. 使用以下命令启动openGauss。

    gs_ctl start -D /opt/data
    

    说明:
    如果提示找不到gs_ctl,请检查是否source过环境变量文件(默认是~/.bashrc),若不想source环境变量文件也可以手动切换到安装路径下执行该命令。

停止openGauss

  1. 以操作系统用户omm登录数据库主节点。

  2. 使用以下命令停止openGauss。

    
    

详情查看:https://opengauss.org

详情查看:https://docs-opengauss.osinfra.cn

gs_ctl stop -D /opt/data
```

>![](public_sys-resources/icon-note.gif) **说明:** 
>启停节点操作请参见《工具与命令参考》中“系统内部调用的工具 \> gs\_ctl”章节。

示例

启动openGauss:

gs_ctl start -D /opt/data
[2022-01-08 09:11:24.666][4179575][][gs_ctl]: waiting for server to start...
.0 LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.

0 LOG:  [Alarm Module]Host Name: pekphispra59074

0 LOG:  [Alarm Module]Host IP: 192.168.6.247

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: 55

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.
.....The core dump path is an invalid directory
2022-01-08 09:11:30.381 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] LOG:  when starting as multi_standby mode, we couldn't support data replicaton.
2022-01-08 09:11:30.381 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.

2022-01-08 09:11:30.381 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Host Name: pekphispra59074

2022-01-08 09:11:30.454 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Host IP: 192.168.6.247

2022-01-08 09:11:30.454 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Get ENV GS_CLUSTER_NAME failed!

2022-01-08 09:11:30.455 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 55

2022-01-08 09:11:30.459 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] LOG:  loaded library "security_plugin"
2022-01-08 09:11:30.459 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2022-01-08 09:11:30.459 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2022-01-08 09:11:30.461 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] WARNING:  No explicit IP is configured for listen_addresses GUC.
2022-01-08 09:11:30.461 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] LOG:  InitNuma numaNodeNum: 1 numa_distribute_mode: none inheritThreadPool: 0.
2022-01-08 09:11:30.462 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] LOG:  reserved memory for backend threads is: 220 MB
2022-01-08 09:11:30.462 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] LOG:  reserved memory for WAL buffers is: 128 MB
2022-01-08 09:11:30.462 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] LOG:  Set max backend reserve memory is: 348 MB, max dynamic memory is: 11038 MB
2022-01-08 09:11:30.462 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] LOG:  shared memory 389 Mbytes, memory context 11386 Mbytes, max process memory 12288 Mbytes
2022-01-08 09:11:30.526 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [CACHE] LOG:  set data cache  size(402653184)
2022-01-08 09:11:30.576 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [CACHE] LOG:  set metadata cache  size(134217728)
2022-01-08 09:11:30.612 [unknown] [unknown] localhost 281472877080592 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
2022-01-08 09:11:30.641 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] LOG:  gaussdb: fsync file "/opt/data/gaussdb.state.temp" success
2022-01-08 09:11:30.641 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] LOG:  create gaussdb state file success: db state(STARTING_STATE), server mode(Normal)
2022-01-08 09:11:30.723 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] LOG:  max_safe_fds = 979, usable_fds = 1000, already_open = 11
The core dump path is an invalid directory
2022-01-08 09:11:30.727 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] LOG:  the configure file /opt/install/etc/gscgroup_xwj.cfg doesn't exist or the size of configure file has changed. Please create it by root user!
2022-01-08 09:11:30.727 [unknown] [unknown] localhost 281472877080592 0[0:0#0]  0 [BACKEND] LOG:  Failed to parse cgroup config file.
.
[2022-01-08 09:11:31.764][4179575][][gs_ctl]:  done
[2022-01-08 09:11:31.764][4179575][][gs_ctl]: server started (/opt/data)

停止openGauss:

gs_ctl stop -D /opt/data
[2022-01-08 09:21:01.284][4183642][][gs_ctl]: gs_ctl stopped ,datadir is /opt/data
waiting for server to shut down......... done
server stopped

错误排查

如果启动openGauss或者停止openGauss服务失败,请根据日志文件中的日志信息排查错误,参见日志参考

标签:11,01,unknown,08,09,启停,2022,openGauss
From: https://www.cnblogs.com/renxyz/p/18189156

相关文章

  • openGauss 高危操作一览表
    高危操作一览表各项操作请严格遵守指导书操作,同时避免执行如下高危操作。表1中描述在产品的操作与维护阶段,进行日常操作时应注意的严禁操作。表1禁用操作操作名称操作风险严禁修改数据目录下文件名,权限,内容不能修改,不能删除内容。导致数据库节点实例出现严重错误,......
  • openGauss 监控
    监控因为逻辑复制是基于与物理流复制相似的架构的,一个发布节点上的监控也类似于对物理复制主节点的监控。有关订阅的监控信息在pg_stat_subscription中可以看到。每一个订阅工作者在这个视图都有一行。一个订阅能有零个或者多个活跃订阅工作者取决于它的状态。通常,对于一个已......
  • openGauss 架构
    架构发布者上的更改会在它们发生时实时传送给订阅者。订阅者按照数据在发布者上被提交的顺序应用数据,这样任意单一订阅中的发布的事务一致性才能得到保证。逻辑复制被构建在一种类似于物理流复制的架构上。它由“walsender”和“apply”进程实现。walsender进程开始对WAL的逻辑......
  • openGauss 管理并发写入操作
    管理并发写入操作事务隔离说明写入和读写操作并发写入事务的潜在死锁情况并发写入示例......
  • openGauss 检查时间一致性
    检查时间一致性数据库事务一致性通过逻辑时钟保证,与操作系统时间无关,但是系统时间不一致会导致诸多潜在问题,主要是后台运维和监控功能异常,因此在月度检查时建议检查各个节点的时间一致性。操作步骤以操作系统用户omm登录数据库主节点。创建记录openGauss各节点的配置文件(m......
  • openGauss 检查应用连接数
    检查应用连接数如果应用程序与数据库的连接数超过最大值,则新的连接无法建立。建议每天检查连接数,及时释放空闲的连接或者增加最大连接数。操作步骤以操作系统用户omm登录数据库主节点。使用如下命令连接数据库。gsql-dpostgres-p8000postgres为需要连接的数据库名......
  • openGauss 分析查询效率异常降低的问题
    分析查询效率异常降低的问题问题现象通常在几十毫秒内完成的查询,有时会突然需要几秒的时间完成;而通常需要几秒完成的查询,有时需要半小时才能完成。处理办法通过下列的操作步骤,分析查询效率异常降低的原因。使用analyze命令分析数据库。analyze命令更新所有表中数据大小以......
  • openGauss 分析查询语句运行状态
    分析查询语句运行状态问题现象系统中部分查询语句运行时间过长,需要分析查询语句的运行状态。处理办法以操作系统用户omm登录主机。使用如下命令连接数据库。gsql-dpostgres-p8000postgres为需要连接的数据库名称,8000为端口号。设置参数track_activities为on。......
  • openGauss 分析查询语句是否被阻塞
    分析查询语句是否被阻塞问题现象数据库系统运行时,在某些业务场景下,查询语句会被阻塞,导致语句运行时间过长。原因分析查询语句需要通过加锁来保护其要访问的数据对象。当要进行加锁时发现要访问的数据对象已经被其他会话加锁,则查询语句会被阻塞,等待其他会话完成操作并释放锁资......
  • openGauss 概述
    概述数据备份是保护数据安全的重要手段之一,为了更好的保护数据安全,openGauss数据库支持三种备份恢复类型、多种备份恢复方案,备份和恢复过程中提供数据的可靠性保障机制。备份与恢复类型可分为逻辑备份与恢复、闪回恢复。逻辑备份与恢复:通过逻辑导出对数据进行备份,逻辑备份只......