暂无图片
暂无图片
1
暂无图片
暂无图片
暂无图片

MogDB报错(安装) - the configure file gscgroup_omm.cfg doesn't exist

原创 伊织鸟 2022-02-15
3240

本文旨在记录该错误及对应的解决办法

数据库版本:MogDB 2.0.1
系统版本:Kylin V10 sp2 X86_64

现象:

数据库预安装一切正常,在初始化数据时报错:

/appdata/mogdb/script/gs_install \ -X /appdata/mogdb/clusterconfig.xml \ -l /home/omm/gs_install.log \ --gsinit-parameter="--encoding=UTF8" \ --gsinit-parameter="--locale=en_US.UTF8" \ --gsinit-parameter="--lc-collate=en_US.UTF8" \ --gsinit-parameter="--lc-ctype=en_US.UTF8" \ --gsinit-parameter="--lc-messages=en_US.UTF8" \ --gsinit-parameter="--dbcompatibility=PG" \ --gsinit-parameter="--pwpasswd=MogDB@1234"

出现报错信息如下:

2022-02-14 16:21:06.079 620a10f1.1 [unknown] 140653119207168 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: the configure file /dbdata/app/mogdb/etc/gscgroup_omm.cfg doesn't exist or the size of configure file has changed. Please create it by root user! 2022-02-14 16:21:06.079 620a10f1.1 [unknown] 140653119207168 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: Failed to parse cgroup config file. .[2022-02-14 16:21:12.116][865732][][gs_ctl]: gaussDB state is Coredump [2022-02-14 16:21:12.116][865732][][gs_ctl]: stopped waiting [2022-02-14 16:21:12.116][865732][][gs_ctl]: could not start server

排查:

检查了clusterconfig.xml,文件目录等,无明显报错,怀疑数据文件没有清理干净,使用如下命令进行数据清理:

su - omm gs_uninstall --delete-data su - root /appdata/mogdb/script/gs_postuninstall -U omm -X /appdata/mogdb/clusterconfig.xml --delete-user

重新安装:

##重建用户 groupadd dbgrp -g 2000 useradd omm -g 2000 -u 2000 passwd omm MogDB@1234 ##重建必要目录 mkdir -p /dbdata/arch mkdir -p /dbdata/tbl mkdir -p /dbdata/dbback chown -R omm: {/dbdata/tbl,/dbdata/arch,/dbdata/dbback} chmod 700 {/dbdata/tbl,/dbdata/arch,/dbdata/dbback} ##预安装 cd /appdata/mogdb/script export LD_LIBRARY_PATH=/appdata/mogdb/script/gspylib/clib:$LD_LIBRARY_PATH /appdata/mogdb/script/gs_preinstall -U omm -G dbgrp -X /appdata/mogdb/clusterconfig.xml ##初始化数据库 chmod -R 755 /appdata/mogdb/script chown -R omm: /appdata/mogdb/script su - omm /appdata/mogdb/script/gs_install \ -X /appdata/mogdb/clusterconfig.xml \ -l /home/omm/gs_install.log \ --gsinit-parameter="--encoding=UTF8" \ --gsinit-parameter="--locale=en_US.UTF8" \ --gsinit-parameter="--lc-collate=en_US.UTF8" \ --gsinit-parameter="--lc-ctype=en_US.UTF8" \ --gsinit-parameter="--lc-messages=en_US.UTF8" \ --gsinit-parameter="--dbcompatibility=PG" \ --gsinit-parameter="--pwpasswd=MogDB@1234"

发现依然报错,在尝试多种方法仍处理无果后,找大佬排查,发现数据库已经安装完毕了,但是由于系统缺少rdpscp指令集,导致数据库无法正常启动。

