2022-07-05
opengauss安装报错:The program "gaussdb" is needed by gs_initdb but was not found in the same directory as
10MVirtualBox Centos7.6 安装openGauss单节点,安装失败报错
opengauss xml安装配置文件
[omm@db1 script]$ cat clusterconfig.xml
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
<!-- openGauss整体信息 -->
<CLUSTER>
<!-- 数据库名称 -->
<PARAM name="clusterName" value="pgdb" />
<!-- 数据库节点名称(hostname) -->
<PARAM name="nodeNames" value="db1" />
<!-- 数据库安装目录-->
<PARAM name="gaussdbAppPath" value="/data/huawei/install/app" />
<!-- 日志目录-->
<PARAM name="gaussdbLogPath" value="/data/huawei/log/omm" />
<!-- 临时文件目录-->
<PARAM name="tmpMppdbPath" value="/data/huawei/tmp" />
<!-- 数据库工具目录-->
<PARAM name="gaussdbToolPath" value="/data/huawei/install/om" />
<!-- 数据库core文件目录-->
<PARAM name="corePath" value="/data/huawei/corefile" />
<!-- 节点IP,与数据库节点名称列表一一对应 -->
<PARAM name="backIp1s" value="1.1.1.21"/>
</CLUSTER>
<!-- 每台服务器上的节点部署信息 -->
<DEVICELIST>
<!-- 节点1上的部署信息 -->
<DEVICE sn="db1">
<!-- 节点1的主机名称 -->
<PARAM name="name" value="db1"/>
<!-- 节点1所在的AZ及AZ优先级 -->
<PARAM name="azName" value="AZ1"/>
<PARAM name="azPriority" value="1"/>
<!-- 节点1的IP,如果服务器只有一个网卡可用,将backIP1和sshIP1配置成同一个IP -->
<PARAM name="backIp1" value="1.1.1.21"/>
<PARAM name="sshIp1" value="1.1.1.21"/>
<!--dbnode-->
<PARAM name="dataNum" value="1"/>
<PARAM name="dataPortBase" value="26000"/>
<PARAM name="dataNode1" value="/data/huawei/install/data/dn"/>
<PARAM name="dataNode1_syncNum" value="0"/>
</DEVICE>
</DEVICELIST>
</ROOT>
预安装:
[root@db1 script]# ${PG_HOME}/script/gs_preinstall -U omm -G dbgrp -X ${PG_HOME}/cluster_config.xml
Parsing the configuration file.
Successfully parsed the configuration file.
Installing the tools on the local node.
Successfully installed the tools on the local node.
Setting pssh path
Successfully set core path.
Are you sure you want to create the user[omm] and create trust for it (yes/no)? yes
Please enter password for cluster user.
Password:
Please enter password for cluster user again.
Password:
Successfully created [omm] user on all nodes.
Preparing SSH service.
Successfully prepared SSH service.
Checking OS software.
Successfully check os software.
Checking OS version.
Successfully checked OS version.
Creating cluster's path.
Successfully created cluster's path.
Set and check OS parameter.
Setting OS parameters.
Successfully set OS parameters.
Warning: Installation environment contains some warning messages.
Please get more details by "/data/software/openGauss/script/gs_checkos -i A -h db1 --detail".
Set and check OS parameter completed.
Preparing CRON service.
Successfully prepared CRON service.
Setting user environmental variables.
Successfully set user environmental variables.
Setting the dynamic link library.
Successfully set the dynamic link library.
Setting Core file
Successfully set core path.
Setting pssh path
Successfully set pssh path.
Setting Cgroup.
Successfully set Cgroup.
Set ARM Optimization.
No need to set ARM Optimization.
Fixing server package owner.
Setting finish flag.
Successfully set finish flag.
Preinstallation succeeded.
# 安装前检查
[root@db1 script]# /data/software/openGauss/script/gs_checkos -i A -h db1 --detail
Checking items:
A1. [ OS version status ] : Normal
[db1]
centos_7.6.1810_64bit
A2. [ Kernel version status ] : Normal
The names about all kernel versions are same. The value is "3.10.0-957.el7.x86_64".
A3. [ Unicode status ] : Normal
The values of all unicode are same. The value is "LANG=en_US.UTF-8".
A4. [ Time zone status ] : Normal
The informations about all timezones are same. The value is "+0800".
A5. [ Swap memory status ] : Normal
The value about swap memory is correct.
A6. [ System control parameters status ] : Normal
All values about system control parameters are correct.
A7. [ File system configuration status ] : Normal
Both soft nofile and hard nofile are correct.
A8. [ Disk configuration status ] : Normal
The value about XFS mount parameters is correct.
A9. [ Pre-read block size status ] : Normal
The value about Logical block size is correct.
A10.[ IO scheduler status ] : Normal
The value of IO scheduler is correct.
A11.[ Network card configuration status ] : Warning
[db1]
BondMode Null
Warning reason: network 'eth0' 'mtu' RealValue '1500' ExpectedValue '8192'
A12.[ Time consistency status ] : Normal
The ntpd service is started, local time is "2022-07-05 23:23:36".
A13.[ Firewall service status ] : Normal
The firewall service is stopped.
A14.[ THP service status ] : Normal
The THP service is stopped.
Total numbers:14. Abnormal numbers:0. Warning numbers:1.
预安装检查全部通过
自定义内存参数安装
安装报错:The program “gaussdb” is needed by gs_initdb but was not found in the same directory as “/data/huawei/install/app/bin/gs_initdb”.
[omm@db1 script]$ ./gs_install -X /data/software/openGauss/script/clusterconfig.xml \
> --gsinit-parameter="--encoding=UTF8" \
> --dn-guc="max_connections=1000" \
> --dn-guc="max_process_memory=3GB" \
> --dn-guc="shared_buffers=128MB" \
> --dn-guc="bulk_write_ring_size=128MB" \
> --dn-guc="cstore_buffers=16MB"
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 /data/huawei/install/app/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.
[GAUSS-51400] : Failed to execute the command: source /home/omm/.bashrc;python3 '/data/huawei/install/om/script/local/InitInstance.py' -U omm -P "--encoding=UTF8" -l /data/huawei/log/omm/omm/om/gs_local.log.Error:
Initializing instance.
[GAUSS-51615] : Failed to initialize instance. Command:/data/huawei/install/app/bin/gs_initdb --locale=C -D /data/huawei/install/data/dn --nodename=dn_6001 --encoding=UTF8 -C /data/huawei/install/app/bin. Error:
no data was returned by command ""/data/huawei/install/app/bin/gaussdb" -V"
The program "gaussdb" is needed by gs_initdb but was not found in the
same directory as "/data/huawei/install/app/bin/gs_initdb".
Check your installation.
手动执行第一部分出现第2部分报错内容
[omm@db1 bin]$ source /home/omm/.bashrc;python3 '/data/huawei/install/om/script/local/InitInstance.py' -U omm -P "--encoding=UTF8" -l /data/huawei/log/omm/omm/om/gs_local.log
Initializing instance.
[GAUSS-51615] : Failed to initialize instance. Command:/data/huawei/install/app/bin/gs_initdb --locale=C -D /data/huawei/install/data/dn --nodename=dn_6001 --encoding=UTF8 -C /data/huawei/install/app/bin. Error:
no data was returned by command ""/data/huawei/install/app/bin/gaussdb" -V"
The program "gaussdb" is needed by gs_initdb but was not found in the
same directory as "/data/huawei/install/app/bin/gs_initdb".
Check your installation.
# 猜测是在第一个命令里面调用了第二个命令
"gaussdb" is needed by gs_initdb but was not found in the same directory
# ls /data/huawei/install/app/bin/gaussdb --> 文件存在
# ls /data/huawei/install/app/bin/gs_initdb --> 文件存在
[omm@db1 script]$ ls /data/huawei/install/app/bin/gaussdb
/data/huawei/install/app/bin/gaussdb
[omm@db1 script]$ ls /data/huawei/install/app/bin/gs_initdb
/data/huawei/install/app/bin/gs_initdb
手动执行第二个命令
[omm@db1 om]$ /data/huawei/install/app/bin/gs_initdb --locale=C -D /data/huawei/install/data/dn --nodename=dn_6001 --encoding=UTF8 -C /data/huawei/install/app/bin
no data was returned by command ""/data/huawei/install/app/bin/gaussdb" -V"
The program "gaussdb" is needed by gs_initdb but was not found in the
same directory as "/data/huawei/install/app/bin/gs_initdb".
Check your installation.
相关检查
1 /home/omm/.bashrc 目录存在
2 /data/huawei/install/app/bin/gs_initdb目录不存在,因为是存在了一个文件
[omm@db1 script]$ ll /data/huawei/install/app/bin/gs_initdb
-rwx------ 1 omm dbgrp 201K 2021-09-30 14:37 /data/huawei/install/app/bin/gs_initdb
[omm@db1 script]$ ll /data/huawei/install/app/bin/gaussdb
-rwx------ 1 omm dbgrp 105M 2021-09-30 14:37 /data/huawei/install/app/bin/gaussdb
# 如果/data/huawei/install/app/bin/gs_initdb是一个目录(mkdir 目录测试),则会报这个错
[GAUSS-51400] : Failed to execute the command: source /home/omm/.bashrc;python3 '/data/huawei/install/om/script/local/InitInstance.py' -U omm -P "--encoding=UTF8" -l /data/huawei/log/omm/omm/om/gs_local.log.Error:
Initializing instance.
[GAUSS-51615] : Failed to initialize instance. Command:/data/huawei/install/app/bin/gs_initdb --locale=C -D /data/huawei/install/data/dn --nodename=dn_6001 --encoding=UTF8 -C /data/huawei/install/app/bin. Error:
/bin/sh: /data/huawei/install/app/bin/gs_initdb: Is a directory
3 python3存在且是3.6
[omm@db1 script]$ python3 --version
Python 3.6.13
[omm@db1 script]$ which python3
/usr/local/python3/bin/python3
4 InitInstance.py文件存在
[omm@db1 script]$ ll /data/huawei/install/om/script/local/InitInstance.py
-rwx------ 1 omm dbgrp 7.5K 2021-09-30 14:40 /data/huawei/install/om/script/local/InitInstance.py
我来答
添加附件
收藏
分享
问题补充
2条回答
默认
最新
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
墨值悬赏

评论
