RHEL 7 (systemd) reboot

From: Bryce Pepper <BPepper(at)KCSouthern(dot)com>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: RHEL 7 (systemd) reboot
Date: 2018-10-09 18:06:27
Message-ID: 49f8b4546d9948d798d81e1fd32bfb4f@WNEXMBFEP03.KCSCP.CORP
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 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 described here<https://unix.stackexchange.com/questions/211924/effect-of-reboot-signal-on-systemd-service-state>.

It appears that PostGreSQL is receiving a signal from somewhere prior to my script running...

Oct 05 14:18:56 kccontrolmt01 NetworkManager[787]: <info> [1538767136.0967] manager: NetworkManager state is now DISCONNECTED
Oct 05 14:18:56 kccontrolmt01 dbus[740]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispa
Oct 05 14:18:56 kccontrolmt01 dbus[740]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.nm-dispatcher.service': Refusing activation
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 failed. cannot perform sql command in /data00/ctmlinux/ctm_server/tmp/upd_CMS_SY
Oct 05 14:18:56 kccontrolmt01 stop_ctmlinux_server.sh[29185]: db_execute_sql failed while processing /data00/ctmlinux/ctm_server/tmp/upd_CMS_SYSPRM_29448.
Oct 05 14:18:56 kccontrolmt01 stop_ctmlinux_server.sh[29185]: Failed to update 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(at)kcsouthern(dot)com<mailto:bpepper(at)kcsouthern(dot)com>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Aleš Zelený 2018-10-09 19:07:03 tds_fdw binary column
Previous Message David G. Johnston 2018-10-09 16:39:25 Re: SELECT UNION into a text[]