暂无图片
暂无图片
2
暂无图片
暂无图片
暂无图片

GAUSS-51607 错误解决办法

原创 JiekeXu 2020-07-12
7660

描述信息 : “[GAUSS-51607] : Failed to start instance. Error: Please check the gs_ctl log for failure details.”
错误原因:内存不足,需修改 pg 内存。
解决办法:1.检查网络连接是否正常;2.检查配置文件是否正确;3.修改 postgres.conf 文件里的shared_buffers,

如下:

Cluster installation is completed.
Configuring.
Deleting instances from all nodes.
Successfully deleted instances from all nodes.
Checking node configuration on all nodes.
Initializing instances on all nodes.
Updating instance configuration on all nodes.
Check consistence of memCheck and coresCheck on database nodes.
Configuring pg_hba on all nodes.
Configuration is completed.
[GAUSS-51400] : Failed to execute the command: source /home/omm/.bashrc;python3 '/opt/gaussdb/install/om/script/local/Install.py' -t start_cluster -U omm:dbgrp -X /opt/openGauss/clusterconfig.xml -R /opt/gaussdb/install/app -c opengauss -l /var/log/omm/omm/om/gs_local.log  --alarm=/opt/huawei/snas/bin/snas_cm_cmd  --time_out=300 .Error:
Using omm:dbgrp to install database.
Using installation program path : /opt/gaussdb/install/app_0bd0ce80
$GAUSSHOME points to /opt/gaussdb/install/app_0bd0ce80, no need to create symbolic link.
Traceback (most recent call last):
  File "/opt/gaussdb/install/om/script/local/Install.py", line 645, in <module>
    functionDict[g_opts.action]()
  File "/opt/gaussdb/install/om/script/local/Install.py", line 588, in startCluster
    dn.start(self.time_out)
  File "/opt/gaussdb/install/om/script/local/../gspylib/component/Kernel/Kernel.py", line 87, in start
    + " Error: Please check the gs_ctl log for "
Exception: [GAUSS-51607] : Failed to start instance. Error: Please check the gs_ctl log for failure details.

[GAUSS-51607] : Failed to start instance. Error: Please check the gs_ctl log for failure details.

[omm@openGauss ~]$ gs_om -t start 
Starting cluster.
\=========================================
[GAUSS-53600]: Can not start the database, the cmd is source /home/omm/.bashrc; python3 '/opt/gaussdb/install/om/script/local/StartInstance.py' -U omm -R /opt/gaussdb/install/app -t 300 --security-mode=off,  Error:
[FAILURE] openGauss:
[GAUSS-51607] : Failed to start instance. Error: Please check the gs_ctl log for failure details..

----使用 gs_ctl 指定目录直接启动便可以查看详细日志了

[omm@openGauss ~]$ gs_ctl start -D /opt/gaussdb/install/data/db1
[2020-07-12 00:16:01.408][65296][][gs_ctl]: gs_ctl started,datadir is -D "/opt/gaussdb/install/data/db1"  
[2020-07-12 00:16:01.535][65296][][gs_ctl]: waiting for server to start...
.0 [BACKEND] LOG:  Begin to start openGauss Database.
2020-07-12 00:16:01.850 5f09e5c1.1 [unknown] 140308361469696 [unknown] 0 dn_6001 DB001 0 [REDO] LOG:  Recovery parallelism, cpu count = 4, max = 4, actual = 4
2020-07-12 00:16:01.850 5f09e5c1.1 [unknown] 140308361469696 [unknown] 0 dn_6001 DB001 0 [REDO] LOG:  ConfigRecoveryParallelism, true_max_recovery_parallelism:4, max_recovery_parallelism:4
2020-07-12 00:16:01.850 5f09e5c1.1 [unknown] 140308361469696 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG:  gaussdb.state does not exist, and skipt setting since it is optional.
2020-07-12 00:16:01.850 5f09e5c1.1 [unknown] 140308361469696 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG:  Transparent encryption disabled.
2020-07-12 00:16:01.890 5f09e5c1.1 [unknown] 140308361469696 [unknown] 0 dn_6001 01000 0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2020-07-12 00:16:01.898 5f09e5c1.1 [unknown] 140308361469696 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG:  InitNuma numaNodeNum: 1 numa_distribute_mode: none inheritThreadPool: 0.
2020-07-12 00:16:01.899 5f09e5c1.1 [unknown] 140308361469696 [unknown] 0 dn_6001 01000 0 [BACKEND] WARNING:  Failed to initialize the memory protect for g_instance.attr.attr_storage.cstore_buffers (1024 Mbytes) or shared memory (4213 Mbytes) is larger.
2020-07-12 00:16:01.899 5f09e5c1.1 [unknown] 140308361469696 [unknown] 0 dn_6001 42809 0 [BACKEND] FATAL:  could not create shared memory segment: Cannot allocate memory
2020-07-12 00:16:01.899 5f09e5c1.1 [unknown] 140308361469696 [unknown] 0 dn_6001 42809 0 [BACKEND] DETAIL:  Failed system call was shmget(key=26000001, size=4418076672, 03600).
2020-07-12 00:16:01.899 5f09e5c1.1 [unknown] 140308361469696 [unknown] 0 dn_6001 42809 0 [BACKEND] HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or swap space, or exceeded your kernel's SHMALL parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMALL.  To reduce the request size (currently 4418076672 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers.
        The PostgreSQL documentation contains more information about shared memory configuration.
2020-07-12 00:16:01.916 5f09e5c1.1 [unknown] 140308361469696 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG:  FiniNuma allocIndex: 0.
[2020-07-12 00:16:02.537][65296][][gs_ctl]:  waitpid 65306 failed, exitstatus is 256, ret is 2

[2020-07-12 00:16:02.538][65296][][gs_ctl]: stopped waiting
[2020-07-12 00:16:02.538][65296][][gs_ctl]: could not start server
[2020-07-12 00:16:02.538][65296][][gs_ctl]: Examine the log output.

如下参数初始化失败

WARNING: Failed to initialize the memory protect for g_instance.attr.attr_storage.cstore_buffers (1024 Mbytes) or shared memory (4213 Mbytes) is larger.

解决办法:
修改 pg 参数文件 postgres.conf 文件里的 shared_buffers 为原来的四分之一。

[root@openGauss db1]# more postgresql.conf | grep shared
# Note:  Increasing max_connections costs ~400 bytes of shared memory per
shared_buffers = 256MB                  # min 128kB
bulk_write_ring_size = 2GB              # for bulkload, max shared_buffers
#standby_shared_buffers_fraction = 0.3 #control shared buffers use in standby, 0.1-1.0
# Note:  Increasing max_prepared_transactions costs ~600 bytes of shared memory
#shared_preload_libraries = ''          # (change requires restart)
#wal_buffers = 16MB                     # min 32kB, -1 sets based on shared_buffers
# Note:  Each lock table slot uses ~270 bytes of shared memory, and there are
[root@openGauss db1]# pwd
/opt/gaussdb/install/data/db1
[root@openGauss db1]# free -m
              total        used        free      shared  buff/cache   available
Mem:           3771        1427        1220         585        1123        1124
Swap:             0           0           0

image.png

参考链接:
https://gitee.com/opengauss/docs/issues/I1MYXJ

最后修改时间:2020-07-12 10:44:41
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论