1

Running my Java service using jsvc on Linux (Ubuntu) 10.04.4 LTS and when I stop service and requests and then hung, checked log to find jsvc exec error below.

14/03/2014 12:49:48 19831 jsvc.exec error: Still running according to PID file /home/user/tmp/example.pid, PID is 19728 14/03/2014 12:49:48 19830 jsvc.exec error: Service exit with a return value of 122

Any idea ?

Thanks,

java_king
  • 51
  • 2
  • 4

2 Answers2

1

I'm having a similar problem that happens at a log rotation. It appears that the system is shutting down, rotating the logs, then trying to start the system. I believe error 122 is telling you that it hasn't completed shutting down yet and can't restart. I believe the -wait parameter is needed in the start script.

http://commons.apache.org/proper/commons-daemon/jsvc.html

Also see http://freddyandersen.wordpress.com/2009/09/02/running-tomcat-as-a-service-on-linux/ for an example.

If this is happening due to logrotate, use the copytruncate option instead of restarting the service.

http://www.vineetmanohar.com/2010/03/howto-rotate-tomcat-catalina-out/

0

Try to run below command. Here 19728 is the process id.

pkill -9 19728

Now start your process. It will work.

This will solve your problem.

Thank you.