Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
iDempiere JIRA
Linux Redhat Daemon/lockfile added for correct service stop when server shutdown/restart
Description
our use case: we shutdown ec2 instances by cron and time-to-time shutdown/restart instance manually. i recognise when doing this dirty way, then user sessions hang-up and not set as processed. this showed me our daemon init.d bash script doesn't support shutdown properly.
change: i.) when daemon started create new lock file following /var/lock/subsys/idempiere ii.) when shutdown/restart entered /var/lock/subsys/idempiere will be removed - this ensure redhat/centos start localshutdown script and wait until idempiere stopped. new/improved script attached file.
instruction:
install run default levels with the following command:
/sbin/chkconfig --add idempiere#
test: when i shutdown ec2 instance or simple run restart command - init mechanism call service idempiere stop before restart/stutdown machine.
Location: /utils/unix/" on binary distribution file.
Environment
5.1
Attachments
2
02 Feb 2019, 10:41 AM
02 Apr 2018, 04:44 PM
Activity
Carlos Ruiz
February 4, 2019 at 12:54 PM
Thanks @Norbert Bede, the thing is that the initial patch in this ticket is obsolete with respect to the latest changes on idempiere_RedHat.sh - so, my call is if you (or somebody else) can test this latest version patched to integrate it into core.
Regards,
Carlos Ruiz
Norbert Bede
February 4, 2019 at 5:57 AM
hi,
we are using above patch already 10 months. i confirm it = the patch ready to integrate. however others can confirm it well to be sure.
norbert
Carlos Ruiz
February 2, 2019 at 10:42 AM
Hi, if I understood correctly, the attached patch
implement the suggested in the current version 6.2
I don't have a RedHat/CentOS to test - can somebody please test the patch and provide feedback to integrate in core?
our use case: we shutdown ec2 instances by cron and time-to-time shutdown/restart instance manually.
i recognise when doing this dirty way, then user sessions hang-up and not set as processed.
this showed me our daemon init.d bash script doesn't support shutdown properly.
*according to xref: *
https://www.centos.org/forums/viewtopic.php?t=13997
https://linuxexplore.com/2014/03/19/use-of-subsystem-lock-files-in-init-script/
change:
i.) when daemon started create new lock file following /var/lock/subsys/idempiere
ii.) when shutdown/restart entered /var/lock/subsys/idempiere will be removed - this ensure redhat/centos start localshutdown script and wait until idempiere stopped.
new/improved script attached file.
instruction:
install run default levels with the following command:
/sbin/chkconfig --add idempiere#
test: when i shutdown ec2 instance or simple run restart command - init mechanism call service idempiere stop before restart/stutdown machine.
Location: /utils/unix/" on binary distribution file.