본문 바로가기

Database/Greenplum

[Greenplum] DBeaver 접속시 master-only utility mode FATAL 에러발생

728x90
반응형

Greenplum 을 접속하려고 했으나 master-only utility mode 라고 하면서 접속불가능한 상황발생

[DBeaver] master-only utility mode

FATAL: System was started in master-only utility mode - only utility mode connections are allowed

 

에러원인은 Greenplum 을 Master 노드에서만 접속이 가능한 master only mode 로 시작을 하여 접속이 안되는 것이다.

 

master 노드 - psql 로 접속하여도 DBeaver와 같은 메세지가 표시되면서 접속이 안된다.

[gpadmin@mdw ~]$ psql -d postgres
psql: FATAL:  System was started in master-only utility mode - only utility mode connections are allowed
[gpadmin@mdw ~]$

 

master 노드에서 psql 로 접속하려면 gp_session_role 옵션을 utility 라고 지정하여야 접속이 가능하다.

[gpadmin@mdw ~]$ PGOPTIONS='-c gp_session_role=utility' psql -d postgres
psql (9.4.24)
Type "help" for help.

postgres=# show gp_server_version;
                      gp_server_version
--------------------------------------------------------------
 6.12.0 build commit:4c176763c7619fb678ce38095e6b3e8fb9548186
(1 row)

postgres=# \q
[gpadmin@mdw ~]$

 

정상적인 상태로 접속하려면 Greenplum 을 재기동하면 문제가 해결된다.

 

[참고] master only mode 로 Greenplum 을 시작하려면 gpstart -m 명령어를 실행하면 된다.

  • 실제 운영상황에서는 사용할 일이 거의 없을 것이다.
[gpadmin@mdw ~]$ gpstart -m
20210722:15:19:37:022752 gpstart:mdw:gpadmin-[INFO]:-Starting gpstart with args: -m
20210722:15:19:37:022752 gpstart:mdw:gpadmin-[INFO]:-Gathering information and validating the environment...
20210722:15:19:37:022752 gpstart:mdw:gpadmin-[INFO]:-Greenplum Binary Version: 'postgres (Greenplum Database) 6.12.0 build commit:4c176763c7619fb678ce38095e6b3e8fb9548186'
20210722:15:19:37:022752 gpstart:mdw:gpadmin-[INFO]:-Greenplum Catalog Version: '301908232'
20210722:15:19:37:022752 gpstart:mdw:gpadmin-[WARNING]:-****************************************************************************
20210722:15:19:37:022752 gpstart:mdw:gpadmin-[WARNING]:-Master-only start requested. Disruptive action if standby master configured.
20210722:15:19:37:022752 gpstart:mdw:gpadmin-[WARNING]:-This is advisable only under the direct supervision of Greenplum support.
20210722:15:19:37:022752 gpstart:mdw:gpadmin-[WARNING]:-This mode of operation is not supported in a production environment and
20210722:15:19:37:022752 gpstart:mdw:gpadmin-[WARNING]:-may lead to a split-brain condition and possible unrecoverable data loss.
20210722:15:19:37:022752 gpstart:mdw:gpadmin-[WARNING]:-****************************************************************************

Continue with master-only startup Yy|Nn (default=N):
> y
20210722:15:19:39:022752 gpstart:mdw:gpadmin-[INFO]:-Starting Master instance in admin mode
20210722:15:19:39:022752 gpstart:mdw:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information
20210722:15:19:39:022752 gpstart:mdw:gpadmin-[INFO]:-Obtaining Segment details from master...
20210722:15:19:39:022752 gpstart:mdw:gpadmin-[INFO]:-Setting new master era
20210722:15:19:39:022752 gpstart:mdw:gpadmin-[INFO]:-Master Started...
[gpadmin@mdw ~]$

 

 

728x90
반응형