Hello,
Sometimes when I try to stop my jboss-as service (via service jboss-as stop where /etc/init.d/jboss-as is a symlink to the init.d script jboss-as-standalone.sh ), it takes a little while, and I get the following message:
grep: /var/run/jboss-as/jboss-as-standalone.pid: No such file or directory
I guess for some reason the standalone.sh stop command is terminated after the init.d script removed the jboss-as-standalone.pid file (line 136) and so the grep command of standalone.sh does not work (line 181):
if [ "x$JBOSS_PIDFILE" != "x" ]; then
grep "$JBOSS_PID" $JBOSS_PIDFILE && rm $JBOSS_PIDFILE
fi
Maybe a -f $JBOSS_PIDFILE test should be added...
However, I'm not really sure of the reason why the service takes a while to be stopped sometimes.
There's some known issues with server shutdown, such as AS7-3145