opengauss参数设置,opengauss性能闪降
终极管理员 知识笔记 73阅读
报错信息
[GAUSS-53600]: Can not start the database, the cmd is source /home/omm/.bashrc; python3 /opt/software/om/script/local/StartInstance.py -U omm -R /opt/software/install/app -t 300 --security-modeoff, Error:[FAILURE] openEuler:[GAUSS-51607] : Failed to start instance. Error: Please check the gs_ctl log for failure details.[2023-10-25 10:18:36.953][3594][][gs_ctl]: gs_ctl started,datadir is /opt/software/install/data/dn[2023-10-25 10:18:37.155][3594][][gs_ctl]: waiting for server to start....0 LOG: [Alarm Module]can not read GAUSS_WARNING_TYPE env.0 LOG: [Alarm Module]Host Name: openEuler0 LOG: [Alarm Module]Host IP: openEuler. Copy hostname directly in case of taking 10s to use gethostbyname when /etc/hosts does not contain <HOST IP>0 LOG: [Alarm Module]Cluster Name: dbCluster0 LOG: [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 580 WARNING: failed to open feature control file, please check whether it exists: FileNamegaussdb.version, Errno2, ErrmessageNo 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 directory2023-10-25 10:18:37.204 65387afd.1 [unknown] 140590081585088 [unknown] 0 dn_6001 55000 0 [BACKEND] FATAL: data directory /opt/software/install/data/dn has group or world access2023-10-25 10:18:37.204 65387afd.1 [unknown] 140590081585088 [unknown] 0 dn_6001 55000 0 [BACKEND] DETAIL: Permissions should be urwx (0700).[2023-10-25 10:18:38.157][3594][][gs_ctl]: waitpid 3597 failed, exitstatus is 256, ret is 2[2023-10-25 10:18:38.157][3594][][gs_ctl]: stopped waiting[2023-10-25 10:18:38.157][3594][][gs_ctl]: could not start serverExamine the log output..
因为数据目录权限与数据库系统要求不一致导致的报错数据库实例的数据目录权限应该是700即仅有所属用户拥有可读可写可执行的权限请确保所属用户与用户组是初始用户与用户组即执行 gs_preinstall 时 -U 和 -G 参数指定的
使用ls -l缩写ll命令可以查看目录、文件的详细信息包括权限信息、所属用户、用户组等信息

ll /opt/software/install/data/ll /opt/software/install/data/dn/
解决办法 根据错误信息可以找到当前案例权限有问题的数据目录是/opt/software/install/data/dn如果所属用户与用户组不是初始用户使用以下命令进行更改如果是可跳过
chown -R omm:dbgrp /opt/software/install
确保了所属用户与用户组问题后将该目录及目录、文件的权限全部修改为700即可执行以下命令实现权限更改

chmod -R 700 /opt/software/install/data/
更改完后在使用查询命令查询当前权限信息如下所示就可以正常启动数据库了
ll /opt/software/install/data/ll /opt/software/install/data/dn/
标签: