合 GreenPlum启动报错fe_sendauth no password supplied
现象
把GreenPlum的几台节点都通过虚拟机克隆的手段复制到新的环境,并且修改IP地址,启动GreenPlum时报错:
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 | [gpadmin@mdw gpseg-1]$ gpstop -M fast -ar 20231227:17:49:10:1817892 gpstop:mdw:gpadmin-[INFO]:-Starting gpstop with args: -M fast -ar 20231227:17:49:10:1817892 gpstop:mdw:gpadmin-[INFO]:-Gathering information and validating the environment... 20231227:17:49:10:1817892 gpstop:mdw:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information 20231227:17:49:10:1817892 gpstop:mdw:gpadmin-[INFO]:-Obtaining Segment details from master... 20231227:17:49:10:1817892 gpstop:mdw:gpadmin-[CRITICAL]:-gpstop failed. (Reason='fe_sendauth: no password supplied ') exiting... [gpadmin@mdw gpseg-1]$ gpcc start 2023-12-27 17:49:20 Starting the gpcc agents and webserver... 2023-12-27 17:49:20 pq: System was started in master-only utility mode - only utility mode connections are allowed [gpadmin@mdw gpseg-1]$ [gpadmin@mdw gpseg-1]$ [gpadmin@mdw gpseg-1]$ [gpadmin@mdw gpseg-1]$ gpstop -M fast -ar -v 20231227:17:49:44:1831338 gpstop:mdw:gpadmin-[INFO]:-Starting gpstop with args: -M fast -ar -v 20231227:17:49:44:1831338 gpstop:mdw:gpadmin-[DEBUG]:-Setting level of parallelism to: 64 20231227:17:49:44:1831338 gpstop:mdw:gpadmin-[INFO]:-Gathering information and validating the environment... 20231227:17:49:44:1831338 gpstop:mdw:gpadmin-[DEBUG]:---Checking that current user can use GP binaries 20231227:17:49:44:1831338 gpstop:mdw:gpadmin-[DEBUG]:-Obtaining master's port from master data directory 20231227:17:49:44:1831338 gpstop:mdw:gpadmin-[DEBUG]:-Read from postgresql.conf port=5432 20231227:17:49:44:1831338 gpstop:mdw:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information 20231227:17:49:44:1831338 gpstop:mdw:gpadmin-[INFO]:-Obtaining Segment details from master... 20231227:17:49:44:1831338 gpstop:mdw:gpadmin-[DEBUG]:-Connecting to dbname='template1' 20231227:17:49:44:1831338 gpstop:mdw:gpadmin-[ERROR]:-gpstop failed. exiting... Traceback (most recent call last): File "/usr/local/greenplum-db-6.23.1/lib/python/gppylib/mainUtils.py", line 342, in simple_main_locked exitCode = commandObject.run() File "/usr/local/greenplum-db-6.23.1/bin/gpstop", line 162, in run self._prepare() File "/usr/local/greenplum-db-6.23.1/bin/gpstop", line 370, in _prepare self._build_gparray() File "/usr/local/greenplum-db-6.23.1/bin/gpstop", line 427, in _build_gparray self.gparray = GpArray.initFromCatalog(self.dburl, utility=True) File "/usr/local/greenplum-db-6.23.1/lib/python/gppylib/gparray.py", line 955, in initFromCatalog conn = dbconn.connect(dbURL, utility) File "/usr/local/greenplum-db-6.23.1/lib/python/gppylib/db/dbconn.py", line 206, in connect cnx = pgdb._connect_(cstr, dbhost, dbport, dbopt, dbtty, dbuser, dbpasswd) InternalError: fe_sendauth: no password supplied |
分析
1 2 3 4 5 6 7 8 9 10 11 | vi $MASTER_DATA_DIRECTORY/pg_hba.conf host all gpadmin ::1/128 trust host all gpadmin 127.0.0.1/32 trust host all gpadmin 192.10.25.1/24 trust host replication gpadmin 192.10.25.1/24 trust [gpadmin@mdw ~]$ more ~/.pgpass *:5432:gpperfmon:gpmon:gpmon *:5432:*:gpadmin:dbaup |
文件$MASTER_DATA_DIRECTORY/pg_hba.conf中必须有“host all gpadmin ::1/128 trust”这行。
::1/128
是 IPv6 地址的一种表示,它表示 IPv6 的本地回环地址,相当于 IPv4 中的 127.0.0.1/32
。
在IPv6中,::1
是IPv6的本地回环地址,类似于IPv4的 127.0.0.1
。IPv6的本地回环地址用于在同一计算机上进行网络通信,就像IPv4的本地回环地址一样。