root@DB mogdb]# lscpu 架构: x86_64 CPU 运行模式: 32-bit, 64-bit 字节序: Little Endian Address sizes: 40 bits physical, 48 bits virtual CPU: 8 在线 CPU 列表: 0-7 每个核的线程数: 1 每个座的核数: 1 座: 8 NUMA 节点: 1 厂商 ID: GenuineIntel CPU 系列: 6 型号: 6 型号名称: QEMU Virtual CPU 步进: 3 CPU MHz: 2294.612 BogoMIPS: 4589.22 超管理器厂商: KVM 虚拟化类型: 完全 L1d 缓存: 256 KiB L1i 缓存: 256 KiB L2 缓存: 32 MiB L3 缓存: 128 MiB NUMA 节点0 CPU: 0-7 Vulnerability Itlb multihit: KVM: Vulnerable Vulnerability L1tf: Mitigation; PTE Inversion Vulnerability Mds: Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown Vulnerability Meltdown: Vulnerable Vulnerability Spec store bypass: Vulnerable Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Vulnerable, STIBP: disabled Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected 标记: fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl xtopology cpuid tsc_known_freq pni cx 16 x2apic hypervisor lahf_lm cpuid_fault

解决方案:

找用户说明后,用户补丁安装rdpscp指令集后,问题消失

[root@DB mogdb]# lscpu 架构: x86_64 CPU 运行模式: 32-bit, 64-bit 字节序: Little Endian Address sizes: 40 bits physical, 48 bits virtual CPU: 8 在线 CPU 列表: 0-7 每个核的线程数: 1 每个座的核数: 1 座: 8 NUMA 节点: 1 厂商 ID: GenuineIntel CPU 系列: 6 型号: 42 型号名称: Intel Xeon E312xx (Sandy Bridge) 步进: 1 CPU MHz: 2294.612 BogoMIPS: 4589.22 超管理器厂商: KVM 虚拟化类型: 完全 L1d 缓存: 256 KiB L1i 缓存: 256 KiB L2 缓存: 32 MiB L3 缓存: 128 MiB NUMA 节点0 CPU: 0-7 Vulnerability Itlb multihit: KVM: Vulnerable Vulnerability L1tf: Mitigation; PTE Inversion Vulnerability Mds: Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown Vulnerability Meltdown: Vulnerable Vulnerability Spec store bypass: Vulnerable Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Vulnerable, STIBP: disabled Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected 标记: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic popcnt tsc_de adline_timer aes xsave avx hypervisor lahf_lm cpuid_fault xsaveopt arat [omm@DB mogdb]$ gs_om -t restart Stopping cluster. ========================================= Successfully stopped cluster. ========================================= End stop cluster. Starting cluster. ========================================= [SUCCESS] DB 2022-02-15 14:14:30.263 [unknown] [unknown] localhost 139799309694720 0 0 [BACKEND] WARNING: could not create any HA TCP/IP sockets 2022-02-15 14:14:30.264 [unknown] [unknown] localhost 139799309694720 0 0 [BACKEND] WARNING: Failed to initialize the memory protect for g_instance.attr.attr_storage.cstore_buffers (16 Mbytes) or shared memory (7888 Mbytes) is larger. ========================================= Successfully started.

结论:

认识一个大佬是非常重要得~~

完整报错:

