NAVICAT Premium Remote Connection GP (Greenplum) cluster and resolve Fatal:no pg_hba.conf entry for Host "172.20.20.2", User "Gpadmin", Database "Ddata" , SSL off problem
1, the use of the environment
(1) Client: MacOS version navicat Premium 12.0.19
(2) Service end: Greenplum version:postgres (greenplum Database) 4.3.8.2 build 1
2. Configuration method
(1) Add the IP address of the client in the configuration file pg_hba.conf, in the following format:
# IPV4 Local connections:
# IPV6 Local connections:
# Standby Master Host IP addresses
Host All Gpadmin 172.20.20.2/32
Note: The path of the pg_hba.conf file can be found by find, my location is located in/hdfs/data1/gpdata/master/gpseg-1/pg_hba.conf. The Gpadmin user is the account created when the GP cluster is deployed.
(2) switch to Gpadmin, execute gpstop-u
[ROOT@GPM ~]# Su-gpadmin
[GPADMIN@GPM ~]$ Gpstop-u
20171213:17:17:16:012774 gpstop:gpm:gpadmin-[info]:-starting gpstop with args:-u
20171213:17:17:16:012774 gpstop:gpm:gpadmin-[info]:-gathering information and validating the environment ...
20171213:17:17:16:012774 Gpstop:gpm:gpadmin-[info]:-O btaining greenplum Master Catalog information
20171213:17:17:16:012774 Gpstop:gpm:gpadmin-[info]:-O btaining Segment details from master ...
20171213:17:17:16:012774 gpstop:gpm:gpadmin-[info]:-greenplum Version: ' Postgres (greenplum Database) 4.3.8.2 build 1 '
20171213:17:17:16:012774 gpstop:gpm:gpadmin-[info]:-signalling All postmaster processes to reload
.
[GPADMIN@GPM ~]$
Note: Gpstop-u means to upload the pg_hba.conf file and run the parameters of the postgresql.conf file in master, without interrupting the service. Connected users will not use the latest configuration and will apply the latest after reconnection. Played a role in making the pg_hba.conf configuration file that was just modified to take effect.
(3) Configure NAVICAT Premium remotely connect to the GP (Greenplum) cluster, creating a new connection selection PostgreSQL.
Because Greenplum official website introduction said: Database users interact with Greenplum database as they would a regular DBMS. Can interact with PostgreSQL like that Sample and GP interaction, so choose PostgreSQL here is good.
Greenplum Database is based on PostgreSQL Open-source technology. It is essentially several PostgreSQL database instances acting together as one cohesive database management system (DBMS). It is based on PostgreSQL 8.2.15, and in most cases are very similar to PostgreSQL with regard to SQL support, features, C Onfiguration options, and end-user functionality. Database users interact with Greenplum database as they would a regular DBMS.