Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0CEW-000413-C6 for pgsql-admin@arkaria.postgresql.org; Thu, 05 Oct 2017 19:55:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e0CEV-00061Y-6b for pgsql-admin@arkaria.postgresql.org; Thu, 05 Oct 2017 19:54:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e0CCf-0002lw-Mk for pgsql-admin@postgresql.org; Thu, 05 Oct 2017 19:53:05 +0000 Received: from mail-dm3nam03on0083.outbound.protection.outlook.com ([104.47.41.83] helo=NAM03-DM3-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e0CCW-0000c3-Om for pgsql-admin@postgresql.org; Thu, 05 Oct 2017 19:53:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stryker.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=HJXnJqIO5o6O08JwQNmzS07bU3hf2rAtWXkb8F0it/g=; b=qAgKaOc8UOaK5f0en6LVUHaHgB4GichvI0EL/LYexZYwIpVfehSg7AODfTSot/RBwx8uxdP3X0yqPVuYNMFPyOO7TuCLB74e7KRYUluKujWsLmaxHBwqonKo/CrFrjuzO8+BoiTFBbd+u9euPB8RnzGMcZQUSSbnIX71LZcZXFU= Received: from DM5PR01MB2731.prod.exchangelabs.com (10.172.186.9) by DM5PR01MB2731.prod.exchangelabs.com (10.172.186.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 5 Oct 2017 19:52:53 +0000 Received: from DM5PR01MB2731.prod.exchangelabs.com ([10.172.186.9]) by DM5PR01MB2731.prod.exchangelabs.com ([10.172.186.9]) with mapi id 15.20.0077.018; Thu, 5 Oct 2017 19:52:53 +0000 From: "Ponnam, Bhavani" To: "pgsql-admin@postgresql.org" Subject: Re: start/restart PostgreSQL service with SSL enabled Thread-Topic: start/restart PostgreSQL service with SSL enabled Thread-Index: AdM+EF/8+DWVwotDTAWG5i+nI6eUYgAAxWHg Date: Thu, 5 Oct 2017 19:52:53 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Bhavani.Ponnam@Stryker.com; x-originating-ip: [63.130.78.214] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR01MB2731;6:YvrZEkAoL9ixIAR3KkTHy+5twOvdifmWeZnIz93jwN3y8Y5SLWWXQfJltCXCnzTR9nC1BPWwzY7OtiOm4m63eC8nWoXjxEye6AGKNAoCiYrl7NphgfmmE0QnMq00tpgCBPOEWjJDP89iIn+8yT3AhCES0ZLAknPLJvb7NuV0KtF7GRpAqhLQaOot/9oiw0XWvEqq9u7NlduEYmq8yd/ys/lVYvxfjwkJRUZtxYesQcu5TmnUiUy9fpXag1/r/g6STJOyZL56p1nqHVZoXSQMj1uCJU72IGQo06Fs2f2X4EKmiZILAOoIdQPpD/o5x1cMaCVc52SNwnSqNsvGotZTDg==;5:ExSLrR/hj6mBmfk+WcAqjTxwDKN1Hfv/4eKt7YbDDfC5dVbLOyVnmNXOMzIVAEFvr3XC77A+4Rt4XU2MdkDBAP8nnwJxqWvYJJlYARle0WkYVRwZWpBp6hiM3MHWzMcsr3dNXwGzbmUh44WZ0y9PlA==;24:D+8yMSmihR6DDaQfRaGFKSXc338SZCDmFcnT38sP+Jau4dyFS1ybYnWmpUJK9DPRTtYqi4uBeo1sQs2BQUIVQ4iQD5AA7uKeOk3UmmRMS5E=;7:N83l2dcPI//IOviv4wd4fDOUfmD4QXk+AwFOOX9X0b4o9esQSBTBQVI/lXeh12ZcPVyf2nstGXX9Hd5np410nJryNShuW60gDjA/g6jqLPWuRIikeqUY9KmLsVjBIOp7Jz72NmW7m0vhThqucppipP75bEAojzaa7hsHKFT1VvF9JgzUUGcjEXkcDg9cgpTDXEHy3F+8QAtbELxYdojOL9hAyrpLzNgy8CCKWDWuUpI= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 3b888f1a-95a0-4535-5f8f-08d50c2aaaa0 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075);SRVR:DM5PR01MB2731; x-ms-traffictypediagnostic: DM5PR01MB2731: x-exchange-antispam-report-test: UriScan:(192374486261705)(21748063052155); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123560025)(20161123564025)(20161123562025)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM5PR01MB2731;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM5PR01MB2731; x-forefront-prvs: 04519BA941 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(346002)(376002)(39860400002)(189002)(199003)(2940100002)(53936002)(86362001)(9326002)(68736007)(7696004)(76176999)(101416001)(54356999)(3846002)(50986999)(106356001)(77096006)(3660700001)(2906002)(3280700002)(790700001)(102836003)(6916009)(229853002)(6506006)(2950100002)(25786009)(9686003)(5660300001)(2900100001)(2351001)(6246003)(14454004)(316002)(6116002)(7736002)(5630700001)(6306002)(33656002)(55016002)(478600001)(97736004)(189998001)(105586002)(8936002)(72206003)(54896002)(81156014)(66066001)(81166006)(6436002)(74316002)(99286003)(5640700003)(2501003)(8676002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR01MB2731;H:DM5PR01MB2731.prod.exchangelabs.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: Stryker.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_DM5PR01MB2731C942883BB83C91AC278C83700DM5PR01MB2731prod_" MIME-Version: 1.0 X-OriginatorOrg: stryker.com X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Oct 2017 19:52:53.2027 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e9dbbfb-394a-4583-8810-53f81f819e3b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR01MB2731 List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --_000_DM5PR01MB2731C942883BB83C91AC278C83700DM5PR01MB2731prod_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I currently have PostgreSQL 9.5 installed on a Windows 10 machine. I = have enabled SSL and configured key & crt files with pass phrase. I know th= at I have to enter the PEM pass phrase everytime I try to restart. So I tri= ed using pg_ctl to start Postgres, but I have few issues: 1. Since I installed Postgres as Windows service, running pg_ctl does no= t start my service. I see postgresql exe instances running in Task manager = but my windows service never gets updated to Running. 2. After running the following command: pg_ctl -D "c:\Program Files\PostgreSQL\9.5\data" restart -w I was able to enter the PEM pass phrase since I got a prompt and was able t= o connect. But when my application is trying to establish the connection wi= th Postgresql, the application is waiting since there are prompts on the co= mmand windows where I executed the pg_ctl command to enter the PEM pass phr= ase. I think this makes the application totally unusable. 1. Per our security requirements, we cannot remove the PEM pass phrase, = so how do I control the PostgreSQL service - start & restart with the pass = phrase and without user interaction. Please advise on how to achieve what I am doing or share any alternatives t= hat someone already has for this situation. Thank you --_000_DM5PR01MB2731C942883BB83C91AC278C83700DM5PR01MB2731prod_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

      I currently have Post= greSQL 9.5 installed on a Windows 10 machine. I have enabled SSL and config= ured key & crt files with pass phrase. I know that I have to enter the = PEM pass phrase everytime I try to restart. So I tried using pg_ctl to start Postgres, but I have few issues:

  1. S= ince I installed Postgres as Windows service, running pg_ctl does not start= my service. I see postgresql exe instances running in Task manager but my = windows service never gets updated to Running.
  2. After running the following command:

pg_ctl -D "c:\Program Files\PostgreSQL\9= .5\data" restart -w

I was able to enter the PEM pass phrase since= I got a prompt and was able to connect. But when my application is trying = to establish the connection with Postgresql, the application is waiting sin= ce there are prompts on the command windows where I executed the pg_ctl command to enter the PEM pass phrase. = I think this makes the application totally unusable.

  1. P= er our security requirements, we cannot remove the PEM pass phrase, so how = do I control the PostgreSQL service – start & restart with the pa= ss phrase and without user interaction.

 

Please advise on how to achieve what I am doi= ng or share any alternatives that someone already has for this situation.

 

Thank you

--_000_DM5PR01MB2731C942883BB83C91AC278C83700DM5PR01MB2731prod_--