合 GreenPlum恢复时报错Did not start the following segments due to failure while updating the port的排查过程
现象
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | [gpadmin@mdw ~]$ gprecoverseg -a 。。。。。 231229:16:18:23:267015 gprecoverseg:mdw:gpadmin-[INFO]:----------------------------------------------------------- 20231229:16:18:23:267015 gprecoverseg:mdw:gpadmin-[INFO]:-Did not start the following segments due to failure while updating the port.Please updat e the port in postgresql.conf located in the segment's data directory 20231229:16:18:23:267015 gprecoverseg:mdw:gpadmin-[INFO]:- hostname: sdw1; port: 6000; datadir: /data/opt/greenplum/data/primary/gpseg0 20231229:16:18:23:267015 gprecoverseg:mdw:gpadmin-[INFO]:- hostname: sdw1; port: 6004; datadir: /data/opt/greenplum/data/primary/gpseg4 20231229:16:18:23:267015 gprecoverseg:mdw:gpadmin-[INFO]:- hostname: sdw1; port: 6001; datadir: /data/opt/greenplum/data/primary/gpseg1 20231229:16:18:23:267015 gprecoverseg:mdw:gpadmin-[INFO]:- hostname: sdw1; port: 6003; datadir: /data/opt/greenplum/data/primary/gpseg3 20231229:16:18:23:267015 gprecoverseg:mdw:gpadmin-[INFO]:- hostname: sdw1; port: 6005; datadir: /data/opt/greenplum/data/primary/gpseg5 20231229:16:18:23:267015 gprecoverseg:mdw:gpadmin-[INFO]:- hostname: sdw1; port: 6002; datadir: /data/opt/greenplum/data/primary/gpseg2 20231229:16:18:23:267015 gprecoverseg:mdw:gpadmin-[INFO]:- hostname: sdw2; port: 6000; datadir: /data/opt/greenplum/data/primary/gpseg6 20231229:16:18:23:267015 gprecoverseg:mdw:gpadmin-[INFO]:- hostname: sdw2; port: 6002; datadir: /data/opt/greenplum/data/primary/gpseg8 20231229:16:18:23:267015 gprecoverseg:mdw:gpadmin-[INFO]:- hostname: sdw2; port: 6001; datadir: /data/opt/greenplum/data/primary/gpseg7 20231229:16:18:23:267015 gprecoverseg:mdw:gpadmin-[INFO]:- hostname: sdw2; port: 6003; datadir: /data/opt/greenplum/data/primary/gpseg9 20231229:16:18:23:267015 gprecoverseg:mdw:gpadmin-[INFO]:- hostname: sdw2; port: 6005; datadir: /data/opt/greenplum/data/primary/gpseg11 20231229:16:18:23:267015 gprecoverseg:mdw:gpadmin-[INFO]:- hostname: sdw2; port: 6004; datadir: /data/opt/greenplum/data/primary/gpseg10 20231229:16:18:23:267015 gprecoverseg:mdw:gpadmin-[INFO]:-Triggering FTS probe 20231229:16:18:23:267015 gprecoverseg:mdw:gpadmin-[ERROR]:-gprecoverseg failed. Please check the output for more details. |
分析
查看sdw1实例的/home/gpadmin/gpAdminLogs/gpsegrecovery.py_20231229.log日志文件:
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 | 20231229:16:18:32:128007 gpsegrecovery.py:sdw1:gpadmin-[ERROR]:-[{"progress_file": "/home/gpadmin/gpAdminLogs/pg_rewind.20231229_161820.dbid2.out" , "dbid": 2, "error_type": "update", "error_msg": "ExecutionError: 'non-zero rc: 127' occurred. Details: 'perl -p -i.bak -e 's/^port[ ]*=[ ]*\\d+ /port=6000/' /data/opt/greenplum/data/primary/gpseg0/postgresql.conf' cmd had rc=127 completed=True halted=False\n stdout=''\n stderr='perl: er ror while loading shared libraries: libperl.so: cannot open shared object file: No such file or directory\n'", "datadir": "/data/opt/greenplum/dat a/primary/gpseg0", "port": 6000}, {"progress_file": "/home/gpadmin/gpAdminLogs/pg_rewind.20231229_161820.dbid6.out", "dbid": 6, "error_type": "upd ate", "error_msg": "ExecutionError: 'non-zero rc: 127' occurred. Details: 'perl -p -i.bak -e 's/^port[ ]*=[ ]*\\d+/port=6004/' /data/opt/greenplu m/data/primary/gpseg4/postgresql.conf' cmd had rc=127 completed=True halted=False\n stdout=''\n stderr='perl: error while loading shared librar ies: libperl.so: cannot open shared object file: No such file or directory\n'", "datadir": "/data/opt/greenplum/data/primary/gpseg4", "port": 6004 }, {"progress_file": "/home/gpadmin/gpAdminLogs/pg_rewind.20231229_161820.dbid3.out", "dbid": 3, "error_type": "update", "error_msg": "ExecutionEr ror: 'non-zero rc: 127' occurred. Details: 'perl -p -i.bak -e 's/^port[ ]*=[ ]*\\d+/port=6001/' /data/opt/greenplum/data/primary/gpseg1/postgresq l.conf' cmd had rc=127 completed=True halted=False\n stdout=''\n stderr='perl: error while loading shared libraries: libperl.so: cannot open sh ared object file: No such file or directory\n'", "datadir": "/data/opt/greenplum/data/primary/gpseg1", "port": 6001}, {"progress_file": "/home/gpa dmin/gpAdminLogs/pg_rewind.20231229_161820.dbid5.out", "dbid": 5, "error_type": "update", "error_msg": "ExecutionError: 'non-zero rc: 127' occurre d. Details: 'perl -p -i.bak -e 's/^port[ ]*=[ ]*\\d+/port=6003/' /data/opt/greenplum/data/primary/gpseg3/postgresql.conf' cmd had rc=127 complet ed=True halted=False\n stdout=''\n stderr='perl: error while loading shared libraries: libperl.so: cannot open shared object file: No such file or directory\n'", "datadir": "/data/opt/greenplum/data/primary/gpseg3", "port": 6003}, {"progress_file": "/home/gpadmin/gpAdminLogs/pg_rewind.2023 1229_161820.dbid7.out", "dbid": 7, "error_type": "update", "error_msg": "ExecutionError: 'non-zero rc: 127' occurred. Details: 'perl -p -i.bak -e 's/^port[ ]*=[ ]*\\d+/port=6005/' /data/opt/greenplum/data/primary/gpseg5/postgresql.conf' cmd had rc=127 completed=True halted=False\n stdout= ''\n stderr='perl: error while loading shared libraries: libperl.so: cannot open shared object file: No such file or directory\n'", "datadir": "/ data/opt/greenplum/data/primary/gpseg5", "port": 6005}, {"progress_file": "/home/gpadmin/gpAdminLogs/pg_rewind.20231229_161820.dbid4.out", "dbid": 4, "error_type": "update", "error_msg": "ExecutionError: 'non-zero rc: 127' occurred. Details: 'perl -p -i.bak -e 's/^port[ ]*=[ ]*\\d+/port=600 2/' /data/opt/greenplum/data/primary/gpseg2/postgresql.conf' cmd had rc=127 completed=True halted=False\n stdout=''\n stderr='perl: error while loading shared libraries: libperl.so: cannot open shared object file: No such file or directory\n'", "datadir": "/data/opt/greenplum/data/primary /gpseg2", "port": 6002}] |
发现有一个报错:perl: error while loading shared libraries: libperl.so: cannot open shared object file: No such file or directory
在测试环境,查询