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 1gA1kr-0003KT-Iz for pgsql-general@arkaria.postgresql.org; Tue, 09 Oct 2018 23:49:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gA1ko-00084Q-AZ for pgsql-general@arkaria.postgresql.org; Tue, 09 Oct 2018 23:49:30 +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 1g9wP2-0003zK-CB for pgsql-general@lists.postgresql.org; Tue, 09 Oct 2018 18:06:40 +0000 Received: from mail1.bemta24.messagelabs.com ([67.219.250.212]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g9wOx-0001hY-JO for pgsql-general@lists.postgresql.org; Tue, 09 Oct 2018 18:06:38 +0000 Received: from [67.219.251.48] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-5.bemta.az-c.us-west-2.aws.symcld.net id D1/CC-11805-62EECBB5; Tue, 09 Oct 2018 18:06:30 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprJKsWRWlGSWpSXmKPExsVyLFFOWlft3Z5 og93fZCzOzDvE7MDocbSpMIAxijUzLym/IoE149/Ja2wFl/0qNr/oZm9gvOfexcjFISSwnlHi dfNmFghnFqPEn57vTF2MnBxsAtoS32cfZQWxRQR8JT5PnMICYgsLKEps/r6HGSKuJjFh8zyoG j2J29Nng9ksAioStxb9YAOxeQVcJbacWAtWzyggJvH91Bqw+cwC4hK3nswHsyUEBCSW7DnPDG GLSrx8/I8VwjaQ2Lp0HwuELS8xr+URG0RvtsTF2ZNYIeYLSpyc+YRlAqPgLCRjZyEpm4WkDCK uI7Fg9yc2CFtbYtnC18ww9pkDj5mQxRcwsq9iNE8qykzPKMlNzMzRNTQw0DU0NNI1NDbXNTHR S6zSTdYrLdYtTy0u0TXSSywv1iuuzE3OSdHLSy3ZxAiMmpSCTp0djPNWpB9ilORgUhLlTWDfE y3El5SfUpmRWJwRX1Sak1p8iFGGg0NJgtf9LVBOsCg1PbUiLTMHGL8waQkOHiURXieQNG9xQW JucWY6ROoUoyXHvwX/pzNzPJrRMYOZ4x2IFGLJy89LlRLnjQNpEABpyCjNgxsHSzGXGGWlhHk ZGRgYhHgKUotyM0tQ5V8xinMwKgnzhoJM4cnMK4Hb+groICagg06FgB1UkoiQkmpgVLx5P8rg w8JiO+0Hj3ZnX3r7/8N+/33z7FdcY1m0KJZp+/TmjaE+SqeCv4YrJno9q53lvm3dRZvfFTdC1 jDsYojsOaYz53U5V4XP0yfsp5UnvZ15SOTBfd8zjysSvnqcUnR4dozBX3XzSRerjwIqqw6I2k 920JvbZGNeVnYs/oLnbLl/az8c1FNiKc5INNRiLipOBABPnKL7LAMAAA== X-Env-Sender: BPepper@KCSouthern.com X-Msg-Ref: server-3.tower-360.messagelabs.com!1539108388!104671!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 30867 invoked from network); 9 Oct 2018 18:06:30 -0000 Received: from unknown (HELO WNEXMBFEP01.KCSCP.CORP) (198.97.30.27) by server-3.tower-360.messagelabs.com with AES256-SHA encrypted SMTP; 9 Oct 2018 18:06:30 -0000 Received: from WNEXMBFEP03.KCSCP.CORP (10.160.10.82) by WNEXMBFEP01.KCSCP.CORP (10.160.10.80) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 9 Oct 2018 13:06:28 -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; Tue, 9 Oct 2018 13:06:28 -0500 From: Bryce Pepper To: "pgsql-general@lists.postgresql.org" Subject: RHEL 7 (systemd) reboot Thread-Topic: RHEL 7 (systemd) reboot Thread-Index: AdRf+YyivIsl6jwYS5WaLztZXjkQYA== Date: Tue, 9 Oct 2018 18:06:27 +0000 Message-ID: <49f8b4546d9948d798d81e1fd32bfb4f@WNEXMBFEP03.KCSCP.CORP> 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: multipart/alternative; boundary="_000_49f8b4546d9948d798d81e1fd32bfb4fWNEXMBFEP03KCSCPCORP_" MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_49f8b4546d9948d798d81e1fd32bfb4fWNEXMBFEP03KCSCPCORP_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I am running three instances (under different users) on a RHEL 7 server to = support a vendor product. In the defined services, the start & stop scripts work fine when invoked wi= th systemctl {start|stop} whatever.service but we have automated monthly p= atching which does a reboot. Looking in /var/log/messages and the stop scripts do not get invoked on reb= oot, therefore I created a new shutdown service as described here. It appears that PostGreSQL is receiving a signal from somewhere prior to my= script running... Oct 05 14:18:56 kccontrolmt01 NetworkManager[787]: [1538767136.0967= ] manager: NetworkManager state is now DISCONNECTED Oct 05 14:18:56 kccontrolmt01 dbus[740]: [system] Activating via systemd: s= ervice name=3D'org.freedesktop.nm_dispatcher' unit=3D'dbus-org.freedesktop.= nm-dispa Oct 05 14:18:56 kccontrolmt01 dbus[740]: [system] Activation via systemd fa= iled for unit 'dbus-org.freedesktop.nm-dispatcher.service': Refusing activa= tion Oct 05 14:18:56 kccontrolmt01 network[29310]: Shutting down interface eth0:= Device 'eth0' successfully disconnected. Oct 05 14:18:56 kccontrolmt01 network[29310]: [ OK ] Oct 05 14:18:56 kccontrolmt01 stop_ctmlinux_server.sh[29185]: -------------= ----------- Oct 05 14:18:56 kccontrolmt01 stop_ctmlinux_server.sh[29185]: Shutting down= CONTROL-M. Oct 05 14:18:56 kccontrolmt01 stop_ctmlinux_server.sh[29185]: -------------= ----------- Oct 05 14:18:56 kccontrolmt01 stop_ctmlinux_server.sh[29185]: Waiting ... Oct 05 14:18:56 kccontrolmt01 stop_ctmlinux_server.sh[29185]: psql action f= ailed. cannot perform sql command in /data00/ctmlinux/ctm_server/tmp/upd_CM= S_SY Oct 05 14:18:56 kccontrolmt01 stop_ctmlinux_server.sh[29185]: db_execute_sq= l failed while processing /data00/ctmlinux/ctm_server/tmp/upd_CMS_SYSPRM_29= 448. Oct 05 14:18:56 kccontrolmt01 stop_ctmlinux_server.sh[29185]: Failed to upd= ate CMS_SYSPRM table. Oct 05 14:18:56 kccontrolmt01 stop_ctmlinux_server.sh[29185]: Be aware that= the Configuration Agent might start the CONTROL-M/Server The database must be available for the product to shut down in a consistent= state. I am open to suggestions. Thanks, Bryce Bryce Pepper Sr. Unix Applications Systems Engineer The Kansas City Southern Railway Company 114 West 11th Street | Kansas City, MO 64105 Office: 816.983.1512 Email: bpepper@kcsouthern.com --_000_49f8b4546d9948d798d81e1fd32bfb4fWNEXMBFEP03KCSCPCORP_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I am running three instances (under different users)= on a RHEL 7 server to support a vendor product.

 

