首页 > 系统相关 >centos7.6安装OpenGauss3.1.0安装报错

centos7.6安装OpenGauss3.1.0安装报错

时间:2023-01-08 19:23:07浏览次数:51  
标签:02 01 19 unknown 08 OpenGauss3.1 报错 2023 安装

#!/bin/bash


mkdir -p /bak && mv /etc/yum.repos.d/CentOS-* /bak

#挂载本地磁盘到/mnt目录
mount /dev/sr0 /mnt


yum install -y wget python3 bzip2 bzip2-devel libaio-devel flex bison ncurses-devel glibc-devel patch redhat-lsb-core readline-devel libnsl


wget -O /etc/yum.repos.d/CentosHW.repo https://repo.huaweicloud.com/repository/conf/CentOS-7-reg.repo

systemctl disable firewalld
systemctl stop firewalld

sed -i '/SELINUX=enforcing/ s/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
LANG=en_US.UTF-8 
echo "LANG=en_US.UTF-8" >> /etc/profile
source /etc/profile
echo $LANG
swapoff -a

cat >>/etc/sysctl.conf<<EOF
net.ipv4.tcp_retries1 = 5
net.ipv4.tcp_syn_retries = 5
net.sctp.path_max_retrans = 10
net.sctp.max_init_retransmits = 10
net.ipv4.tcp_max_tw_buckets = 10000
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_keepalive_time = 30
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_retries2 = 12
net.ipv4.ip_local_reserved_ports = 15400-15407,20050-20057
net.core.wmem_max = 21299200
net.core.rmem_max = 21299200
net.core.wmem_default = 21299200
net.core.rmem_default = 21299200
kernel.sem = 250 6400000 1000 25600
net.ipv4.tcp_rmem = 8192 250000 16777216
net.ipv4.tcp_wmem = 8192 250000 16777216
vm.min_free_kbytes = 201318
net.core.netdev_max_backlog = 65535
net.ipv4.tcp_max_syn_backlog = 65535
net.core.somaxconn = 65535
kernel.shmall = 1152921504606846720
kernel.shmmax = 18446744073709551615
EOF
sysctl -p

echo "* soft stack 3072" >> /etc/security/limits.conf
echo "* hard stack 3072" >> /etc/security/limits.conf
echo "* soft nofile 1000000" >> /etc/security/limits.conf
echo "* hard nofile 1000000" >> /etc/security/limits.conf
echo "* soft nproc unlimited" >> /etc/security/limits.d/90-nproc.conf

echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled

echo 'ifconfig ens33 mtu 8192'  >> /etc/rc.d/rc.local
echo 'swapoff -a' >> /etc/rc/d/rc.local

echo 'echo never > /sys/kernel/mm/transparent_hugepage/defrag' >> /etc/rc.d/rc.local
echo 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' >> /etc/rc.d/rc.local
chmod +x /etc/rc.d/rc.local
/usr/bin/sh /etc/rc.d/rc.local

ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

#创建目录和用户
mkdir -p /opt/software/openGauss
chmod 755 -R /opt/software


groupadd dbgrp 
useradd -g dbgrp omm
echo omm | passwd --stdin omm

cd /root
tar -zxvf openGauss-3.1.0-CentOS-64bit-all.tar.gz -C /opt/software/openGauss/
cd /opt/software/openGauss/
tar -zxvf openGauss-3.1.0-CentOS-64bit-om.tar.gz

chmod -R 777 /opt/software/openGauss


