I recently installed an app server environment using Webware 0.9 (previously we have been using 0.8.1). Our environments are running on Red Hat Enterprise Linux 3, using python 2.4. I installed the RedHat start script provided with Webware 0.9, and I’m having some trouble when I try to do a restart with it.
With Webware 0.8.1 we’ve been using /var/run/$APP_NAME.pid to store the pid files, so I decided to continue with that convention with 0.9. However, when I do a restart, it works the first time but fails after that. The pidfile in the /var/run location is not there after the first restart is complete, and so the next restart reports [FAILED] when it tries to stop the app server. There is also a pidfile stored in the $WORK_DIR/appserverpid.txt file, and that seems to be updated properly even on a restart, but that does not appear to be the one the start script cares about.
It appears to be a timing issue, because if I do a stop and then a start a few seconds apart, everything works fine, and by adding ‘sleep 1’ in between the stop and start of the restart script, the problem goes away. That’s my workaround for now, but I’d appreciate any insight into the root cause of the issue.