原 GreenPlum查询状态报错 [WARNING]:-could not query segment
现象
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | [gpadmin@mdw ~]$ gpstate -e 20231229:17:05:24:3562260 gpstate:mdw:gpadmin-[INFO]:-Starting gpstate with args: -e 20231229:17:05:24:3562260 gpstate:mdw:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 6.23.1 build commit:2731a45ecb364317207c560730cf9e2cbf17d7e4 Open Source' 20231229:17:05:24:3562260 gpstate:mdw:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 9.4.26 (Greenplum Database 6.23.1 build commit:2731a45ecb364317207c560730cf9e2cbf17d7e4 Open Source) on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 6.4.0, 64-bit compiled on Feb 7 2023 22:54:40' 20231229:17:05:24:3562260 gpstate:mdw:gpadmin-[INFO]:-Obtaining Segment details from master... 20231229:17:05:24:3562260 gpstate:mdw:gpadmin-[INFO]:-Gathering data from segments... . 20231229:17:05:25:3562260 gpstate:mdw:gpadmin-[WARNING]:-could not query segment 5 (sdw1:6003) 20231229:17:05:25:3562260 gpstate:mdw:gpadmin-[WARNING]:-could not query segment 6 (sdw2:6000) 20231229:17:05:25:3562260 gpstate:mdw:gpadmin-[WARNING]:-could not query segment 7 (sdw2:6001) 20231229:17:05:25:3562260 gpstate:mdw:gpadmin-[WARNING]:-could not query segment 8 (sdw2:6002) 20231229:17:05:25:3562260 gpstate:mdw:gpadmin-[WARNING]:-could not query segment 9 (sdw2:6003) 20231229:17:05:25:3562260 gpstate:mdw:gpadmin-[WARNING]:-could not query segment 22 (sdw1:7000) 20231229:17:05:26:3562260 gpstate:mdw:gpadmin-[WARNING]:-could not query segment 24 (sdw1:7002) 20231229:17:05:26:3562260 gpstate:mdw:gpadmin-[WARNING]:-could not query segment 25 (sdw1:7003) 20231229:17:05:26:3562260 gpstate:mdw:gpadmin-[INFO]:----------------------------------------------------- 20231229:17:05:26:3562260 gpstate:mdw:gpadmin-[INFO]:-Segment Mirroring Status Report 20231229:17:05:26:3562260 gpstate:mdw:gpadmin-[INFO]:----------------------------------------------------- 20231229:17:05:26:3562260 gpstate:mdw:gpadmin-[INFO]:-Segments with Primary and Mirror Roles Switched 20231229:17:05:26:3562260 gpstate:mdw:gpadmin-[INFO]:- Current Primary Port Mirror Port 20231229:17:05:26:3562260 gpstate:mdw:gpadmin-[INFO]:- sdw1 7000 sdw3 6000 20231229:17:05:26:3562260 gpstate:mdw:gpadmin-[INFO]:- sdw1 7001 sdw3 6001 20231229:17:05:26:3562260 gpstate:mdw:gpadmin-[INFO]:- sdw1 7002 sdw3 6002 20231229:17:05:26:3562260 gpstate:mdw:gpadmin-[INFO]:- sdw1 7003 sdw3 6003 20231229:17:05:26:3562260 gpstate:mdw:gpadmin-[WARNING]:-could not query segment 5 (sdw1:6003) 20231229:17:05:26:3562260 gpstate:mdw:gpadmin-[WARNING]:-could not query segment 6 (sdw2:6000) 20231229:17:05:26:3562260 gpstate:mdw:gpadmin-[WARNING]:-could not query segment 7 (sdw2:6001) 20231229:17:05:27:3562260 gpstate:mdw:gpadmin-[WARNING]:-could not query segment 8 (sdw2:6002) 20231229:17:05:27:3562260 gpstate:mdw:gpadmin-[WARNING]:-could not query segment 9 (sdw2:6003) 20231229:17:05:27:3562260 gpstate:mdw:gpadmin-[WARNING]:-could not query segment 22 (sdw1:7000) 20231229:17:05:27:3562260 gpstate:mdw:gpadmin-[WARNING]:-could not query segment 24 (sdw1:7002) 20231229:17:05:27:3562260 gpstate:mdw:gpadmin-[WARNING]:-could not query segment 25 (sdw1:7003) 20231229:17:05:27:3562260 gpstate:mdw:gpadmin-[INFO]:----------------------------------------------------- 20231229:17:05:27:3562260 gpstate:mdw:gpadmin-[INFO]:-Unsynchronized Segment Pairs 20231229:17:05:27:3562260 gpstate:mdw:gpadmin-[INFO]:- Current Primary Port WAL sync remaining bytes Mirror Port 20231229:17:05:27:3562260 gpstate:mdw:gpadmin-[INFO]:- sdw1 6000 1655701504 sdw2 7000 20231229:17:05:27:3562260 gpstate:mdw:gpadmin-[INFO]:- sdw1 6001 640789118976 sdw2 7001 20231229:17:05:27:3562260 gpstate:mdw:gpadmin-[INFO]:- sdw1 6002 673619509248 sdw2 7002 [gpadmin@mdw ~]$ |
解决
找到报错的实例,例如“[WARNING]:-could not query segment 5 (sdw1:6003)”,然后修改各个segment的pg_hba.conf文件,添加对mdw的trust认证:
1 | host all gpadmin 192.10.25.83/32 trust |