Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gADtF-0005lS-0O for pgsql-general@arkaria.postgresql.org; Wed, 10 Oct 2018 12:47:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gADtD-0000gp-P7 for pgsql-general@arkaria.postgresql.org; Wed, 10 Oct 2018 12:46: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.89) (envelope-from ) id 1gADrv-0004tp-NM for pgsql-general@lists.postgresql.org; Wed, 10 Oct 2018 12:45:39 +0000 Received: from mail1.bemta24.messagelabs.com ([67.219.250.6]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gADrq-0004M8-HY for pgsql-general@lists.postgresql.org; Wed, 10 Oct 2018 12:45:38 +0000 Received: from [67.219.250.96] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-6.bemta.az-a.us-west-2.aws.symcld.net id FF/D1-12668-A64FDBB5; Wed, 10 Oct 2018 12:45:30 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprPKsWRWlGSWpSXmKPExsVyLFFOWjfzy95 og8OTzC0+PT3HanFm3iFmByaPg7OnMHocbSoMYIpizcxLyq9IYM3Y/Sas4IJAxZcfB5kbGNv5 uhi5OIQENjBKzDu8krmLkRPImc0o8eGVBIjNJqAt8X32UdYuRg4OEYFKie+NhSBhYQEViTkd1 1hBbBEBVYl/G1ugbCOJHfungI1hAYr/XbiYHcTmFXCVaPo0kQ1ifKXE+qs/2UFGcgrYS3T1So OEGQXEJL6fWsMEYjMLiEvcejIfzJYQEJBYsuc8M4QtKvHy8T9WCNtAYuvSfSwQtrzEvJZHbBC 9ehI3pk6BsrUlli18zQxxgqDEyZlPWCYwisxCsmIWkpZZSFpmIWlZwMiyitE8qSgzPaMkNzEz R9fQwEDX0NBI19DYQNfCWC+xSjdRr7RYtzy1uETXSC+xvFivuDI3OSdFLy+1ZBMjMIJSCpqCd zBeWJ5+iFGSg0lJlLfLfW+0EF9SfkplRmJxRnxRaU5q8SFGGQ4OJQneaZ+BcoJFqempFWmZOc BYhklLcPAoifDOAEnzFhck5hZnpkOkTjFacvxb8H86M0fb0+szmDnezP0xg1mIJS8/L1VKnNc fpEEApCGjNA9uHCzdXGKUlRLmZWRgYBDiKUgtys0sQZV/xSjOwagkzJsAMoUnM68EbusroIOY gA46FbIH5KCSRISUVANjfUXjwRO1s7PUjjd0v705/faD6r3dM53tV8wzPptu8uvmnZ3WtyfHH XXv1JA8pxr4Kvm0w0v72P/7zj/cH19mzHpqa5rBpCbu0tlsax0LH3Mt8Pco/RVv8YN9dvXpLJ fY5V/Ou80oOrBwb4fk/w0an8vOrU7fKm3AozJv98E714v2X2CcKt81RYmlOCPRUIu5qDgRAMR g6DoyAwAA X-Env-Sender: BPepper@KCSouthern.com X-Msg-Ref: server-36.tower-320.messagelabs.com!1539175528!338068!1 X-Originating-IP: [198.97.30.27] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.14.24; banners=-,-,- X-VirusChecked: Checked Received: (qmail 32726 invoked from network); 10 Oct 2018 12:45:29 -0000 Received: from unknown (HELO WNEXMBFEP03.KCSCP.CORP) (198.97.30.27) by server-36.tower-320.messagelabs.com with AES256-SHA encrypted SMTP; 10 Oct 2018 12:45:29 -0000 Received: from WNEXMBFEP03.KCSCP.CORP (10.160.10.82) by WNEXMBFEP03.KCSCP.CORP (10.160.10.82) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 10 Oct 2018 07:45:27 -0500 Received: from WNEXMBFEP03.KCSCP.CORP ([10.2.50.29]) by WNEXMBFEP03.KCSCP.CORP ([10.2.50.29]) with mapi id 15.00.1395.000; Wed, 10 Oct 2018 07:45:27 -0500 From: Bryce Pepper To: Adrian Klaver , "pgsql-general@lists.postgresql.org" Subject: RE: RHEL 7 (systemd) reboot Thread-Topic: RHEL 7 (systemd) reboot Thread-Index: AQHUYDGb7Z4qaT00YEeh50+WkxR0A6UYbZGQ Date: Wed, 10 Oct 2018 12:45:27 +0000 Message-ID: <8e4b469619ff45e3bd962d1b850f3a64@WNEXMBFEP03.KCSCP.CORP> References: <49f8b4546d9948d798d81e1fd32bfb4f@WNEXMBFEP03.KCSCP.CORP> <532b0c39-6b76-658f-fe45-852dd964d7ba@aklaver.com> In-Reply-To: <532b0c39-6b76-658f-fe45-852dd964d7ba@aklaver.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.90.65.98] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Here is the contents of the query and error: [root@kccontrolmt01 tmp]# cat ctm.Xf9pQkg2 update CMS_SYSPRM set CURRENT_STATE=3D'STOPPING',DESIRED_STATE=3D'Down' whe= re DESIRED_STATE <> 'Ignored' ; psql: could not connect to server: Connection refused Is the server running on host "kccontrolmt01" (10.1.32.53) and acce= pting TCP/IP connections on port 5433? -----Original Message----- From: Adrian Klaver =20 Sent: Tuesday, October 09, 2018 7:39 PM To: Bryce Pepper ; pgsql-general@lists.postgresql.o= rg Subject: Re: RHEL 7 (systemd) reboot This email originated from outside the company. Please use caution when ope= ning attachments or clicking on links. If you suspect this to be a phishing= attempt, please report via PhishAlarm. ________________________________ On 10/9/18 11:06 AM, Bryce Pepper wrote: > I am running three instances (under different users) on a RHEL 7=20 > server to support a vendor product. > > In the defined services, the start & stop scripts work fine when=20 > invoked with systemctl {start|stop} whatever.service but we have=20 > automated monthly patching which does a reboot. > > Looking in /var/log/messages and the stop scripts do not get invoked=20 > on reboot, therefore I created a new shutdown service as described=20 > here . > > It appears that PostGreSQL is receiving a signal from somewhere prior=20 > to my script running. > > > The database must be available for the product to shut down in a=20 > consistent state. > > I am open to suggestions. What is the below doing or coming from?: db_execute_sql failed while processing /data00/ctmlinux/ctm_server/tmp/upd_CMS_SYSPRM_29448. > > Thanks, > > Bryce > > *Bryce Pepper* > > Sr. Unix Applications Systems Engineer > > *The Kansas City Southern Railway Company * > > 114 West 11^th Street |=A0 Kansas City, MO 64105 > > Office: 816.983.1512 > > Email: bpepper@kcsouthern.com > -- Adrian Klaver adrian.klaver@aklaver.com