[omm@DB ~]$ /appdata/mogdb/script/gs_install \ > -X /appdata/mogdb/clusterconfig.xml \ > -l /home/omm/gs_install.log \ > --gsinit-parameter="--encoding=UTF8" \ > --gsinit-parameter="--locale=en_US.UTF8" \ > --gsinit-parameter="--lc-collate=en_US.UTF8" \ > --gsinit-parameter="--lc-ctype=en_US.UTF8" \ > --gsinit-parameter="--lc-messages=en_US.UTF8" \ > --gsinit-parameter="--dbcompatibility=PG" \ > --gsinit-parameter="--pwpasswd=MogDB@1234" Parsing the configuration file. Check preinstall on every node. Successfully checked preinstall on every node. Creating the backup directory. Successfully created the backup directory. begin deploy.. Installing the cluster. begin prepare Install Cluster.. Checking the installation environment on all nodes. begin install Cluster.. Installing applications on all nodes. Successfully installed APP. begin init Instance.. encrypt cipher and rand files for database. begin to create CA cert files The sslcert will be generated in /dbdata/app/mogdb/share/sslcert/om 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 '/dbdata/app/tools/script/local/Install.py' -t start_cluster -U omm:dbgrp -X /appdata/mogdb/clusterconfig.xml -R /dbdata/app/mogdb -c dbCluster -l /home/omm/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 : /dbdata/app/mogdb_f892ccb7 $GAUSSHOME points to /dbdata/app/mogdb_f892ccb7, no need to create symbolic link. Traceback (most recent call last): File "/dbdata/app/tools/script/local/Install.py", line 680, in <module> functionDict[g_opts.action]() File "/dbdata/app/tools/script/local/Install.py", line 611, in startCluster dn.start(self.time_out) File "/dbdata/app/tools/script/local/../gspylib/component/Kernel/Kernel.py", line 107, in start "failure details." + "\n" + output) Exception: [GAUSS-51607] : Failed to start instance. Error: Please check the gs_ctl log for failure details. [2022-02-15 10:13:30.396][1001222][][gs_ctl]: gs_ctl started,datadir is /dbdata/data [2022-02-15 10:13:30.457][1001222][][gs_ctl]: waiting for server to start... .0 LOG: [Alarm Module]can not read GAUSS_WARNING_TYPE env. 0 LOG: [Alarm Module]Host Name: DB 0 LOG: [Alarm Module]Host IP: 110.128.164.17 0 LOG: [Alarm Module]Cluster Name: dbCluster 0 LOG: [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 52 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. 0 WARNING: bbox_dump_path is set to /dbdata/corefile/ 2022-02-15 10:13:30.582 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 DB010 0 [REDO] LOG: Recovery parallelism, cpu count = 8, max = 4, actual = 4 2022-02-15 10:13:30.582 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 DB010 0 [REDO] LOG: ConfigRecoveryParallelism, true_max_recovery_parallelism:4, max_recovery_parallelism:4 gaussdb.state does not exist, and skipt setting since it is optional.2022-02-15 10:13:30.582 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: [Alarm Module]can not read GAUSS_WARNING_TYPE env. 2022-02-15 10:13:30.582 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: [Alarm Module]Host Name: DB 2022-02-15 10:13:30.582 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: [Alarm Module]Host IP: 110.128.164.17 2022-02-15 10:13:30.582 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: [Alarm Module]Cluster Name: dbCluster 2022-02-15 10:13:30.582 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 52 2022-02-15 10:13:30.582 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: Transparent encryption disabled. 2022-02-15 10:13:30.585 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: loaded library "security_plugin" 2022-02-15 10:13:30.586 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 01000 0 [BACKEND] WARNING: could not create any HA TCP/IP sockets 2022-02-15 10:13:30.588 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: InitNuma numaNodeNum: 1 numa_distribute_mode: none inheritThreadPool: 0. 2022-02-15 10:13:30.588 620b0c4a.1 [unknown] 140246603339520 [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 (4250 Mbytes) is larger. 2022-02-15 10:13:30.588 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: choose next key because the shm of key 51000001 is not one of mine 2022-02-15 10:13:30.918 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [CACHE] LOG: set data cache size(805306368) 2022-02-15 10:13:30.961 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [CACHE] LOG: set metadata cache size(268435456) 2022-02-15 10:13:31.404 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: mogdb: fsync file "/dbdata/data/gaussdb.state.temp" success 2022-02-15 10:13:31.405 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: create gaussdb state file success: db state(STARTING_STATE), server mode(Normal) 2022-02-15 10:13:31.467 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: max_safe_fds = 979, usable_fds = 1000, already_open = 11 bbox_dump_path is set to /dbdata/corefile/ 2022-02-15 10:13:31.469 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: user configure file is not found, it will be created. 2022-02-15 10:13:31.475 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: the configure file /dbdata/app/mogdb/etc/gscgroup_omm.cfg doesn't exist or the size of configure file has changed. Please create it by root user! 2022-02-15 10:13:31.475 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: Failed to parse cgroup config file. .[2022-02-15 10:13:37.512][1001222][][gs_ctl]: gaussDB state is Coredump [2022-02-15 10:13:37.512][1001222][][gs_ctl]: stopped waiting [2022-02-15 10:13:37.512][1001222][][gs_ctl]: could not start server Examine the log output. [GAUSS-51607] : Failed to start instance. Error: Please check the gs_ctl log for failure details. [2022-02-15 10:13:30.396][1001222][][gs_ctl]: gs_ctl started,datadir is /dbdata/data [2022-02-15 10:13:30.457][1001222][][gs_ctl]: waiting for server to start... .0 LOG: [Alarm Module]can not read GAUSS_WARNING_TYPE env. 0 LOG: [Alarm Module]Host Name: DB 0 LOG: [Alarm Module]Host IP: 110.128.164.17 0 LOG: [Alarm Module]Cluster Name: dbCluster 0 LOG: [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 52 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. 0 WARNING: bbox_dump_path is set to /dbdata/corefile/ 2022-02-15 10:13:30.582 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 DB010 0 [REDO] LOG: Recovery parallelism, cpu count = 8, max = 4, actual = 4 2022-02-15 10:13:30.582 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 DB010 0 [REDO] LOG: ConfigRecoveryParallelism, true_max_recovery_parallelism:4, max_recovery_parallelism:4 gaussdb.state does not exist, and skipt setting since it is optional.2022-02-15 10:13:30.582 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: [Alarm Module]can not read GAUSS_WARNING_TYPE env. 2022-02-15 10:13:30.582 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: [Alarm Module]Host Name: DB 2022-02-15 10:13:30.582 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: [Alarm Module]Host IP: 110.128.164.17 2022-02-15 10:13:30.582 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: [Alarm Module]Cluster Name: dbCluster 2022-02-15 10:13:30.582 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 52 2022-02-15 10:13:30.582 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: Transparent encryption disabled. 2022-02-15 10:13:30.585 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: loaded library "security_plugin" 2022-02-15 10:13:30.586 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 01000 0 [BACKEND] WARNING: could not create any HA TCP/IP sockets 2022-02-15 10:13:30.588 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: InitNuma numaNodeNum: 1 numa_distribute_mode: none inheritThreadPool: 0. 2022-02-15 10:13:30.588 620b0c4a.1 [unknown] 140246603339520 [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 (4250 Mbytes) is larger. 2022-02-15 10:13:30.588 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: choose next key because the shm of key 51000001 is not one of mine 2022-02-15 10:13:30.918 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [CACHE] LOG: set data cache size(805306368) 2022-02-15 10:13:30.961 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [CACHE] LOG: set metadata cache size(268435456) 2022-02-15 10:13:31.404 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: mogdb: fsync file "/dbdata/data/gaussdb.state.temp" success 2022-02-15 10:13:31.405 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: create gaussdb state file success: db state(STARTING_STATE), server mode(Normal) 2022-02-15 10:13:31.467 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: max_safe_fds = 979, usable_fds = 1000, already_open = 11 bbox_dump_path is set to /dbdata/corefile/ 2022-02-15 10:13:31.469 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: user configure file is not found, it will be created. 2022-02-15 10:13:31.475 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: the configure file /dbdata/app/mogdb/etc/gscgroup_omm.cfg doesn't exist or the size of configure file has changed. Please create it by root user! 2022-02-15 10:13:31.475 620b0c4a.1 [unknown] 140246603339520 [unknown] 0 dn_6001 00000 0 [BACKEND] LOG: Failed to parse cgroup config file. .[2022-02-15 10:13:37.512][1001222][][gs_ctl]: gaussDB state is Coredump [2022-02-15 10:13:37.512][1001222][][gs_ctl]: stopped waiting [2022-02-15 10:13:37.512][1001222][][gs_ctl]: could not start server Examine the log output.
最后修改时间:2022-03-08 16:32:26
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论