- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shutdown of cache database not being completed
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2011 10:50 PM
01-11-2011 10:50 PM
Shutdown of cache database not being completed
I have the shutdown script of my cache database in rc2.d as Kcache950
This is a link to a script in /sbin/init.d
#!/bin/sh
set -x
#
# /etc/rc.d/init.d/cache
# Cashier Control Script
#
# chkconfig: 2345 55 01
# description: Cache DB service
#
RETVAL=0
CACHE_USR="cacheusr"
case "$1" in
start)
echo -n ""
echo "Starting cache:"
echo $PATH
/usr/bin/su - $CACHE_USR -c "/home/cacheusr/cache_start.sh"
RETVAL=0
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/cache
;;
stop)
echo -n "Stopping cache: "
/usr/bin/su - $CACHE_USR -c "/home/cacheusr/cache_stop.sh &"
CHILD_PID=${!}
wait ${CHILD_PID} # parent will wait until child finishes
RETVAL=0
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/cache
;;
restart)
stop
start
;;
*)
echo "usage: $0 (start|stop|restart|help)"
esac
cache: END
however hp ux does not wait for this script to complete before shuting down so the database crashes.
Why???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2011 07:33 AM
01-12-2011 07:33 AM
Re: Shutdown of cache database not being completed
You could change it to not background the cache_stop.sh, and remove the CHILD_PID assignment and the call to wait.
Also, you can remove the "-n" from the echo commands.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2011 08:11 AM
01-12-2011 08:11 AM
Re: Shutdown of cache database not being completed
It should still technically work... the /var/lock scheme I don;t think is available in HP-UX.
So drop & in :
/usr/bin/su - $CACHE_USR -c "/home/cacheusr/cache_stop.sh &"
Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2011 10:13 PM
01-12-2011 10:13 PM
Re: Shutdown of cache database not being completed
The /usr/bin/su - $CACHE_USR -c "/home/cacheusr/cache_stop.sh &"
CHILD_PID=${!}
wait ${CHILD_PID} # parent will wait until child finishes
was suggested as my shutdown of the db does not complete before the system goes down.
it gets as far as the messages below.
01/13/11-07:58:24:862 (14349) 0 Receive daemon exited due to SIGTERM received
01/13/11-07:58:24:862 (14369) 0 Application Monitor exited due to SIGTERM receiv
ed
During a shutdown it should end with cahe shutdown complete message.
which if i do it manualy is the case.
And when i bring up the db it says it is fine.
However when i do a reboot it does not and starting the db states it is recovering from a crash.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2011 07:14 AM
01-13-2011 07:14 AM
Re: Shutdown of cache database not being completed
Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2011 09:45 PM
01-13-2011 09:45 PM
Re: Shutdown of cache database not being completed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2011 06:35 AM
01-14-2011 06:35 AM
Re: Shutdown of cache database not being completed
Might be best to modify the cache_stop.sh to actually wait for the shutdown to complete before exiting?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2011 07:11 AM
01-14-2011 07:11 AM
Re: Shutdown of cache database not being completed
Or even add a looper there to check if the software has actually stopped?
Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2011 09:26 AM
01-14-2011 09:26 AM
Re: Shutdown of cache database not being completed
According to the manual:
WARNINGS
reboot does not invoke the shutdown scripts associated with subsystems to bring them down in a cautious
manner. See shutdown(1M).
If you want your shutdown scripts to work you need to use shutdown.
Rick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2011 10:42 PM
01-16-2011 10:42 PM