After enabling SSL in the postgresql.conf
, the database will not start because it can't find the server certificate.
Observe the following within postgresql.conf
:
#authentication_timeout = 1min # 1s-600s ssl = on # (change requires restart) <------------------
The following error message is outputted in the master log:
2018-02-15 10:58:56.943613 UTC,,,p33022,th1465452416,,,,0,,,seg-1,,,,,"FATAL","F0000","could not load server certificate file ""server.crt"": No such file or directory",,,,,,,,"initialize_SSL","be-secure.c",791, 2018-02-15 11:09:55.403974 UTC,,,p33132,th286812032,,,,0,,,seg-1,,,,,"FATAL","F0000","could not load server certificate file ""server.crt"": No such file or directory",,,,,,,,"initialize_SSL","be-secure.c",791,
The following error message is found in the gpstart log:
20180215:11:09:55:033120 gpstart:greenplum-5-dev:gpadmin-[DEBUG]:-Check if Master is already running... 20180215:11:09:55:033120 gpstart:greenplum-5-dev:gpadmin-[INFO]:-Starting Master instance in admin mode 20180215:11:19:56:033120 gpstart:greenplum-5-dev:gpadmin-[CRITICAL]:-Failed to start Master instance in admin mode 20180215:11:19:56:033120 gpstart:greenplum-5-dev:gpadmin-[CRITICAL]:-Error occurred: non-zero rc: 1 Command was: 'env GPSESSID=0000000000 GPERA=None $GPHOME/bin/pg_ctl -D /local/disk0/master/gpseg-1 -l /local/disk0/master/gpseg-1/pg_log/startup.log -w -t 600 -o " -p 5432 --gp_dbid=1 --gp_num_contents_in_cluster=0 --silent-mode=true -i -M master --gp_contentid=-1 -x 0 -c gp_role=utility " start' rc=1, stdout='waiting for server to start....................... stopped waiting ', stderr='pg_ctl: could not start server Examine the log output.
In the past, the generated self-signed certificate was placed in the /home/gpadmin
directory. This is not the correct location for the certificate.
The correct location for the server.crt
file is the $MASTER_DATA_DIRECTORY
.