• 【openGauss】启动异常 [GAUSS-53600] DETAIL: Permissions should be u=rwx (0700).


    报错信息

    [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-mode=off,  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: openEuler
    
    0 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: dbCluster
    
    0 LOG:  [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 58
    
    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
    2023-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 access
    2023-10-25 10:18:37.204 65387afd.1 [unknown] 140590081585088 [unknown] 0 dn_6001 55000  0 [BACKEND] DETAIL:  Permissions should be u=rwx (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 server
    Examine the log output..
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26

    因为数据目录权限与数据库系统要求不一致,导致的报错,数据库实例的数据目录权限应该是700,即仅有所属用户拥有可读可写可执行的权限(请确保所属用户与用户组是初始用户与用户组,即执行 gs_preinstall 时 -U 和 -G 参数指定的

    image.png

    使用ls -l(缩写ll)命令可以查看目录、文件的详细信息包括权限信息、所属用户、用户组等信息

    ll /opt/software/install/data/
    ll /opt/software/install/data/dn/
    
    • 1
    • 2

    image.png

    解决办法

    根据错误信息可以找到当前案例权限有问题的数据目录是:/opt/software/install/data/dn,如果所属用户与用户组不是初始用户使用以下命令进行更改,如果是可跳过

    chown -R omm:dbgrp /opt/software/install
    
    • 1

    确保了所属用户与用户组问题后,将该目录及其子目录、文件的权限全部修改为700即可,执行以下命令实现权限更改

    chmod -R 700 /opt/software/install/data/
    
    • 1

    更改完后在使用查询命令查询当前权限信息,如下所示就可以正常启动数据库了

    ll /opt/software/install/data/
    ll /opt/software/install/data/dn/
    
    • 1
    • 2

    image.png

  • 相关阅读:
    Python之三大基本库——Numpy(1)
    Linux中使用Shell脚本安装jdk
    解析数仓lazyagg查询重写优化
    Redis分布式锁
    Mybatis-Plus入门
    正则匹配语法学习
    Linux下动静态库的制作与使用
    [附源码]java毕业设计渔具店管理系统
    2023年,下班后可以做什么副业?
    花好月圆│以代码寄相思,绘嫦娥之奔月
  • 原文地址:https://blog.csdn.net/qq_37251994/article/details/134029393