In the defined services, the start & stop script= s work fine when invoked with systemctl {start|stop} whatever.service = but we have automated monthly patching which does a reboot.

 

Looking in /var/log/messages and the stop scripts do= not get invoked on reboot, therefore I created a new shutdown service as d= escribed here.

 

It appears that PostGreSQL is receiving a signal fro= m somewhere prior to my script running…

 

Oct 05 14:18:56 kccont= rolmt01 NetworkManager[787]: <info>  [1538767136.0967] manager: = NetworkManager state is now DISCONNECTED

Oct 05 14:18:56 kccont= rolmt01 dbus[740]: [system] Activating via systemd: service name=3D'org.fre= edesktop.nm_dispatcher' unit=3D'dbus-org.freedesktop.nm-dispa

Oct 05 14:18:56 kccont= rolmt01 dbus[740]: [system] Activation via systemd failed for unit 'dbus-or= g.freedesktop.nm-dispatcher.service': Refusing activation=

Oct 05 14:18:56 kccont= rolmt01 network[29310]: Shutting down interface eth0:  Device 'eth0' s= uccessfully disconnected.

Oct 05 14:18:56 kccont= rolmt01 network[29310]: [  OK  ]

Oct 05 14:18:56 kccont= rolmt01 stop_ctmlinux_server.sh[29185]: ------------------------=

Oct 05 14:18:56 kccont= rolmt01 stop_ctmlinux_server.sh[29185]: Shutting down CONTROL-M.=

Oct 05 14:18:56 kccont= rolmt01 stop_ctmlinux_server.sh[29185]: ------------------------=

Oct 05 14:18:56 kccont= rolmt01 stop_ctmlinux_server.sh[29185]: Waiting ...

Oct 05 14:18:56 kccont= rolmt01 stop_ctmlinux_server.sh[29185]: psql action failed. cannot perform sql command in /data= 00/ctmlinux/ctm_server/tmp/upd_CMS_SY

Oct 05 14:18:56 kccont= rolmt01 stop_ctmlinux_server.sh[29185]: db_execute_sql failed while process= ing /data00/ctmlinux/ctm_server/tmp/upd_CMS_SYSPRM_29448.=

Oct 05 14:18:56 kccont= rolmt01 stop_ctmlinux_server.sh[29185]: Failed to update CMS_SYSPRM table.<= o:p>

Oct 05 14:18:56 kccont= rolmt01 stop_ctmlinux_server.sh[29185]: Be aware that the Configuration Age= nt might start the CONTROL-M/Server

 

The database must be available for the product to sh= ut down in a consistent state.

 

I am open to suggestions.

 

Thanks,

Bryce

 

Bryce Pepper

Sr. Unix Applications Systems Eng= ineer

The Kansas City Southern Ra= ilway Company

114 West 11th Street&n= bsp; |  Kansas City,  MO 64105

Office:  816.983.1512 

Ema= il:  bpepp= er@kcsouthern.com  <= /p>

 

--_000_49f8b4546d9948d798d81e1fd32bfb4fWNEXMBFEP03KCSCPCORP_--