cat>>/opt/software/open.xml<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
    <!-- openGauss整体信息 -->
    <CLUSTER>
        <!-- 数据库名称 -->
        <PARAM name="clusterName" value="dbCluster" />
        <!-- 数据库节点名称(hostname) -->
        <PARAM name="nodeNames" value="master01" />
        <!-- 数据库安装目录-->
        <PARAM name="gaussdbAppPath" value="/opt/software/install/app" />
        <!-- 日志目录-->
        <PARAM name="gaussdbLogPath" value="/opt/software/log/omm" />
        <!-- 临时文件目录-->
        <PARAM name="tmpMppdbPath" value="/opt/software/tmp" />
        <!-- 数据库工具目录-->
        <PARAM name="gaussdbToolPath" value="/opt/software/om" />
        <!-- 数据库core文件目录-->
        <PARAM name="corePath" value="/opt/software/corefile" />
        <!-- 节点IP,与数据库节点名称列表一一对应 -->
        <PARAM name="backIp1s" value="192.168.1.24"/> 
    </CLUSTER>
    <!-- 每台服务器上的节点部署信息 -->
    <DEVICELIST>
        <!-- 节点1上的部署信息 -->
        <DEVICE sn="master01">
            <!-- 节点1的主机名称 -->
            <PARAM name="name" value="master01"/>
            <!-- 节点1所在的AZ及AZ优先级 -->
            <PARAM name="azName" value="AZ1"/>
            <PARAM name="azPriority" value="1"/>
            <!-- 节点1的IP,如果服务器只有一个网卡可用,将backIP1和sshIP1配置成同一个IP -->
            <PARAM name="backIp1" value="192.168.1.24"/>
            <PARAM name="sshIp1" value="192.168.1.24"/>
               
    <!--dbnode-->
    <PARAM name="dataNum" value="1"/>
    <PARAM name="dataPortBase" value="15400"/>
    <PARAM name="dataNode1" value="/opt/software/install/data/dn"/>
            <PARAM name="dataNode1_syncNum" value="0"/>
        </DEVICE>
    </DEVICELIST>
</ROOT>
EOF

cat >>~/.bash_profile<<'EOF'
export PATH=$PATH:/opt/software/openGauss/script/
EOF

cd /opt/software/openGauss/script
/opt/software/openGauss/script/gs_preinstall -U omm -G dbgrp -X /opt/software/open.xml

/opt/software/openGauss/script/gs_checkos -i A -h master01 --detail

su - omm -c \
"cat >>~/.bash_profile<<'EOF'
export PATH=\$PATH:/opt/software/om/script/
EOF"

##########################################################################

su - omm
/opt/software/om/script/gs_install -X /opt/software/open.xml

 安装OpenGauss3.1.0报错

[omm@master01 ~]$ gs_install -X /opt/software/open.xml
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.
Please enter password for database:
Please repeat for database:
begin to create CA cert files
The sslcert will be generated in /opt/software/install/app/share/sslcert/om
NO cm_server instance, no need to create CA for CM.
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.
Using omm:dbgrp to install database.
Using installation program path : /opt/software/install/app_4e931f9a
$GAUSSHOME points to /opt/software/install/app_4e931f9a, no need to create symbolic link.
Traceback (most recent call last):
  File "/opt/software/om/script/local/Install.py", line 763, in <module>
    functionDict[g_opts.action]()
  File "/opt/software/om/script/local/Install.py", line 694, in startCluster
    dn.start(self.time_out)
  File "/opt/software/om/script/local/../gspylib/component/Kernel/Kernel.py", line 106, in start
    "failure details." + "\n" + output)
Exception: [GAUSS-51607] : Failed to start instance. Error: Please check the gs_ctl log for failure details.
[2023-01-08 19:02:45.552][12958][][gs_ctl]: gs_ctl started,datadir is /opt/software/install/data/dn
[2023-01-08 19:02:45.628][12958][][gs_ctl]: waiting for server to start...
.0 LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.

0 LOG:  [Alarm Module]Host Name: master01

