# home下创建.ssh目录 [root@hnode1 ~] mkdir .ssh [root@hnode1 ~] cd .ssh/ [root@hnode1 .ssh] pwd /root/.ssh # 生成秘钥 [root@hnode1 .ssh] ssh-keygen -t rsa Generating public/private rsa key pair. Enter file inwhich to save the key (/root/.ssh/id_rsa): (回车) Enter passphrase (empty for no passphrase):(回车) Enter same passphrase again:(回车) Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: SHA256:F1XLKMmnivY288gcK5IsY90xm0kawlM62D+uyGIeB0k root@hnode1 The keys randomart image is: +---[RSA 2048]----+ | ... | | . o o . | | E = o o | |. . . = | | * o S o | |. O . +. o | | . O *o*o | |oo* O.*+++ | |=+.=.o o*+. | +----[SHA256]-----+ # 查看生成的文件 [root@hnode1 .ssh] ll 总用量 8 -rw-------. 1 root root 1675 3月 30 18:58 id_rsa -rw-r--r--. 1 root root 393 3月 30 18:58 id_rsa.pub
问题一:Failed to complete obtain psql count Master gp_segment_configuration Script Exiting!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# 日志所在文件夹 gpadmin@hnode1 gpAdminLogs]$ pwd /home/gpadmin/gpAdminLogs [gpadmin@hnode1 gpAdminLogs]$ less /home/gpadmin/gpAdminLogs/gpinitsystem_20200529.log ... 20200529:21:24:32:069170 gpinitsystem:hnode1:gpadmin-[FATAL]:-Failed to complete obtain psql count Master gp_segment_configuration Script Exiting! 20200529:21:24:32:069170 gpinitsystem:hnode1:gpadmin-[WARN]:-Script has left Greenplum Database in an incomplete state 20200529:21:24:32:069170 gpinitsystem:hnode1:gpadmin-[WARN]:-Run command bash /home/gpadmin/gpAdminLogs/backout_gpinitsystem_gpadmin_20200529_212419 to remove these changes 20200529:21:24:32:069170 gpinitsystem:hnode1:gpadmin-[INFO]:-Start Function BACKOUT_COMMAND 20200529:21:24:32:069170 gpinitsystem:hnode1:gpadmin-[INFO]:-End Function BACKOUT_COMMAND
问题二:Found indication of postmaster process on port 5432 on Master host Script Exiting!
1 2 3 4 5 6
Found indication of postmaster process on port 5432 on Master host Script Exiting!
解决:关闭杀死占用端口5432的进程。 先查询进程 $ lsof -i:5432 kill ...
1 2 3 4 5 6 7 8 9 10 11
Continue with Greenplum creation Yy|Nn (default=N): > y 20220224:11:56:49:996735 gpinitsystem:0004:gpadmin-[INFO]:-Building the Master instance database, please wait... /bin/mv: setting attribute 'security.kysec'for'security.kysec': 不允许的操作 20220224:11:56:56:996735 gpinitsystem:0004:gpadmin-[INFO]:-Starting the Master in admin mode 20220224:11:56:56:996735 gpinitsystem:0004:gpadmin-[FATAL]:-Failed to complete obtain psql count Master gp_segment_configuration Script Exiting! 20220224:11:56:56:996735 gpinitsystem:0004:gpadmin-[WARN]:-Script has left Greenplum Database in an incomplete state 20220224:11:56:56:996735 gpinitsystem:0004:gpadmin-[WARN]:-Run command bash /home/gpadmin/gpAdminLogs/backout_gpinitsystem_gpadmin_20220224_115641 to remove these changes 20220224:11:56:56:996735 gpinitsystem:0004:gpadmin-[INFO]:-Start Function BACKOUT_COMMAND 20220224:11:56:56:996735 gpinitsystem:0004:gpadmin-[INFO]:-End Function BACKOUT_COMMAND [gpadmin@0004 ~]$
Continue with Greenplum creation Yy|Nn (default=N): > y 20220224:11:31:13:986210 gpinitsystem:0004:gpadmin-[INFO]:-Building the Master instance database, please wait... /bin/mv: setting attribute 'security.kysec'for'security.kysec': 不允许的操作 20220224:11:31:20:986210 gpinitsystem:0004:gpadmin-[INFO]:-Starting the Master in admin mode Traceback (most recent call last): File "/usr/local/gpdb/bin/lib/gphostcachelookup.py", line 12, in <module> from gppylib.gphostcache import GpInterfaceToHostNameCache File "/usr/local/gpdb/lib/python/gppylib/gphostcache.py", line 31, in <module> from gppylib.commands import unix File "/usr/local/gpdb/lib/python/gppylib/commands/unix.py", line 10, in <module> import psutil ImportError: No module named psutil 20220224:11:31:20:986210 gpinitsystem:0004:gpadmin-[FATAL]:-Unable to contact : /bin/ping: usage error: 需要目标地址 /sbin/ping6: usage error: 需要目标地址 Script Exiting! 20220224:11:31:20:986210 gpinitsystem:0004:gpadmin-[WARN]:-Script has left Greenplum Database in an incomplete state 20220224:11:31:20:986210 gpinitsystem:0004:gpadmin-[WARN]:-Run command bash /home/gpadmin/gpAdminLogs/backout_gpinitsystem_gpadmin_20220224_113101 to remove these changes 20220224:11:31:20:986210 gpinitsystem:0004:gpadmin-[INFO]:-Start Function BACKOUT_COMMAND 20220224:11:31:20:986210 gpinitsystem:0004:gpadmin-[INFO]:-End Function BACKOUT_COMMAND
# 您是否同意Pivotal Greenplum Command Center最终用户许可协议? Do you agree to the Pivotal Greenplum Command Center End User License Agreement? Yy/Nn (Default=Y)
# 您想在哪里安装Greenplum Command Center?(默认/usr/local) Where would you like to install Greenplum Command Center? (Default=/usr/local) /usr/local/greenplum-db
#您想将此安装Greenplum Command Center命名为什么(默认gpcc) What would you like to name this installation of Greenplum Command Center? (Default=gpcc)
#您希望gpcc网络服务器使用哪个端口(默认28080) What port would you like gpcc webserver to use? (Default=28080)
#是否启用 SSL(默认 N) Would you like enable SSL? Yy/Nn (Default=N)
#请选择一种显示语言(默认英语) Please choose a display language (Default=English) 1. English 2. Chinese 3. Korean 4. Russian 5. Japanese 2
INSTALLATION IN PROGRESS...
******************************************************************************** * * * INSTALLATION COMPLETED SUCCESSFULLY * * * * Source the gpcc_path.sh or add it to your bashrc file to use gpcc command * * utility. * * * * To see the GPCC web UI, you must first start the GPCC webserver. * * * * To start the GPCC webserver on the current host, run gpcc start. * * * ********************************************************************************
#编辑配置文件 [gpadmin@hnode1 greenplum-cc-web-6.1.0-gp6-rhel7-x86_64]$ vim ~/.bash_profile
# 重启 GreenPlum [gpadmin@hnode1 greenplum-cc-web-6.1.0-gp6-rhel7-x86_64]$ cd ~ [gpadmin@hnode1 ~]$ gpstop -M fast -a [gpadmin@hnode1 ~]$ gpstart -a [gpadmin@hnode1 ~]$ gpcc start 2020-06-04 12:04:14 Starting the gpcc agents and webserver... 2020-06-04 12:04:17 Agent successfully started on 3/3 hosts 2020-06-04 12:04:17 View Greenplum Command Center at http://hnode1:28080