I've upgraded a 12.04 machine to 14.04 using do-release-upgrade. All went well, as usual, but this particular machine has a very strange issue afterwards;
See the output for service tomcat6 status:
root@box:/etc# service tomcat6 status
* Tomcat servlet engine is running with pid 8763
root@box:/etc# service tomcat6 status
* Tomcat servlet engine is running with pid 8763
root@box:/etc# service tomcat6 status
* Tomcat servlet engine is running with pid 8763
root@box:/etc# service tomcat6 status
* Tomcat servlet engine is running with pid 8763
Consistent, and correct. (tomcat6 is indeed running as PID 8763).
The /etc/init.d/tomcat6 script however, consistently reports a different outcome:
root@box:/etc# /etc/init.d/tomcat6 status
* Tomcat servlet engine is not running, but pid file exists.
root@box:/etc# /etc/init.d/tomcat6 status
* Tomcat servlet engine is not running, but pid file exists.
root@box:/etc# /etc/init.d/tomcat6 status
* Tomcat servlet engine is not running, but pid file exists.
root@box:/etc# /etc/init.d/tomcat6 status
* Tomcat servlet engine is not running, but pid file exists.
Which is strange, because due to the lack of an upstart script, the init.d script is actually what the service call uses for information. Removing the init.d script confirms that:
root@box:/etc# mv /etc/init.d/tomcat6 /root/
root@box:/etc# service tomcat6 status
tomcat6: unrecognized service
root@box:/etc# mv /root/tomcat6 /etc/init.d/
root@box:/etc# service tomcat6 status
* Tomcat servlet engine is running with pid 8763
Unfortunately, the Puppet module I'm using calls /etc/init.d/tomcat6, and as such, reports the service being down every 30 minutes, and performs a restart. Updating the Puppet module to use a service call instead is the immediate and obvious solution, but that doesn't explain or fix the fact that the same script can have two possible outcomes, based on how the script is called.
Can anyone explain why this is happening and/or tell me how to get the results back in a consistent state?