0 LOG:  [Alarm Module]Host IP: master01. 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: 57

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.
2023-01-08 19:02:45.786 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 DB010  0 [REDO] LOG:  Recovery parallelism, cpu count = 2, max = 4, actual = 2
2023-01-08 19:02:45.786 63baa2d5.1 [unknown] 140188304712832 [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.2023-01-08 19:02:45.795 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 00000  0 [BACKEND] LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.

2023-01-08 19:02:45.795 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 00000  0 [BACKEND] LOG:  [Alarm Module]Host Name: master01

2023-01-08 19:02:45.795 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 00000  0 [BACKEND] LOG:  [Alarm Module]Host IP: master01. Copy hostname directly in case of taking 10s to use 'gethostbyname' when /etc/hosts does not contain <HOST IP>

2023-01-08 19:02:45.795 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 00000  0 [BACKEND] LOG:  [Alarm Module]Cluster Name: dbCluster

2023-01-08 19:02:45.795 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 00000  0 [BACKEND] LOG:  [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 57

2023-01-08 19:02:45.798 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 00000  0 [BACKEND] LOG:  loaded library "security_plugin"
2023-01-08 19:02:45.800 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 01000  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2023-01-08 19:02:45.800 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 01000  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2023-01-08 19:02:45.804 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 00000  0 [BACKEND] LOG:  InitNuma numaNodeNum: 1 numa_distribute_mode: none inheritThreadPool: 0.
2023-01-08 19:02:45.804 63baa2d5.1 [unknown] 140188304712832 [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 (3608 Mbytes) is larger.
2023-01-08 19:02:45.804 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 42809  0 [BACKEND] FATAL:  could not create shared memory segment: Cannot allocate memory
2023-01-08 19:02:45.804 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 42809  0 [BACKEND] DETAIL:  Failed system call was shmget(key=15400001, size=3784296776, 03600).
2023-01-08 19:02:45.804 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 42809  0 [BACKEND] HINT:  This error usually means that openGauss'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 3784296776 bytes), reduce openGauss's shared memory usage, perhaps by reducing shared_buffers.
        The openGauss documentation contains more information about shared memory configuration.
2023-01-08 19:02:45.815 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 00000  0 [BACKEND] LOG:  FiniNuma allocIndex: 0.
[2023-01-08 19:02:46.630][12958][][gs_ctl]: waitpid 12961 failed, exitstatus is 256, ret is 2

[2023-01-08 19:02:46.630][12958][][gs_ctl]: stopped waiting
[2023-01-08 19:02:46.630][12958][][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.
[2023-01-08 19:02:45.552][12958][][gs_ctl]: gs_ctl started,datadir is /opt/software/install/data/dn
[2023-01-08 19:02:45.628][12958][][gs_ctl]: waiting for server to start...
.0 LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.

0 LOG:  [Alarm Module]Host Name: master01

0 LOG:  [Alarm Module]Host IP: master01. 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: 57

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.
2023-01-08 19:02:45.786 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 DB010  0 [REDO] LOG:  Recovery parallelism, cpu count = 2, max = 4, actual = 2
2023-01-08 19:02:45.786 63baa2d5.1 [unknown] 140188304712832 [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.2023-01-08 19:02:45.795 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 00000  0 [BACKEND] LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.

2023-01-08 19:02:45.795 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 00000  0 [BACKEND] LOG:  [Alarm Module]Host Name: master01

2023-01-08 19:02:45.795 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 00000  0 [BACKEND] LOG:  [Alarm Module]Host IP: master01. Copy hostname directly in case of taking 10s to use 'gethostbyname' when /etc/hosts does not contain <HOST IP>

2023-01-08 19:02:45.795 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 00000  0 [BACKEND] LOG:  [Alarm Module]Cluster Name: dbCluster

2023-01-08 19:02:45.795 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 00000  0 [BACKEND] LOG:  [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 57

2023-01-08 19:02:45.798 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 00000  0 [BACKEND] LOG:  loaded library "security_plugin"
2023-01-08 19:02:45.800 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 01000  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2023-01-08 19:02:45.800 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 01000  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2023-01-08 19:02:45.804 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 00000  0 [BACKEND] LOG:  InitNuma numaNodeNum: 1 numa_distribute_mode: none inheritThreadPool: 0.
2023-01-08 19:02:45.804 63baa2d5.1 [unknown] 140188304712832 [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 (3608 Mbytes) is larger.
2023-01-08 19:02:45.804 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 42809  0 [BACKEND] FATAL:  could not create shared memory segment: Cannot allocate memory
2023-01-08 19:02:45.804 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 42809  0 [BACKEND] DETAIL:  Failed system call was shmget(key=15400001, size=3784296776, 03600).
2023-01-08 19:02:45.804 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 42809  0 [BACKEND] HINT:  This error usually means that openGauss'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 3784296776 bytes), reduce openGauss's shared memory usage, perhaps by reducing shared_buffers.
        The openGauss documentation contains more information about shared memory configuration.
2023-01-08 19:02:45.815 63baa2d5.1 [unknown] 140188304712832 [unknown] 0 dn_6001 00000  0 [BACKEND] LOG:  FiniNuma allocIndex: 0.
[2023-01-08 19:02:46.630][12958][][gs_ctl]: waitpid 12961 failed, exitstatus is 256, ret is 2

[2023-01-08 19:02:46.630][12958][][gs_ctl]: stopped waiting
[2023-01-08 19:02:46.630][12958][][gs_ctl]: could not start server
Examine the log output.

  

标签:02,01,19,unknown,08,OpenGauss3.1,报错,2023,安装
From: https://www.cnblogs.com/vmsysjack/p/17035140.html

相关文章

  • MySQL8免安装版下载安装与配置(linux)
    一、前言基于Linux平台的MySQL安装文件有三个版本,分别是RPM软件、GenericBinaries软件包、源码包,具体介绍如下:①RPM软件包是一种Linux平台下的安装文件,通过相关命令可以......
  • 离线安装Python包
    起因需要在一台联网的计算机和一台不联网的计算机上安装Python包。pygame在线安装失败在CMD命令行运行下列命令安装pygame:python-mpipinstall--userpygame......
  • P3_注册小程序账号&安装开发者工具
    注册小程序账号点击注册按钮使用浏览器打开 https://mp.weixin.qq.com/网址,点击右上角的“立即注册”即可进入到小程序开发账号的注册流程,主要流程截图如下:选择注册......
  • 安装谷歌浏览器WebDriver
    安装谷歌浏览器WebDriver​ WebDriver是一个W3C规范,用于定义控制浏览器的API;只要某款浏览器实现了WebDriverAPI,就可以使用Selenium控制这款浏览器;所以安装WebDri......
  • 数据库在执行全库恢复后,open时报错ORA-01113、ORA-01110 ORA-00312 ORA-01113
    问题描述:数据库在执行全库恢复后,open时报错ORA-01113、ORA-01110ORA-00312ORA-01113系统:Anolis7.9数据库:oracle11.2.0.41、问题描述数据库在执行全库恢复后,open时报错OR......
  • Mysql安装和卸载(压缩包)
    安装流程命令概览//Createthedefaultdatabaseandexit.Createasuperuserwithemptypassword.mysqld--initialize-insecure//Installthedefaultservi......
  • 关闭mdn提示框-修改字体大小-设置默认浏览器-安装插件报错
    关闭vscode的MDN提示框参考链接关闭步骤:点击设置按钮(编辑器左下角小齿轮)这个提示位于:设置→输入editor.hover→Editor>Hover:Enabled(取消勾选),关闭即可vsco......
  • CentOS Stream 8 离线安装ansible 4.2.0
    首先在一个Online的CentOSStream8上把需要的安装包下载下来,然后再拷贝到离线的主机上进行安装。下载工具推荐用pythonpip来下载,这样在安装的时候也用pip来安装就很......
  • Dev-Cpp下载与安装 [ 图文教程 ]
    版权声明©本文作者:main工作室本文链接:https://www.cnblogs.com/main-studio/p/16937530.html版权声明:本文为博客园博主「main工作室」的原创文章,遵循署名-非商业性......
  • 安装gi时磁盘不显示
    问题描述:安装gi时磁盘不显示.系统:rhel8.6说明:今天遇到一同学安装gi到达第2步时,磁盘信息总是不显示,如下所示:1、异常重现说明:即使更换路径/dev/oracleasm/disks/*,磁盘信息依......